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