]> git.saurik.com Git - wxWidgets.git/blame - src/png/scripts/makefile.dec
Fix item selection/focus drawing in generic wxListCtrl.
[wxWidgets.git] / src / png / scripts / makefile.dec
CommitLineData
0272a10d
VZ
1# makefile for libpng on DEC Alpha Unix
2# Copyright (C) 2000-2002, 2006 Glenn Randers-Pehrson
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# Library name:
7PNGMAJ = 0
970f6abe 8PNGMIN = 1.2.34
0272a10d
VZ
9PNGVER = $(PNGMAJ).$(PNGMIN)
10LIBNAME = libpng12
11
12# Shared library names:
13LIBSO=$(LIBNAME).so
14LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
15LIBSOVER=$(LIBNAME).so.$(PNGVER)
16OLDSO=libpng.so
17OLDSOMAJ=libpng.so.3
18OLDSOVER=libpng.so.3.$(PNGMIN)
19
20# Utilities:
21AR_RC=ar rc
22CC=cc
23MKDIR_P=mkdir
24LN_SF=ln -f -s
25RANLIB=ranlib
26RM_F=/bin/rm -f
27
28# where make install puts libpng.a and png.h
29prefix=/usr/local
30exec_prefix=$(prefix)
31INCPATH=$(prefix)/include
32LIBPATH=$(exec_prefix)/lib
33MANPATH=$(prefix)/man
34BINPATH=$(exec_prefix)/bin
35
36# override DESTDIR= on the make install command line to easily support
37# installing into a temporary location. Example:
38#
39# make install DESTDIR=/tmp/build/libpng
40#
41# If you're going to install into a temporary location
42# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
43# you execute make install.
44DESTDIR=
45
46DB=$(DESTDIR)$(BINPATH)
47DI=$(DESTDIR)$(INCPATH)
48DL=$(DESTDIR)$(LIBPATH)
49DM=$(DESTDIR)$(MANPATH)
50
51# Where the zlib library and include files are located
52#ZLIBLIB=/usr/local/lib
53#ZLIBINC=/usr/local/include
54ZLIBLIB=../zlib
55ZLIBINC=../zlib
56
57CFLAGS=-std -w1 -I$(ZLIBINC) -O # -g -DPNG_DEBUG=1
58LDFLAGS=-L$(ZLIBLIB) -rpath $(ZLIBLIB) libpng.a -lz -lm
59
60OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
61 pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
62 pngwtran.o pngmem.o pngerror.o pngpread.o
63
64all: $(LIBSO) libpng.a pngtest libpng.pc libpng-config
65
66libpng.a: $(OBJS)
67 $(AR_RC) $@ $(OBJS)
68 $(RANLIB) $@
69
70libpng.pc:
970f6abe
VZ
71 cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
72 -e s!@exec_prefix@!$(exec_prefix)! \
73 -e s!@libdir@!$(LIBPATH)! \
74 -e s!@includedir@!$(INCPATH)! \
75 -e s!-lpng12!-lpng12\ -lz\ -lm! > libpng.pc
0272a10d
VZ
76
77libpng-config:
78 ( cat scripts/libpng-config-head.in; \
79 echo prefix=\"$(prefix)\"; \
80 echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
81 echo ccopts=\"-std\"; \
82 echo L_opts=\"-L$(LIBPATH)\"; \
83 echo libs=\"-lpng12 -lz -lm\"; \
84 cat scripts/libpng-config-body.in ) > libpng-config
85 chmod +x libpng-config
86
87$(LIBSO): $(LIBSOMAJ)
88 $(LN_SF) $(LIBSOMAJ) $(LIBSO)
89
90$(LIBSOMAJ): $(LIBSOVER)
91 $(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
92
93$(LIBSOVER): $(OBJS)
94 $(CC) -shared -o $@ $(OBJS) -L$(ZLIBLIB) \
95 -soname $(LIBSOMAJ)
96
97$(OLDSOVER): $(OBJS)
98 $(CC) -shared -o $@ $(OBJS) -L$(ZLIBLIB) \
99 -soname $(OLDSOMAJ)
100
101pngtest: pngtest.o libpng.a
102 $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
103
104test: pngtest
105 ./pngtest
106
107install-headers: png.h pngconf.h
108 -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
109 -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
110 cp png.h pngconf.h $(DI)/$(LIBNAME)
111 chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
112 -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
113 -@/bin/rm -f $(DI)/libpng
114 (cd $(DI); $(LN_SF)(LIBNAME) libpng; $(LN_SF)(LIBNAME)/* .)
115
116install-static: install-headers libpng.a
117 -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
118 cp libpng.a $(DL)/$(LIBNAME).a
119 chmod 644 $(DL)/$(LIBNAME).a
120 -@/bin/rm -f $(DL)/libpng.a
121 (cd $(DL); $(LN_SF)(LIBNAME).a libpng.a)
122
123install-shared: install-headers $(LIBSOVER) libpng.pc \
124 $(OLDSOVER)
125 -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
126 -@/bin/rm -f $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO)
127 -@/bin/rm -f $(DL)/$(LIBSOMAJ)
128 -@/bin/rm -f $(DL)/$(OLDSO)
129 -@/bin/rm -f $(DL)/$(OLDSOMAJ)
130 -@/bin/rm -f $(DL)/$(OLDSOVER)*
131 cp $(LIBSOVER) $(DL)
132 cp $(OLDSOVER) $(DL)
133 chmod 755 $(DL)/$(LIBSOVER)
134 chmod 755 $(DL)/$(OLDSOVER)
135 (cd $(DL); \
136 $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \
137 $(LN_SF) $(OLDSOMAJ) $(OLDSO); \
138 $(LN_SF)(LIBSOVER) $(LIBSOMAJ); \
139 $(LN_SF)(LIBSOMAJ) $(LIBSO))
140 -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
141 -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
142 -@/bin/rm -f $(DL)/pkgconfig/libpng.pc
143 cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
144 chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
145 (cd $(DL)/pkgconfig; $(LN_SF)(LIBNAME).pc libpng.pc)
146
147install-man: libpng.3 libpngpf.3 png.5
148 -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
149 -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
150 -@/bin/rm -f $(DM)/man3/libpng.3
151 -@/bin/rm -f $(DM)/man3/libpngpf.3
152 cp libpng.3 $(DM)/man3
153 cp libpngpf.3 $(DM)/man3
154 -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
155 -@/bin/rm -f $(DM)/man5/png.5
156 cp png.5 $(DM)/man5
157
158install-config: libpng-config
159 -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
160 -@/bin/rm -f $(DB)/libpng-config
161 -@/bin/rm -f $(DB)/$(LIBNAME)-config
162 cp libpng-config $(DB)/$(LIBNAME)-config
163 chmod 755 $(DB)/$(LIBNAME)-config
164 (cd $(DB); $(LN_SF)(LIBNAME)-config libpng-config)
165
166install: install-static install-shared install-man install-config
167
168# If you installed in $(DESTDIR), test-installed won't work until you
169# move the library to its final location. Use test-dd to test it
170# before then.
171
172test-dd:
173 echo
174 echo Testing installed dynamic shared library in $(DL).
175 $(CC) -w1 -I$(DI) -I$(ZLIBINC) \
176 `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
177 -L$(DL) -L$(ZLIBLIB) -R$(ZLIBLIB) -R$(DL) \
178 -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
179 ./pngtestd pngtest.png
180
181test-installed:
182 echo
183 echo Testing installed dynamic shared library.
184 $(CC) -w1 -I$(ZLIBINC) \
185 `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
186 -L$(ZLIBLIB) -R$(ZLIBLIB) \
187 -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
188 ./pngtesti pngtest.png
189
190clean:
191 /bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \
192 libpng-config $(LIBSO) $(LIBSOMAJ)* \
193 $(OLDSOVER) \
194 libpng.pc
195
196# DO NOT DELETE THIS LINE -- make depend depends on it.
197
198png.o: png.h pngconf.h
199pngerror.o: png.h pngconf.h
200pngrio.o: png.h pngconf.h
201pngwio.o: png.h pngconf.h
202pngmem.o: png.h pngconf.h
203pngset.o: png.h pngconf.h
204pngget.o: png.h pngconf.h
205pngread.o: png.h pngconf.h
206pngrtran.o: png.h pngconf.h
207pngrutil.o: png.h pngconf.h
208pngtest.o: png.h pngconf.h
209pngtrans.o: png.h pngconf.h
210pngwrite.o: png.h pngconf.h
211pngwtran.o: png.h pngconf.h
212pngwutil.o: png.h pngconf.h
213pngpread.o: png.h pngconf.h
214