--- libjbig/Makefile 2014-03-27 14:47:15.000000000 -0400 +++ libjbig/Makefile 2014-04-08 08:43:57.000000000 -0400 @@ -2,10 +2,14 @@ # Select an ANSI/ISO C compiler here, GNU gcc is recommended -CC = gcc +#CC = gcc # Options for the compiler: A high optimization level is suggested -CFLAGS = -g -O -W -Wall -ansi -pedantic # --coverage +CFLAGS += -W -Wall -ansi -pedantic # --coverage -all: libjbig.a libjbig85.a tstcodec tstcodec85 +all: libjbig.a libjbig85.a tstcodec tstcodec85 libjbig.so.2 libjbig85.so.1 + +.SUFFIXES: .c .So +.c.So: + $(CC) -c -fpic -DPIC ${CFLAGS} ${.IMPSRC} -o ${.TARGET} tstcodec: tstcodec.o jbig.o jbig_ar.o @@ -20,4 +24,8 @@ -ranlib libjbig.a +libjbig.so.2: jbig.So jbig_ar.So + rm -f ${.TARGET} + $(CC) -o ${.TARGET} ${LDFLAGS} -shared -Wl,-soname,${.TARGET} ${.ALLSRC} + libjbig85.a: jbig85.o jbig_ar.o rm -f libjbig85.a @@ -25,4 +33,8 @@ -ranlib libjbig85.a +libjbig85.so.1: jbig85.So jbig_ar.So + rm -f ${.TARGET} + $(CC) -o ${.TARGET} ${LDFLAGS} -shared -Wl,-soname,${.TARGET} ${.ALLSRC} + jbig.o: jbig.c jbig.h jbig_ar.h jbig85.o: jbig85.c jbig85.h jbig_ar.h