]> git.saurik.com Git - wxWidgets.git/blame - src/png/scripts/makefile.aix
log changes
[wxWidgets.git] / src / png / scripts / makefile.aix
CommitLineData
c6b71bff
GD
1# makefile for libpng using gcc (generic, static library)
2# Copyright (C) 2002 Glenn Randers-Pehrson
3# Copyright (C) 2000 Cosmin Truta
4# Copyright (C) 2000 Marc O. Gloor (AIX support added, from makefile.gcc)
5# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
6# For conditions of distribution and use, see copyright notice in png.h
7
8# Location of the zlib library and include files
9ZLIBINC = ../zlib
10ZLIBLIB = ../zlib
11
12# Compiler, linker, lib and other tools
13CC = gcc
14LD = $(CC)
15AR = ar rcs
16RANLIB = ranlib
17RM = rm -f
18
19PNGMAJ = 0
20PNGMIN = 1.2.4
21PNGVER = $(PNGMAJ).$(PNGMIN)
22
23prefix=/usr/local
24INCPATH=$(prefix)/include
25LIBPATH=$(prefix)/lib
26
27# override DESTDIR= on the make install command line to easily support
28# installing into a temporary location. Example:
29#
30# make install DESTDIR=/tmp/build/libpng
31#
32# If you're going to install into a temporary location
33# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
34# you execute make install.
35DESTDIR=
36
37DI=$(DESTDIR)/$(INCPATH)
38DL=$(DESTDIR)/$(LIBPATH)
39
40CDEBUG = -g -DPNG_DEBUG=5
41LDDEBUG =
42CRELEASE = -O2
43LDRELEASE = -s
44CFLAGS = -I$(ZLIBINC) -Wall $(CRELEASE)
45LDFLAGS = -L. -L$(ZLIBLIB) -lpng -lz -lm $(LDRELEASE)
46
47# File extensions
48O=.o
49A=.a
50E=
51
52# Variables
53OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \
54 pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \
55 pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O)
56
57# Targets
58all: libpng$(A) pngtest$(E)
59
60libpng$(A): $(OBJS)
61 $(AR) $@ $(OBJS)
62 $(RANLIB) $@
63
64test: pngtest$(E)
65 ./pngtest$(E)
66
67pngtest$(E): pngtest$(O) libpng$(A)
68 $(LD) -o $@ pngtest$(O) $(LDFLAGS)
69
70install: libpng.a
71 -@if [ ! -d $(DI) ]; then mkdir $(DI); fi
72 -@if [ ! -d $(DI)/libpng ]; then mkdir $(DI)/libpng; fi
73 -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
74 -@rm $(DI)/png.h
75 -@rm $(DI)/pngconf.h
76 cp png.h pngconf.h $(DI)/libpng
77 chmod 644 $(DI)/libpng/png.h \
78 $(DI)/libpng/pngconf.h
79 (cd $(DI); ln -f -s libpng/* .)
80 cp libpng.a $(DL)
81
82clean:
83 /bin/rm -f *.o libpng.a pngtest pngout.png
84
85png$(O): png.h pngconf.h
86pngerror$(O): png.h pngconf.h
87pngget$(O): png.h pngconf.h
88pngmem$(O): png.h pngconf.h
89pngpread$(O): png.h pngconf.h
90pngread$(O): png.h pngconf.h
91pngrio$(O): png.h pngconf.h
92pngrtran$(O): png.h pngconf.h
93pngrutil$(O): png.h pngconf.h
94pngset$(O): png.h pngconf.h
95pngtest$(O): png.h pngconf.h
96pngtrans$(O): png.h pngconf.h
97pngwio$(O): png.h pngconf.h
98pngwrite$(O): png.h pngconf.h
99pngwtran$(O): png.h pngconf.h
100pngwutil$(O): png.h pngconf.h
101