]> git.saurik.com Git - wxWidgets.git/blame_incremental - src/png/scripts/makefile.so9
Rename delegates to try and stop name clashes, probably with wxWebKitCtrl.
[wxWidgets.git] / src / png / scripts / makefile.so9
... / ...
CommitLineData
1# makefile for libpng on Solaris 9 (beta) with Forte cc
2# Updated by Chad Schrock for Solaris 9
3# Contributed by William L. Sebok, based on makefile.linux
4# Copyright (C) 2002, 2006, 2008, 2010 Glenn Randers-Pehrson
5# Copyright (C) 1998-2001 Greg Roelofs
6# Copyright (C) 1996-1997 Andreas Dilger
7#
8# This code is released under the libpng license.
9# For conditions of distribution and use, see the disclaimer
10# and license in png.h
11
12# Library name:
13PNGMAJ = 14
14LIBNAME = libpng14
15
16# Shared library names:
17LIBSO=$(LIBNAME).so
18LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
19LIBSOREL=$(LIBSOMAJ).$(RELEASE)
20OLDSO=libpng.so
21
22# Utilities:
23# gcc 2.95 doesn't work.
24CC=cc
25AR_RC=ar rc
26MKDIR_P=mkdir -p
27LN_SF=ln -f -s
28RANLIB=echo
29RM_F=/bin/rm -f
30
31# Where make install puts libpng.a, $(OLDSO)*, and png.h
32prefix=/usr/local
33exec_prefix=$(prefix)
34
35# Where the zlib library and include files are located
36# Changing these to ../zlib poses a security risk. If you want
37# to have zlib in an adjacent directory, specify the full path instead of "..".
38#ZLIBLIB=../zlib
39#ZLIBINC=../zlib
40#ZLIBLIB=/usr/local/lib
41#ZLIBINC=/usr/local/include
42#Use the preinstalled zlib that comes with Solaris 9:
43ZLIBLIB=/usr/lib
44ZLIBINC=/usr/include
45
46#WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
47 -Wmissing-declarations -Wtraditional -Wcast-align \
48 -Wstrict-prototypes -Wmissing-prototypes #-Wconversion
49#CFLAGS=-I$(ZLIBINC) -W -Wall -O3 $(WARNMORE) -g -DPNG_DEBUG=5 -DPNG_NO_MMX_CODE
50CFLAGS=-I$(ZLIBINC) -O3 -DPNG_NO_MMX_CODE
51LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng14 -lz -lm
52
53INCPATH=$(prefix)/include
54LIBPATH=$(exec_prefix)/lib
55MANPATH=$(prefix)/man
56BINPATH=$(exec_prefix)/bin
57
58# override DESTDIR= on the make install command line to easily support
59# installing into a temporary location. Example:
60#
61# make install DESTDIR=/tmp/build/libpng
62#
63# If you're going to install into a temporary location
64# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
65# you execute make install.
66DESTDIR=
67
68DB=$(DESTDIR)$(BINPATH)
69DI=$(DESTDIR)$(INCPATH)
70DL=$(DESTDIR)$(LIBPATH)
71DM=$(DESTDIR)$(MANPATH)
72
73OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
74 pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
75 pngwtran.o pngmem.o pngerror.o pngpread.o
76
77OBJSDLL = $(OBJS:.o=.pic.o)
78
79.SUFFIXES: .c .o .pic.o
80
81.c.pic.o:
82 $(CC) -c $(CFLAGS) -KPIC -o $@ $*.c
83
84all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
85
86libpng.a: $(OBJS)
87 $(AR_RC) $@ $(OBJS)
88 $(RANLIB) $@
89
90libpng.pc:
91 cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
92 -e s!@exec_prefix@!$(exec_prefix)! \
93 -e s!@libdir@!$(LIBPATH)! \
94 -e s!@includedir@!$(INCPATH)! \
95 -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc
96
97libpng-config:
98 ( cat scripts/libpng-config-head.in; \
99 echo prefix=\"$(prefix)\"; \
100 echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
101 echo L_opts=\"-L$(LIBPATH)\"; \
102 echo R_opts=\"-R$(LIBPATH)\"; \
103 echo libs=\"-lpng14 -lz -lm\"; \
104 cat scripts/libpng-config-body.in ) > libpng-config
105 chmod +x libpng-config
106
107$(LIBSO): $(LIBSOMAJ)
108 $(LN_SF) $(LIBSOMAJ) $(LIBSO)
109
110$(LIBSOMAJ): $(OBJSDLL)
111 @case "`type ld`" in *ucb*) \
112 echo; \
113 echo '## WARNING:'; \
114 echo '## The commands "CC" and "LD" must NOT refer to /usr/ucb/cc'; \
115 echo '## and /usr/ucb/ld. If they do, you need to adjust your PATH'; \
116 echo '## environment variable to put /usr/ccs/bin ahead of /usr/ucb.'; \
117 echo '## The environment variable LD_LIBRARY_PATH should not be set'; \
118 echo '## at all. If it is, things are likely to break because of'; \
119 echo '## the libucb dependency that is created.'; \
120 echo; \
121 ;; \
122 esac
123 $(LD) -G -h $(LIBSOMAJ) \
124 -o $(LIBSOMAJ) $(OBJSDLL)
125
126pngtest: pngtest.o $(LIBSO)
127 $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
128
129test: pngtest
130 ./pngtest
131
132install-headers: png.h pngconf.h
133 -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
134 -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
135 cp png.h pngconf.h $(DI)/$(LIBNAME)
136 chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
137 -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h
138 -@$(RM_F) $(DI)/libpng
139 (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
140
141install-static: install-headers libpng.a
142 -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
143 cp libpng.a $(DL)/$(LIBNAME).a
144 chmod 644 $(DL)/$(LIBNAME).a
145 -@$(RM_F) $(DL)/libpng.a
146 (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
147
148install-shared: install-headers $(LIBSOMAJ) libpng.pc
149 -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
150 -@$(RM_F) $(DL)/$(LIBSO)
151 -@$(RM_F) $(DL)/$(LIBSOREL)
152 -@$(RM_F) $(DL)/$(OLDSO)
153 cp $(LIBSOMAJ) $(DL)/$(LIBSOREL)
154 chmod 755 $(DL)/$(LIBSOREL)
155 (cd $(DL); \
156 $(LN_SF) $(LIBSOREL) $(LIBSO); \
157 $(LN_SF) $(LIBSO) $(OLDSO))
158 -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
159 -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
160 -@$(RM_F) $(DL)/pkgconfig/libpng.pc
161 cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
162 chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
163 (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
164
165install-man: libpng.3 libpngpf.3 png.5
166 -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
167 -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
168 -@$(RM_F) $(DM)/man3/libpng.3
169 -@$(RM_F) $(DM)/man3/libpngpf.3
170 cp libpng.3 $(DM)/man3
171 cp libpngpf.3 $(DM)/man3
172 -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
173 -@$(RM_F) $(DM)/man5/png.5
174 cp png.5 $(DM)/man5
175
176install-config: libpng-config
177 -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
178 -@$(RM_F) $(DB)/libpng-config
179 -@$(RM_F) $(DB)/$(LIBNAME)-config
180 cp libpng-config $(DB)/$(LIBNAME)-config
181 chmod 755 $(DB)/$(LIBNAME)-config
182 (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
183
184install: install-static install-shared install-man install-config
185
186# If you installed in $(DESTDIR), test-installed won't work until you
187# move the library to its final location. Use test-dd to test it
188# before then.
189
190test-dd:
191 echo
192 echo Testing installed dynamic shared library in $(DL).
193 $(CC) -I$(DI) -I$(ZLIBINC) \
194 `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
195 -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` \
196 -L$(DL) -L$(ZLIBLIB) -R$(ZLIBLIB) -R$(DL)
197 ./pngtestd pngtest.png
198
199test-installed:
200 echo
201 echo Testing installed dynamic shared library.
202 $(CC) -I$(ZLIBINC) \
203 `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
204 -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \
205 -L$(ZLIBLIB) -R$(ZLIBLIB)
206 ./pngtesti pngtest.png
207
208clean:
209 $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \
210 libpng-config $(LIBSO) $(LIBSOMAJ)* \
211 libpng.pc
212
213DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
214writelock:
215 chmod a-w *.[ch35] $(DOCS) scripts/*
216
217# DO NOT DELETE THIS LINE -- make depend depends on it.
218
219png.o png.pic.o: png.h pngconf.h pngpriv.h
220pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h
221pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h
222pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h
223pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h
224pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h
225pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h
226pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h
227pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h
228pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h
229pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h
230pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h
231pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h
232pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h
233pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h
234
235pngtest.o: png.h pngconf.h