blob: f7fc3687447e69d03818e86419e3676806cdbe61 [file] [log] [blame]
Glenn Randers-Pehrson520a7642000-03-21 05:13:06 -06001# makefile for libpng using gcc (generic, static library)
Glenn Randers-Pehrson520a7642000-03-21 05:13:06 -06002# Copyright (C) 2000 Cosmin Truta
Glenn Randers-Pehrsond4366722000-06-04 14:29:29 -05003# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
Glenn Randers-Pehrson520a7642000-03-21 05:13:06 -06004# For conditions of distribution and use, see copyright notice in png.h
5
6# Location of the zlib library and include files
7ZLIBINC = ../zlib
8ZLIBLIB = ../zlib
9
10# Compiler, linker, lib and other tools
11CC = gcc
12LD = $(CC)
13AR = ar rcs
14RANLIB = ranlib
15RM = rm -f
16
17CDEBUG = -g -DPNG_DEBUG=5
18LDDEBUG =
19CRELEASE = -O2
20LDRELEASE = -s
21CFLAGS = -I$(ZLIBINC) -Wall $(CRELEASE)
22LDFLAGS = -L. -L$(ZLIBLIB) -lpng -lz -lm $(LDRELEASE)
23
24# File extensions
25O=.o
26A=.a
27E=
28
29# Variables
30OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \
31 pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \
32 pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O)
33
34# Targets
35all: libpng$(A) pngtest$(E)
36
37libpng$(A): $(OBJS)
38 $(AR) $@ $(OBJS)
39 $(RANLIB) $@
40
41test: pngtest$(E)
42 ./pngtest$(E)
43
44pngtest$(E): pngtest$(O) libpng$(A)
45 $(LD) -o $@ pngtest$(O) $(LDFLAGS)
46
47clean:
48 $(RM) *$(O) libpng$(A) pngtest$(E) pngout.png
49
50png$(O): png.h pngconf.h
51pngerror$(O): png.h pngconf.h
52pngget$(O): png.h pngconf.h
53pngmem$(O): png.h pngconf.h
54pngpread$(O): png.h pngconf.h
55pngread$(O): png.h pngconf.h
56pngrio$(O): png.h pngconf.h
57pngrtran$(O): png.h pngconf.h
58pngrutil$(O): png.h pngconf.h
59pngset$(O): png.h pngconf.h
60pngtest$(O): png.h pngconf.h
61pngtrans$(O): png.h pngconf.h
62pngwio$(O): png.h pngconf.h
63pngwrite$(O): png.h pngconf.h
64pngwtran$(O): png.h pngconf.h
65pngwutil$(O): png.h pngconf.h
66