]>
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 | |
9c0d9ce3 DS |
44 | # see scripts/pnglibconf.mak for more options\r |
45 | pnglibconf.h: scripts/pnglibconf.h.prebuilt\r | |
46 | cp scripts/pnglibconf.h.prebuilt $@\r | |
47 | \r | |
d5e7ffcf KO |
48 | .c$(O):\r |
49 | $(CC) -c $(CFLAGS) -I$(ZLIBINC) $<\r | |
50 | \r | |
51 | static: libpng$(A) pngtest$(EXE)\r | |
52 | \r | |
53 | shared:\r | |
54 | @echo This is a generic makefile that cannot create shared libraries.\r | |
55 | @echo Please use a configuration that is specific to your platform.\r | |
56 | @false\r | |
57 | \r | |
58 | libpng$(A): $(OBJS)\r | |
59 | $(AR_RC) $@ $(OBJS)\r | |
60 | $(RANLIB) $@\r | |
61 | \r | |
62 | test: pngtest$(EXE)\r | |
63 | ./pngtest$(EXE)\r | |
64 | \r | |
65 | pngtest$(EXE): pngtest$(O) libpng$(A)\r | |
66 | $(LD) $(LDFLAGS) -L$(ZLIBLIB) -o $@ pngtest$(O) libpng$(A) $(LIBS)\r | |
67 | \r | |
68 | clean:\r | |
9c0d9ce3 DS |
69 | $(RM_F) *$(O) libpng$(A) pngtest$(EXE) pngout.png pnglibconf.h\r |
70 | \r | |
71 | png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h\r | |
72 | pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h\r | |
73 | pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h\r | |
74 | pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h\r | |
75 | pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h\r | |
76 | pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h\r | |
77 | pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h\r | |
78 | pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h\r | |
79 | pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h\r | |
80 | pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h\r | |
81 | pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h\r | |
82 | pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h\r | |
83 | pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h\r | |
84 | pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h\r | |
85 | pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h\r | |
86 | \r | |
87 | pngtest$(O): png.h pngconf.h pnglibconf.h\r |