]> git.saurik.com Git - wxWidgets.git/blame - src/png/scripts/makefile.sco
Invoke default action if dclick event after <ENTER> not handled in wxListBox, added...
[wxWidgets.git] / src / png / scripts / makefile.sco
CommitLineData
0272a10d
VZ
1# makefile for SCO OSr5 ELF and Unixware 7 with Native cc
2# Contributed by Mike Hopkirk (hops@sco.com) modified from Makefile.lnx
3# force ELF build dynamic linking, SONAME setting in lib and RPATH in app
4# Copyright (C) 2002, 2006 Glenn Randers-Pehrson
5# Copyright (C) 1998 Greg Roelofs
6# Copyright (C) 1996, 1997 Andreas Dilger
7# For conditions of distribution and use, see copyright notice in png.h
8
9# Library name:
10LIBNAME = libpng12
11PNGMAJ = 0
12PNGMIN = 1.2.20
13PNGVER = $(PNGMAJ).$(PNGMIN)
14
15# Shared library names:
16LIBSO=$(LIBNAME).so
17LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
18LIBSOVER=$(LIBNAME).so.$(PNGVER)
19OLDSO=libpng.so
20OLDSOMAJ=libpng.so.3
21OLDSOVER=libpng.so.3.$(PNGMIN)
22
23# Utilities:
24CC=cc
25AR_RC=ar rc
26MKDIR_P=mkdir
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#ZLIBLIB=/usr/local/lib
37#ZLIBINC=/usr/local/include
38ZLIBLIB=../zlib
39ZLIBINC=../zlib
40
41CFLAGS= -dy -belf -I$(ZLIBINC) -O3 -DPNG_NO_MMX_CODE
42LDFLAGS=-L. -L$(ZLIBLIB) -lpng12 -lz -lm
43
44INCPATH=$(prefix)/include/libpng
45LIBPATH=$(exec_prefix)/lib
46MANPATH=$(prefix)/man
47BINPATH=$(exec_prefix)/bin
48
49# override DESTDIR= on the make install command line to easily support
50# installing into a temporary location. Example:
51#
52# make install DESTDIR=/tmp/build/libpng
53#
54# If you're going to install into a temporary location
55# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
56# you execute make install.
57DESTDIR=
58
59DB=$(DESTDIR)$(BINPATH)
60DI=$(DESTDIR)$(INCPATH)
61DL=$(DESTDIR)$(LIBPATH)
62DM=$(DESTDIR)$(MANPATH)
63
64OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
65 pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
66 pngwtran.o pngmem.o pngerror.o pngpread.o
67
68OBJSDLL = $(OBJS:.o=.pic.o)
69
70.SUFFIXES: .c .o .pic.o
71
72.c.pic.o:
73 $(CC) -c $(CFLAGS) -KPIC -o $@ $*.c
74
75all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
76
77libpng.a: $(OBJS)
78 $(AR_RC) $@ $(OBJS)
79 $(RANLIB) $@
80
81libpng.pc:
82 cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
83
84libpng-config:
85 ( cat scripts/libpng-config-head.in; \
86 echo prefix=\"$(prefix)\"; \
87 echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
88 echo ccopts=\"-belf\"; \
89 echo L_opts=\"-L$(LIBPATH)\"; \
90 echo libs=\"-lpng12 -lz -lm\"; \
91 cat scripts/libpng-config-body.in ) > libpng-config
92 chmod +x libpng-config
93
94$(LIBSO): $(LIBSOMAJ)
95 $(LN_SF) $(LIBSOMAJ) $(LIBSO)
96
97$(LIBSOMAJ): $(LIBSOVER)
98 $(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
99
100$(LIBSOVER): $(OBJSDLL)
101 $(CC) -G -Wl,-h,$(LIBSOMAJ) -o $(LIBSOVER) \
102 $(OBJSDLL)
103
104$(OLDSOVER): $(OBJSDLL)
105 $(CC) -G -Wl,-h,$(OLDSOMAJ) -o $(OLDSOVER) \
106 $(OBJSDLL)
107
108pngtest: pngtest.o $(LIBSO)
109 LD_RUN_PATH=.:$(ZLIBLIB) $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
110
111test: pngtest
112 ./pngtest
113
114install-headers: png.h pngconf.h
115 -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
116 -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
117 -@$(RM_F) $(DI)/png.h
118 -@$(RM_F) $(DI)/pngconf.h
119 cp png.h pngconf.h $(DI)/$(LIBNAME)
120 chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
121 -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h
122 -@$(RM_F) $(DI)/libpng
123 (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
124
125install-static: install-headers libpng.a
126 -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
127 cp libpng.a $(DL)/$(LIBNAME).a
128 chmod 644 $(DL)/$(LIBNAME).a
129 -@$(RM_F) $(DL)/libpng.a
130 (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
131
132install-shared: install-headers $(LIBSOVER) libpng.pc \
133 $(OLDSOVER)
134 -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
135 -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO)
136 -@$(RM_F) $(DL)/$(LIBSOMAJ)
137 -@$(RM_F) $(DL)/$(OLDSO)
138 -@$(RM_F) $(DL)/$(OLDSOMAJ)
139 -@$(RM_F) $(DL)/$(OLDSOVER)*
140 cp $(LIBSOVER) $(DL)
141 cp $(OLDSOVER) $(DL)
142 chmod 755 $(DL)/$(LIBSOVER)
143 chmod 755 $(DL)/$(OLDSOVER)
144 (cd $(DL); \
145 $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \
146 $(LN_SF) $(OLDSOMAJ) $(OLDSO); \
147 $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \
148 $(LN_SF) $(LIBSOMAJ) $(LIBSO))
149 -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
150 -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
151 -@$(RM_F) $(DL)/pkgconfig/libpng.pc
152 cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
153 chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
154 (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
155
156install-man: libpng.3 libpngpf.3 png.5
157 -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
158 -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
159 -@$(RM_F) $(DM)/man3/libpng.3
160 -@$(RM_F) $(DM)/man3/libpngpf.3
161 cp libpng.3 $(DM)/man3
162 cp libpngpf.3 $(DM)/man3
163 -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
164 -@$(RM_F) $(DM)/man5/png.5
165 cp png.5 $(DM)/man5
166
167install-config: libpng-config
168 -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
169 -@$(RM_F) $(DB)/libpng-config
170 -@$(RM_F) $(DB)/$(LIBNAME)-config
171 cp libpng-config $(DB)/$(LIBNAME)-config
172 chmod 755 $(DB)/$(LIBNAME)-config
173 (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
174
175install: install-static install-shared install-man install-config
176
177# If you installed in $(DESTDIR), test-installed won't work until you
178# move the library to its final location. Use test-dd to test it
179# before then.
180
181test-dd:
182 echo
183 echo Testing installed dynamic shared library in $(DL).
184 $(CC) -I$(DI) $(CFLAGS) \
185 `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
186 -L$(DL) -L$(ZLIBLIB) \
187 -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
188 ./pngtestd pngtest.png
189
190test-installed:
191 $(CC) $(CFLAGS) \
192 `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
193 -L$(ZLIBLIB) \
194 -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
195 ./pngtesti pngtest.png
196
197clean:
198 $(RM_F) *.o libpng.a pngtest pngout.png libpng-config \
199 $(LIBSO) $(LIBSOMAJ)* pngtest-static pngtesti \
200 $(OLDSOVER) \
201 libpng.pc
202
203DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
204writelock:
205 chmod a-w *.[ch35] $(DOCS) scripts/*
206
207# DO NOT DELETE THIS LINE -- make depend depends on it.
208
209png.o png.pic.o: png.h pngconf.h
210pngerror.o pngerror.pic.o: png.h pngconf.h
211pngrio.o pngrio.pic.o: png.h pngconf.h
212pngwio.o pngwio.pic.o: png.h pngconf.h
213pngmem.o pngmem.pic.o: png.h pngconf.h
214pngset.o pngset.pic.o: png.h pngconf.h
215pngget.o pngget.pic.o: png.h pngconf.h
216pngread.o pngread.pic.o: png.h pngconf.h
217pngrtran.o pngrtran.pic.o: png.h pngconf.h
218pngrutil.o pngrutil.pic.o: png.h pngconf.h
219pngtrans.o pngtrans.pic.o: png.h pngconf.h
220pngwrite.o pngwrite.pic.o: png.h pngconf.h
221pngwtran.o pngwtran.pic.o: png.h pngconf.h
222pngwutil.o pngwutil.pic.o: png.h pngconf.h
223pngpread.o pngpread.pic.o: png.h pngconf.h
224
225pngtest.o: png.h pngconf.h