2000-11-23 17:51:42 +00:00
|
|
|
# makefile for libpng, MACOS X
|
|
|
|
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
|
2001-10-19 01:55:13 +00:00
|
|
|
# Modified by Karin Kosina <kyrah@sim.no> 20011010:
|
|
|
|
# build shared library (*.dylib)
|
2000-11-23 17:51:42 +00:00
|
|
|
# For conditions of distribution and use, see copyright notice in png.h
|
|
|
|
|
|
|
|
# where make install puts libpng.a and png.h
|
|
|
|
prefix=/usr/local
|
|
|
|
|
|
|
|
# Where the zlib library and include files are located
|
|
|
|
#ZLIBLIB=/usr/local/lib
|
|
|
|
#ZLIBINC=/usr/local/include
|
|
|
|
ZLIBLIB=../zlib
|
|
|
|
ZLIBINC=../zlib
|
|
|
|
|
|
|
|
CC=cc
|
2001-10-19 01:55:13 +00:00
|
|
|
CFLAGS=-fno-common -I$(ZLIBINC) -O # -g -DPNG_DEBUG=5
|
2000-11-23 17:51:42 +00:00
|
|
|
LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz
|
2001-10-19 01:55:13 +00:00
|
|
|
LDSHARED=cc -lz -dynamiclib -compatibility_version $(VER) -current_version $(VER)
|
|
|
|
|
|
|
|
PNGMAJ = 3
|
|
|
|
PNGMIN = 1.2.1beta1
|
|
|
|
VER = $(PNGMAJ).$(PNGMIN)
|
|
|
|
SHAREDLIB=libpng
|
|
|
|
SHAREDLIB_POSTFIX=dylib
|
|
|
|
libdir=$(prefix)/lib
|
2000-11-23 17:51:42 +00:00
|
|
|
|
|
|
|
#RANLIB=echo
|
|
|
|
RANLIB=ranlib
|
|
|
|
|
|
|
|
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
|
|
|
|
|
2001-10-19 01:55:13 +00:00
|
|
|
all: libpng.a pngtest shared
|
|
|
|
|
|
|
|
shared: $(SHAREDLIB).$(VER).$(SHAREDLIB_POSTFIX)
|
2000-11-23 17:51:42 +00:00
|
|
|
|
|
|
|
libpng.a: $(OBJS)
|
|
|
|
ar rc $@ $(OBJS)
|
|
|
|
$(RANLIB) $@
|
|
|
|
|
2001-10-19 01:55:13 +00:00
|
|
|
$(SHAREDLIB).$(VER).$(SHAREDLIB_POSTFIX): $(OBJS)
|
|
|
|
$(LDSHARED) -o $@ $(OBJS)
|
|
|
|
|
2000-11-23 17:51:42 +00:00
|
|
|
pngtest: pngtest.o libpng.a
|
|
|
|
$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
|
|
|
|
|
|
|
|
test: pngtest
|
|
|
|
./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
|
|
|
|
|
2001-10-19 01:55:13 +00:00
|
|
|
install-shared: $(SHAREDLIB).$(VER).$(SHAREDLIB_POSTFIX)
|
|
|
|
cp $(SHAREDLIB).$(VER).$(SHAREDLIB_POSTFIX) $(libdir)
|
|
|
|
(cd $(libdir); \
|
|
|
|
ln -s $(SHAREDLIB).$(VER).$(SHAREDLIB_POSTFIX) $(SHAREDLIB).$(SHAREDLIB_POSTFIX))
|
|
|
|
|
2000-11-23 17:51:42 +00:00
|
|
|
clean:
|
2001-10-19 01:55:13 +00:00
|
|
|
rm -f *.o libpng.a pngtest pngout.png $(SHAREDLIB).$(VER).$(SHAREDLIB_POSTFIX) $(SHAREDLIB).$(SHAREDLIB_POSTFIX)
|
2000-11-23 17:51:42 +00:00
|
|
|
|
|
|
|
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
|
|
|
|
writelock:
|
|
|
|
chmod a-w *.[ch35] $(DOCS) scripts/*
|
|
|
|
|
|
|
|
# DO NOT DELETE THIS LINE -- make depend depends on it.
|
|
|
|
|
|
|
|
png.o: png.h pngconf.h
|
|
|
|
pngerror.o: png.h pngconf.h
|
|
|
|
pngrio.o: png.h pngconf.h
|
|
|
|
pngwio.o: png.h pngconf.h
|
|
|
|
pngmem.o: png.h pngconf.h
|
|
|
|
pngset.o: png.h pngconf.h
|
|
|
|
pngget.o: png.h pngconf.h
|
|
|
|
pngread.o: png.h pngconf.h
|
|
|
|
pngrtran.o: png.h pngconf.h
|
|
|
|
pngrutil.o: png.h pngconf.h
|
|
|
|
pngtest.o: png.h pngconf.h
|
|
|
|
pngtrans.o: png.h pngconf.h
|
|
|
|
pngwrite.o: png.h pngconf.h
|
|
|
|
pngwtran.o: png.h pngconf.h
|
|
|
|
pngwutil.o: png.h pngconf.h
|
|
|
|
pngpread.o: png.h pngconf.h
|
|
|
|
|