]>
Commit | Line | Data |
---|---|---|
c801d85f KB |
1 | # makefile for libpng |
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 | ||
13 | CFLAGS=-I$(ZLIBINC) -O -fullwarn # -g -DPNG_DEBUG=1 | |
14 | LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm | |
15 | ||
16 | RANLIB=echo | |
17 | #RANLIB=ranlib | |
18 | ||
19 | # where make install puts libpng.a and png.h | |
20 | prefix=/usr/local | |
21 | ||
22 | OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \ | |
23 | pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \ | |
24 | pngwtran.o pngmem.o pngerror.o pngpread.o | |
25 | ||
26 | all: libpng.a pngtest | |
27 | ||
28 | libpng.a: $(OBJS) | |
29 | ar rc $@ $(OBJS) | |
30 | $(RANLIB) $@ | |
31 | ||
32 | pngtest: pngtest.o libpng.a | |
33 | $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS) | |
34 | ||
35 | test: pngtest | |
36 | ./pngtest | |
37 | ||
38 | install: libpng.a | |
39 | -@mkdir $(prefix)/include | |
40 | -@mkdir $(prefix)/lib | |
41 | cp png.h $(prefix)/include | |
42 | cp pngconf.h $(prefix)/include | |
43 | chmod 644 $(prefix)/include/png.h | |
44 | chmod 644 $(prefix)/include/pngconf.h | |
45 | cp libpng.a $(prefix)/lib | |
46 | chmod 644 $(prefix)/lib/libpng.a | |
47 | ||
48 | clean: | |
49 | rm -f *.o libpng.a pngtest pngout.png | |
50 | ||
51 | # DO NOT DELETE THIS LINE -- make depend depends on it. | |
52 | ||
53 | png.o: png.h pngconf.h | |
54 | pngerror.o: png.h pngconf.h | |
55 | pngrio.o: png.h pngconf.h | |
56 | pngwio.o: png.h pngconf.h | |
57 | pngmem.o: png.h pngconf.h | |
58 | pngset.o: png.h pngconf.h | |
59 | pngget.o: png.h pngconf.h | |
60 | pngread.o: png.h pngconf.h | |
61 | pngrtran.o: png.h pngconf.h | |
62 | pngrutil.o: png.h pngconf.h | |
63 | pngtest.o: png.h pngconf.h | |
64 | pngtrans.o: png.h pngconf.h | |
65 | pngwrite.o: png.h pngconf.h | |
66 | pngwtran.o: png.h pngconf.h | |
67 | pngwutil.o: png.h pngconf.h | |
68 | pngpread.o: png.h pngconf.h | |
69 |