]>
Commit | Line | Data |
---|---|---|
d5e7ffcf KO |
1 | # makefile for libpng using gcc (generic, static library)\r |
2 | # Copyright (C) 2008 Glenn Randers-Pehrson\r | |
3 | # Copyright (C) 2000 Cosmin Truta\r | |
4 | # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.\r | |
b61cc19c PC |
5 | #\r |
6 | # This code is released under the libpng license.\r | |
7 | # For conditions of distribution and use, see the disclaimer\r | |
8 | # and license in png.h\r | |
d5e7ffcf KO |
9 | \r |
10 | # Location of the zlib library and include files\r | |
11 | ZLIBINC = ../zlib\r | |
12 | ZLIBLIB = ../zlib\r | |
13 | \r | |
14 | # Compiler, linker, lib and other tools\r | |
15 | CC = gcc\r | |
16 | LD = $(CC)\r | |
17 | AR_RC = ar rcs\r | |
18 | RANLIB = ranlib\r | |
19 | RM_F = rm -f\r | |
20 | \r | |
21 | CDEBUG = -g -DPNG_DEBUG=5\r | |
22 | LDDEBUG =\r | |
23 | CRELEASE = -O2\r | |
24 | LDRELEASE = -s\r | |
25 | #CFLAGS = -W -Wall $(CDEBUG)\r | |
26 | CFLAGS = -W -Wall $(CRELEASE)\r | |
27 | #LDFLAGS = $(LDDEBUG)\r | |
28 | LDFLAGS = $(LDRELEASE)\r | |
29 | LIBS = -lz -lm\r | |
30 | \r | |
31 | # File extensions\r | |
32 | O=.o\r | |
33 | A=.a\r | |
34 | EXE=\r | |
35 | \r | |
36 | # Variables\r | |
b61cc19c PC |
37 | OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \\r |
38 | pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \\r | |
39 | pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O)\r | |
d5e7ffcf KO |
40 | \r |
41 | # Targets\r | |
42 | all: static\r | |
43 | \r | |
44 | .c$(O):\r | |
45 | $(CC) -c $(CFLAGS) -I$(ZLIBINC) $<\r | |
46 | \r | |
47 | static: libpng$(A) pngtest$(EXE)\r | |
48 | \r | |
49 | shared:\r | |
50 | @echo This is a generic makefile that cannot create shared libraries.\r | |
51 | @echo Please use a configuration that is specific to your platform.\r | |
52 | @false\r | |
53 | \r | |
54 | libpng$(A): $(OBJS)\r | |
55 | $(AR_RC) $@ $(OBJS)\r | |
56 | $(RANLIB) $@\r | |
57 | \r | |
58 | test: pngtest$(EXE)\r | |
59 | ./pngtest$(EXE)\r | |
60 | \r | |
61 | pngtest$(EXE): pngtest$(O) libpng$(A)\r | |
62 | $(LD) $(LDFLAGS) -L$(ZLIBLIB) -o $@ pngtest$(O) libpng$(A) $(LIBS)\r | |
63 | \r | |
64 | clean:\r | |
65 | $(RM_F) *$(O) libpng$(A) pngtest$(EXE) pngout.png\r | |
66 | \r | |
b61cc19c PC |
67 | png$(O): png.h pngconf.h pngpriv.h\r |
68 | pngerror$(O): png.h pngconf.h pngpriv.h\r | |
69 | pngget$(O): png.h pngconf.h pngpriv.h\r | |
70 | pngmem$(O): png.h pngconf.h pngpriv.h\r | |
71 | pngpread$(O): png.h pngconf.h pngpriv.h\r | |
72 | pngread$(O): png.h pngconf.h pngpriv.h\r | |
73 | pngrio$(O): png.h pngconf.h pngpriv.h\r | |
74 | pngrtran$(O): png.h pngconf.h pngpriv.h\r | |
75 | pngrutil$(O): png.h pngconf.h pngpriv.h\r | |
76 | pngset$(O): png.h pngconf.h pngpriv.h\r | |
77 | pngtrans$(O): png.h pngconf.h pngpriv.h\r | |
78 | pngwio$(O): png.h pngconf.h pngpriv.h\r | |
79 | pngwrite$(O): png.h pngconf.h pngpriv.h\r | |
80 | pngwtran$(O): png.h pngconf.h pngpriv.h\r | |
81 | pngwutil$(O): png.h pngconf.h pngpriv.h\r | |
d5e7ffcf | 82 | \r |
b61cc19c | 83 | pngtest$(O): png.h pngconf.h\r |