Lines 1-40
Link Here
|
1 |
--- libjbig/Makefile Fri Apr 10 20:33:27 1998 |
1 |
--- libjbig/Makefile.orig 2008-08-30 13:20:52.000000000 -0400 |
2 |
+++ libjbig/Makefile Wed Sep 16 11:57:16 1998 |
2 |
+++ libjbig/Makefile 2013-12-07 15:16:56.000000000 -0500 |
3 |
@@ -5,9 +5,11 @@ |
3 |
@@ -2,12 +2,12 @@ |
|
|
4 |
# $Id: Makefile 1285 2008-08-18 13:36:45Z mgk25 $ |
5 |
|
6 |
# Select an ANSI/ISO C compiler here, GNU gcc is recommended |
4 |
-CC = gcc |
7 |
-CC = gcc |
|
|
8 |
+#CC = gcc |
5 |
|
9 |
|
6 |
# Options for the compiler: A high optimization level is suggested |
10 |
# Options for the compiler: A high optimization level is suggested |
7 |
-CFLAGS = -O -Wall -ansi -pedantic |
11 |
-CFLAGS = -g -O -Wall -ansi -pedantic # --coverage |
8 |
+CFLAGS += -Wall -ansi -pedantic |
12 |
+CFLAGS += -Wall -ansi -pedantic # --coverage |
9 |
|
13 |
|
10 |
-all: libjbig.a tstcodec |
14 |
-all: libjbig.a tstcodec tstcodec85 |
11 |
+JBIGLIB=libjbig.a |
15 |
+all: libjbig.a libjbig85.a libjbig.so.1 libjbig85.so.1 |
12 |
+SOJBIGLIB=libjbig.so.1 |
|
|
13 |
+ |
14 |
+all: libjbig.a $(SOJBIGLIB) |
15 |
|
16 |
|
16 |
tstcodec: tstcodec.c jbig.c jbig.h jbig_tab.o |
17 |
tstcodec: tstcodec.o jbig.o jbig_ar.o |
17 |
$(CC) $(CFLAGS) -o tstcodec -DTEST_CODEC tstcodec.c jbig.c \ |
18 |
$(CC) $(CFLAGS) -o tstcodec $+ |
18 |
@@ -18,10 +25,21 @@ |
19 |
@@ -20,11 +20,19 @@ |
19 |
ar rc libjbig.a jbig.o jbig_tab.o |
20 |
ar rc libjbig.a jbig.o jbig_ar.o |
20 |
ranlib libjbig.a |
21 |
-ranlib libjbig.a |
21 |
|
22 |
|
22 |
+$(SOJBIGLIB): jbig.so jbig_tab.so |
23 |
+libjbig.so.1: jbig.o jbig_ar.o |
23 |
+ rm -f ${.TARGET} |
24 |
+ rm -f ${.TARGET} |
24 |
+ $(CC) -o ${.TARGET} ${LDFLAGS} -shared -Wl,-soname,${.TARGET} ${.ALLSRC} |
25 |
+ $(CC) -o ${.TARGET} ${LDFLAGS} -shared -Wl,-soname,${.TARGET} ${.ALLSRC} |
25 |
+ ln -sf ${.TARGET} `echo ${.TARGET} | sed 's/\.so.*$$/.so/'` |
26 |
+ |
26 |
+ |
27 |
libjbig85.a: jbig85.o jbig_ar.o |
27 |
jbig.o: jbig.c jbig.h |
28 |
rm -f libjbig85.a |
|
|
29 |
ar rc libjbig85.a jbig85.o jbig_ar.o |
30 |
-ranlib libjbig85.a |
28 |
|
31 |
|
|
|
32 |
+libjbig85.so.1: jbig85.o jbig_ar.o |
33 |
+ rm -f ${.TARGET} |
34 |
+ $(CC) -o ${.TARGET} ${LDFLAGS} -shared -Wl,-soname,${.TARGET} ${.ALLSRC} |
35 |
+ |
36 |
jbig.o: jbig.c jbig.h jbig_ar.h |
37 |
jbig85.o: jbig85.c jbig85.h jbig_ar.h |
38 |
jbig_ar.o: jbig_ar.c jbig_ar.h |
39 |
@@ -46,3 +54,7 @@ |
40 |
clean: |
41 |
rm -f *.{o,gcda,gcno,gcov} *~ core gmon.out dbg_d\=??.pbm t82test.pbm |
42 |
rm -f tstcodec tstcodec85 |
43 |
+ |
29 |
+.SUFFIXES: .c .so |
44 |
+.SUFFIXES: .c .so |
30 |
+.c.so: |
45 |
+.c.so: |
31 |
+ ${CC} -c -fpic -DPIC ${CFLAGS} ${.IMPSRC} -o ${.TARGET} |
46 |
+ $(CC) -c -fpic -DPIC ${CFLAGS} ${.IMPSRC} -o ${.TARGET} |
32 |
+jbig.so: jbig.c jbig.h |
|
|
33 |
+jbig_tab.so: jbig_tab.c |
34 |
+ |
35 |
test: tstcodec |
36 |
./tstcodec |
37 |
|
38 |
clean: |
39 |
- rm -f *.o *~ core gmon.out dbg_d\=??.pbm tstcodec |
40 |
+ rm -f *.o *~ core gmon.out dbg_d\=??.pbm tstcodec *.so libjbig.so.1 libjbig.so.1.1 libjbig.a |