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
|
1999-05-08 15:17:39 -04:00
|
|
|
# Options for the compiler: A high optimization level is suggested
|
2000-03-23 01:51:58 -05:00
|
|
|
CFLAGS = -O -Wall -ansi -pedantic
|
1999-05-08 15:17:39 -04:00
|
|
|
|
|
|
|
-all: libjbig.a tstcodec
|
2006-10-19 09:53:48 -04:00
|
|
|
+PICFLAG= -fpic
|
2005-12-26 13:00:15 -05:00
|
|
|
|
2000-09-23 22:38:01 -04:00
|
|
|
+.if defined(NO_SHARED_LIBS) && ${NO_SHARED_LIBS:L} == "yes"
|
1999-12-27 01:12:08 -05:00
|
|
|
+all: libjbig.a
|
|
|
|
+.else
|
2000-03-23 01:51:58 -05:00
|
|
|
+all: libjbig.a libjbig.so.$(VERSION)
|
1999-12-27 01:12:08 -05:00
|
|
|
+.endif
|
2005-12-26 13:00:15 -05:00
|
|
|
+
|
1999-05-08 15:17:39 -04: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-05-08 15:17:39 -04:00
|
|
|
|
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
|
|
|
|
2000-03-23 01:51:58 -05:00
|
|
|
+libjbig.so.$(VERSION): jbig.so jbig_tab.so
|
1999-05-08 15:17:39 -04:00
|
|
|
+ rm -f ${.TARGET}
|
2000-10-16 15:47:30 -04:00
|
|
|
+ ${CC} -shared $(PICFLAG) -o ${.TARGET} ${.ALLSRC}
|
2004-02-25 15:31:00 -05:00
|
|
|
+
|
2000-09-23 22:38:01 -04:00
|
|
|
+.SUFFIXES: .o .so
|
1999-12-27 01:12:08 -05:00
|
|
|
+
|
1999-05-08 15:17:39 -04:00
|
|
|
+.c.so:
|
2004-01-11 03:20:06 -05:00
|
|
|
+ ${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 $@
|
1999-05-08 15:17:39 -04:00
|
|
|
|
|
|
|
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
|