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

47 lines
1.2 KiB
Plaintext
Raw Normal View History

2006-10-19 09:53:48 -04:00
$OpenBSD: patch-libjbig_Makefile,v 1.5 2006/10/19 13:53:48 naddy Exp $
--- libjbig/Makefile.orig Tue Jun 8 10:40:06 2004
+++ libjbig/Makefile Mon Dec 26 12:53:54 2005
2005-12-26 13:00:15 -05:00
@@ -7,17 +7,32 @@ CC = gcc
# Options for the compiler: A high optimization level is suggested
CFLAGS = -O -Wall -ansi -pedantic
-all: libjbig.a tstcodec
2006-10-19 09:53:48 -04:00
+PICFLAG= -fpic
2005-12-26 13:00:15 -05:00
+.if defined(NO_SHARED_LIBS) && ${NO_SHARED_LIBS:L} == "yes"
1999-12-27 01:12:08 -05:00
+all: libjbig.a
+.else
+all: libjbig.a libjbig.so.$(VERSION)
1999-12-27 01:12:08 -05:00
+.endif
2005-12-26 13:00:15 -05:00
+
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
2004-02-25 15:31:00 -05:00
- -ranlib libjbig.a
1999-12-27 01:12:08 -05:00
+ rm -f ${.TARGET}
+ ar rc ${.TARGET} ${.ALLSRC}
+ ranlib ${.TARGET}
2005-12-26 13:00:15 -05:00
+libjbig.so.$(VERSION): jbig.so jbig_tab.so
+ rm -f ${.TARGET}
+ ${CC} -shared $(PICFLAG) -o ${.TARGET} ${.ALLSRC}
2004-02-25 15:31:00 -05:00
+
+.SUFFIXES: .o .so
1999-12-27 01:12:08 -05:00
+
+.c.so:
+ ${CC} ${CFLAGS} $(PICFLAG) -c ${.IMPSRC} -o ${.TARGET}
2005-12-26 13:00:15 -05:00
+
1999-12-27 01:12:08 -05:00
jbig.o: jbig.c jbig.h
2005-12-26 13:00:15 -05:00
test: tstcodec
@@ -27,4 +42,4 @@ t82test.pbm: tstcodec
./tstcodec $@
clean:
2005-12-26 13:00:15 -05:00
- rm -f *.o *~ core gmon.out dbg_d\=??.pbm tstcodec t82test.pbm
1999-12-27 01:12:08 -05:00
+ rm -f *.o *~ core gmon.out dbg_d\=??.pbm tstcodec libjbig.so.$(VERSION) libjbig.a