Glenn Randers-Pehrson | b6ce43d | 1998-01-01 07:13:13 -0600 | [diff] [blame] | 1 | # makefile for libpng on DEC Alpha Unix |
| 2 | # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. |
| 3 | # For conditions of distribution and use, see copyright notice in png.h |
| 4 | |
| 5 | # Where the zlib library and include files are located |
| 6 | #ZLIBLIB=/usr/local/lib |
| 7 | #ZLIBINC=/usr/local/include |
| 8 | ZLIBLIB=../zlib |
| 9 | ZLIBINC=../zlib |
| 10 | |
| 11 | CC=cc |
| 12 | CFLAGS=-std -w1 -I$(ZLIBINC) -O # -g -DPNG_DEBUG=1 |
| 13 | LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm |
| 14 | |
| 15 | #RANLIB=echo |
| 16 | RANLIB=ranlib |
| 17 | |
| 18 | # where make install puts libpng.a and png.h |
| 19 | prefix=/usr/local |
| 20 | |
| 21 | OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ |
| 22 | pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ |
| 23 | pngwtran.o pngmem.o pngerror.o pngpread.o |
| 24 | |
| 25 | all: libpng.a pngtest |
| 26 | |
| 27 | libpng.a: $(OBJS) |
| 28 | ar rc $@ $(OBJS) |
| 29 | $(RANLIB) $@ |
| 30 | |
| 31 | pngtest: pngtest.o libpng.a |
| 32 | $(CC) -o pngtest $(CCFLAGS) pngtest.o $(LDFLAGS) |
| 33 | |
| 34 | test: pngtest |
| 35 | ./pngtest |
| 36 | |
| 37 | install: libpng.a |
| 38 | -@mkdir $(prefix)/include |
| 39 | -@mkdir $(prefix)/lib |
| 40 | cp png.h $(prefix)/include |
| 41 | cp pngconf.h $(prefix)/include |
| 42 | chmod 644 $(prefix)/include/png.h |
| 43 | chmod 644 $(prefix)/include/pngconf.h |
| 44 | cp libpng.a $(prefix)/lib |
| 45 | chmod 644 $(prefix)/lib/libpng.a |
| 46 | |
| 47 | clean: |
| 48 | rm -f *.o libpng.a pngtest pngout.png |
| 49 | |
| 50 | # DO NOT DELETE THIS LINE -- make depend depends on it. |
| 51 | |
| 52 | png.o: png.h pngconf.h |
| 53 | pngerror.o: png.h pngconf.h |
| 54 | pngrio.o: png.h pngconf.h |
| 55 | pngwio.o: png.h pngconf.h |
| 56 | pngmem.o: png.h pngconf.h |
| 57 | pngset.o: png.h pngconf.h |
| 58 | pngget.o: png.h pngconf.h |
| 59 | pngread.o: png.h pngconf.h |
| 60 | pngrtran.o: png.h pngconf.h |
| 61 | pngrutil.o: png.h pngconf.h |
| 62 | pngtest.o: png.h pngconf.h |
| 63 | pngtrans.o: png.h pngconf.h |
| 64 | pngwrite.o: png.h pngconf.h |
| 65 | pngwtran.o: png.h pngconf.h |
| 66 | pngwutil.o: png.h pngconf.h |
| 67 | pngpread.o: png.h pngconf.h |
| 68 | |