OLD | NEW |
(Empty) | |
| 1 --- zlib-1.2.1/Makefile.in |
| 2 +++ zlib-1.2.1/Makefile.in |
| 3 @@ -49,6 +49,8 @@ |
| 4 OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \ |
| 5 zutil.o inflate.o infback.o inftrees.o inffast.o |
| 6 |
| 7 +PIC_OBJS = $(OBJS:%.o=%.lo) |
| 8 + |
| 9 OBJA = |
| 10 # to use the asm code: make OBJA=match.o |
| 11 |
| 12 @@ -77,8 +79,11 @@ |
| 13 mv _match.o match.o |
| 14 rm -f _match.s |
| 15 |
| 16 -$(SHAREDLIBV): $(OBJS) |
| 17 - $(LDSHARED) -o $@ $(OBJS) -lc |
| 18 +%.lo: %.c |
| 19 + $(CC) $(CFLAGS) -DPIC -fPIC -c $< -o $@ |
| 20 + |
| 21 +$(SHAREDLIBV): $(PIC_OBJS) |
| 22 + $(LDSHARED) -o $@ $(PIC_OBJS) -lc |
| 23 rm -f $(SHAREDLIB) $(SHAREDLIBM) |
| 24 ln -s $@ $(SHAREDLIB) |
| 25 ln -s $@ $(SHAREDLIBM) |
| 26 @@ -89,13 +94,10 @@ |
| 27 minigzip$(EXE): minigzip.o $(LIBS) |
| 28 $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) |
| 29 |
| 30 -install: $(LIBS) |
| 31 +install-libs: $(LIBS) |
| 32 -@if [ ! -d $(exec_prefix) ]; then mkdir -p $(exec_prefix); fi |
| 33 - -@if [ ! -d $(includedir) ]; then mkdir -p $(includedir); fi |
| 34 -@if [ ! -d $(libdir) ]; then mkdir -p $(libdir); fi |
| 35 -@if [ ! -d $(man3dir) ]; then mkdir -p $(man3dir); fi |
| 36 - cp zlib.h zconf.h $(includedir) |
| 37 - chmod 644 $(includedir)/zlib.h $(includedir)/zconf.h |
| 38 cp $(LIBS) $(libdir) |
| 39 cd $(libdir); chmod 755 $(LIBS) |
| 40 -@(cd $(libdir); $(RANLIB) libz.a || true) >/dev/null 2>&1 |
| 41 @@ -110,6 +112,11 @@ |
| 42 # The ranlib in install is needed on NeXTSTEP which checks file times |
| 43 # ldconfig is for Linux |
| 44 |
| 45 +install: install-libs |
| 46 + -@if [ ! -d $(includedir) ]; then mkdir $(includedir); fi |
| 47 + cp zlib.h zconf.h $(includedir) |
| 48 + chmod 644 $(includedir)/zlib.h $(includedir)/zconf.h |
| 49 + |
| 50 uninstall: |
| 51 cd $(includedir); \ |
| 52 cd $(libdir); rm -f libz.a; \ |
| 53 @@ -127,7 +127,7 @@ |
| 54 |
| 55 mostlyclean: clean |
| 56 clean: |
| 57 - rm -f *.o *~ example$(EXE) minigzip$(EXE) \ |
| 58 + rm -f *.lo *.o *~ example$(EXE) minigzip$(EXE) \ |
| 59 libz.* foo.gz so_locations \ |
| 60 _match.s maketree contrib/infback9/*.o |
| 61 |
| 62 --- zlib-1.2.1/configure |
| 63 +++ zlib-1.2.1/configure |
| 64 @@ -160,7 +160,7 @@ |
| 65 if test "`($CC -c $SFLAGS $test.c) 2>&1`" = "" && |
| 66 test "`($LDSHARED -o $test$shared_ext $test.o) 2>&1`" = ""; then |
| 67 CFLAGS="$SFLAGS" |
| 68 - LIBS="$SHAREDLIBV" |
| 69 + LIBS="$LIBS $SHAREDLIBV" |
| 70 echo Building shared library $SHAREDLIBV with $CC. |
| 71 elif test -z "$old_cc" -a -z "$old_cflags"; then |
| 72 echo No shared library support. |
OLD | NEW |