openbsd-ports/graphics/jbigkit/patches/patch-ab

49 lines
1.2 KiB
Plaintext
Raw Normal View History

--- libjbig/Makefile.orig Fri Apr 10 21:33:27 1998
+++ libjbig/Makefile Wed Mar 22 20:31:42 2000
@@ -7,21 +7,40 @@
# Options for the compiler: A high optimization level is suggested
CFLAGS = -O -Wall -ansi -pedantic
-all: libjbig.a tstcodec
1999-12-27 01:12:08 -05:00
+.if defined(NO_SHARED_LIBS) && ${NO_SHARED_LIBS:U} == YES
+all: libjbig.a
+.else
+all: libjbig.a libjbig.so.$(VERSION)
1999-12-27 01:12:08 -05:00
+.endif
tstcodec: tstcodec.c jbig.c jbig.h jbig_tab.o
$(CC) $(CFLAGS) -o tstcodec -DTEST_CODEC tstcodec.c jbig.c \
1999-12-27 01:12:08 -05:00
jbig_tab.o
1999-12-27 01:12:08 -05:00
libjbig.a: jbig.o jbig_tab.o
- rm -f libjbig.a
- ar rc libjbig.a jbig.o jbig_tab.o
- ranlib libjbig.a
+ rm -f ${.TARGET}
+ ar rc ${.TARGET} ${.ALLSRC}
+ ranlib ${.TARGET}
+
+libjbig.so.$(VERSION): jbig.so jbig_tab.so
+ rm -f ${.TARGET}
+ ld -Bshareable -Bforcearchive -o ${.TARGET} ${.ALLSRC}
+
1999-12-27 01:12:08 -05:00
+.SUFFIXES: .c .o .so
+
+.c.o:
+ ${CC} ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
+
+.c.so:
1999-12-27 01:12:08 -05:00
+ ${CC} ${CFLAGS} -fpic -DPIC -c ${.IMPSRC} -o ${.TARGET}
jbig.o: jbig.c jbig.h
+jbig_tab.o: jbig_tab.c jbig.h
+jbig.so: jbig.c jbig.h
1999-12-27 01:12:08 -05:00
+jbig_tab.so: jbig_tab.c jbig.h
test: tstcodec
./tstcodec
clean:
- rm -f *.o *~ core gmon.out dbg_d\=??.pbm tstcodec
1999-12-27 01:12:08 -05:00
+ rm -f *.o *~ core gmon.out dbg_d\=??.pbm tstcodec libjbig.so.$(VERSION) libjbig.a