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