--- jbigkit-2.1.old/libjbig/Makefile +++ jbigkit-2.1/libjbig/Makefile @@ -4,9 +4,9 @@ CC = gcc # Options for the compiler: A high optimization level is suggested -CFLAGS = -g -O -W -Wall -ansi -pedantic # --coverage +CFLAGS = -O2 -fPIC -Wall -ansi -pedantic -all: libjbig.a libjbig85.a tstcodec tstcodec85 +all: libjbig.so libjbig85.so tstcodec tstcodec85 tstcodec: tstcodec.o jbig.o jbig_ar.o $(CC) $(CFLAGS) -o tstcodec tstcodec.o jbig.o jbig_ar.o @@ -14,15 +14,13 @@ tstcodec85: tstcodec85.o jbig85.o jbig_ar.o $(CC) $(CFLAGS) -o tstcodec85 tstcodec85.o jbig85.o jbig_ar.o -libjbig.a: jbig.o jbig_ar.o - rm -f libjbig.a - ar rc libjbig.a jbig.o jbig_ar.o - -ranlib libjbig.a - -libjbig85.a: jbig85.o jbig_ar.o - rm -f libjbig85.a - ar rc libjbig85.a jbig85.o jbig_ar.o - -ranlib libjbig85.a +libjbig.so: jbig.o jbig_ar.o + rm -f libjbig.so + cc -shared -o libjbig.so jbig.o jbig_ar.o + +libjbig85.so: jbig85.o jbig_ar.o + rm -f libjbig85.so + cc -shared -o libjbig85.so jbig85.o jbig_ar.o jbig.o: jbig.c jbig.h jbig_ar.h jbig85.o: jbig85.c jbig85.h jbig_ar.h --- jbigkit-2.1.old/pbmtools/Makefile +++ jbigkit-2.1/pbmtools/Makefile @@ -4,7 +4,7 @@ CC = gcc # Options for the compiler -CFLAGS = -g -O -W -Wall -Wno-unused-result -ansi -pedantic # --coverage +CFLAGS = -O2 -Wall -ansi -pedantic -I../libjbig CPPFLAGS = -I../libjbig .SUFFIXES: .1 .5 .txt $(SUFFIXES) @@ -14,16 +14,16 @@ txt: pbmtojbg.txt jbgtopbm.txt pbm.txt pgm.txt -pbmtojbg: pbmtojbg.o ../libjbig/libjbig.a +pbmtojbg: pbmtojbg.o ../libjbig/libjbig.so $(CC) $(CFLAGS) -o pbmtojbg pbmtojbg.o -L../libjbig -ljbig -jbgtopbm: jbgtopbm.o ../libjbig/libjbig.a +jbgtopbm: jbgtopbm.o ../libjbig/libjbig.so $(CC) $(CFLAGS) -o jbgtopbm jbgtopbm.o -L../libjbig -ljbig -pbmtojbg85: pbmtojbg85.o ../libjbig/libjbig85.a +pbmtojbg85: pbmtojbg85.o ../libjbig/libjbig85.so $(CC) $(CFLAGS) -o pbmtojbg85 pbmtojbg85.o -L../libjbig -ljbig85 -jbgtopbm85: jbgtopbm85.o ../libjbig/libjbig85.a +jbgtopbm85: jbgtopbm85.o ../libjbig/libjbig85.so $(CC) $(CFLAGS) -o jbgtopbm85 jbgtopbm85.o -L../libjbig -ljbig85 jbgtopbm.o: jbgtopbm.c ../libjbig/jbig.h @@ -31,13 +31,13 @@ jbgtopbm85.o: jbgtopbm85.c ../libjbig/jbig85.h pbmtojbg85.o: pbmtojbg85.c ../libjbig/jbig85.h -../libjbig/libjbig.a: ../libjbig/jbig.c ../libjbig/jbig.h \ +../libjbig/libjbig.so: ../libjbig/jbig.c ../libjbig/jbig.h \ ../libjbig/jbig_ar.c ../libjbig/jbig_ar.h - make -C ../libjbig libjbig.a + make -C ../libjbig libjbig.so -../libjbig/libjbig85.a: ../libjbig/jbig85.c ../libjbig/jbig85.h \ +../libjbig/libjbig85.so: ../libjbig/jbig85.c ../libjbig/jbig85.h \ ../libjbig/jbig_ar.c ../libjbig/jbig_ar.h - make -C ../libjbig libjbig85.a + make -C ../libjbig libjbig85.so analyze: clang $(CPPFLAGS) --analyze *.c