69 lines
1.8 KiB
Plaintext
69 lines
1.8 KiB
Plaintext
--- scripts/makefile.std.orig Fri Jan 5 19:25:50 2001
|
|
+++ scripts/makefile.std Tue Apr 3 09:57:15 2001
|
|
@@ -8,8 +8,6 @@
|
|
# Where the zlib library and include files are located
|
|
#ZLIBLIB=/usr/local/lib
|
|
#ZLIBINC=/usr/local/include
|
|
-ZLIBLIB=../zlib
|
|
-ZLIBINC=../zlib
|
|
|
|
CC=cc
|
|
CFLAGS=-I$(ZLIBINC) -O # -g -DPNG_DEBUG=5
|
|
@@ -21,31 +19,46 @@
|
|
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
|
|
pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
|
|
pngwtran.o pngmem.o pngerror.o pngpread.o
|
|
+SHOBJS = $(OBJS:.o=.so)
|
|
|
|
-all: libpng.a pngtest
|
|
+.SUFFIXES: .o .so
|
|
+
|
|
+.c.so:
|
|
+ $(CC) $(CFLAGS) $(PICFLAG) -DPIC -c $? -o $@
|
|
+
|
|
+PICFLAG= -fpic
|
|
+SHLIB= libpng.so.1.10
|
|
|
|
libpng.a: $(OBJS)
|
|
ar rc $@ $(OBJS)
|
|
$(RANLIB) $@
|
|
|
|
+$(SHLIB): $(SHOBJS)
|
|
+ $(CC) -shared $(PICFLAG) -Wl,-x -o $(SHLIB) $(SHOBJS) -lz -lm
|
|
+
|
|
pngtest: pngtest.o libpng.a
|
|
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
|
|
|
|
test: pngtest
|
|
./pngtest
|
|
|
|
+.if defined(NO_SHARED_LIBS) && ${NO_SHARED_LIBS:L} == "yes"
|
|
+all: libpng.a pngtest
|
|
install: libpng.a
|
|
- -@mkdir $(prefix)/include
|
|
- -@mkdir $(prefix)/lib
|
|
- cp png.h $(prefix)/include
|
|
- cp pngconf.h $(prefix)/include
|
|
- chmod 644 $(prefix)/include/png.h
|
|
- chmod 644 $(prefix)/include/pngconf.h
|
|
- cp libpng.a $(prefix)/lib
|
|
- chmod 644 $(prefix)/lib/libpng.a
|
|
+.else
|
|
+all: libpng.a $(SHLIB) pngtest
|
|
+install: libpng.a $(SHLIB)
|
|
+.endif
|
|
+ ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(prefix)/include
|
|
+ ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(prefix)/lib
|
|
+ ${BSD_INSTALL_DATA} png.h pngconf.h $(DESTDIR)$(prefix)/include
|
|
+ ${BSD_INSTALL_DATA} libpng.a $(DESTDIR)$(prefix)/lib
|
|
+ @if [ -f $(SHLIB) ]; then \
|
|
+ ${BSD_INSTALL_DATA} $(SHLIB) $(DESTDIR)$(prefix)/lib; \
|
|
+ fi
|
|
|
|
clean:
|
|
- rm -f *.o libpng.a pngtest pngout.png
|
|
+ rm -f *.o *.so libpng.a $(SHLIB) pngtest pngout.png
|
|
|
|
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
|
|
writelock:
|