]> git.saurik.com Git - wxWidgets.git/blame_incremental - src/png/scripts/makefile.beos
Add missing WXK constants for the control keys
[wxWidgets.git] / src / png / scripts / makefile.beos
... / ...
CommitLineData
1# makefile for libpng on BeOS x86 ELF with gcc
2# modified from makefile.linux by Sander Stoks
3# Copyright (C) 2002, 2006, 2008, 2010-2011 Glenn Randers-Pehrson
4# Copyright (C) 1999 Greg Roelofs
5# Copyright (C) 1996, 1997 Andreas Dilger
6#
7# This code is released under the libpng license.
8# For conditions of distribution and use, see the disclaimer
9# and license in png.h
10
11# Library name:
12LIBNAME=libpng15
13PNGMAJ = 15
14
15# Shared library names:
16LIBSO=$(LIBNAME).so
17LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
18LIBSOREL=$(LIBSOMAJ).$(RELEASE)
19OLDSO=libpng.so
20
21# Utilities:
22CC=gcc
23AR_RC=ar rc
24MKDIR_P=mkdir -p
25LN_SF=ln -sf
26RANLIB=ranlib
27RM_F=/bin/rm -f
28
29# Where the zlib library and include files are located
30ZLIBLIB=/usr/local/lib
31ZLIBINC=/usr/local/include
32
33ALIGN=
34# For i386:
35# ALIGN=-malign-loops=2 -malign-functions=2
36
37WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
38 -Wmissing-declarations -Wtraditional -Wcast-align \
39 -Wstrict-prototypes -Wmissing-prototypes #-Wconversion
40
41# On BeOS, -O1 is actually better than -O3. This is a known bug but it's
42# still here in R4.5
43CFLAGS=-I$(ZLIBINC) -W -Wall -O1 -funroll-loops \
44 $(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
45# LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng -lz
46LDFLAGS=-L. -Wl,-soname=$(LIBSOMAJ) -L$(ZLIBLIB) -lz
47
48# where make install puts libpng.a, libpng15.so*, and png.h
49prefix=/usr/local
50exec_prefix=$(prefix)
51INCPATH=$(prefix)/include
52LIBPATH=$(exec_prefix)/lib
53MANPATH=$(prefix)/man
54BINPATH=$(exec_prefix)/bin
55
56# override DESTDIR= on the make install command line to easily support
57# installing into a temporary location. Example:
58#
59# make install DESTDIR=/tmp/build/libpng
60#
61# If you're going to install into a temporary location
62# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
63# you execute make install.
64DESTDIR=
65
66DB=$(DESTDIR)$(BINPATH)
67DI=$(DESTDIR)$(INCPATH)
68DL=$(DESTDIR)$(LIBPATH)
69DM=$(DESTDIR)$(MANPATH)
70
71OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
72 pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
73 pngwtran.o pngmem.o pngerror.o pngpread.o
74
75OBJSDLL = $(OBJS)
76
77.SUFFIXES: .c .o
78
79all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
80
81# try include scripts/pnglibconf.mak for more options
82pnglibconf.h: scripts/pnglibconf.h.prebuilt
83 cp scripts/pnglibconf.h.prebuilt $@
84
85libpng.a: $(OBJS)
86 $(AR_RC) $@ $(OBJS)
87 $(RANLIB) $@
88
89libpng.pc:
90 cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
91 -e s!@exec_prefix@!$(exec_prefix)! \
92 -e s!@libdir@!$(LIBPATH)! \
93 -e s!@includedir@!$(INCPATH)! \
94 -e s!-lpng15!-lpng15\ -lz\ -lm! > libpng.pc
95
96libpng-config:
97 ( cat scripts/libpng-config-head.in; \
98 echo prefix=\"$(prefix)\"; \
99 echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
100 echo libs=\"-lpng15 -lz \"; \
101 cat scripts/libpng-config-body.in ) > libpng-config
102 chmod +x libpng-config
103
104$(LIBSO): $(LIBSOMAJ)
105 $(LN_SF) $(LIBSOMAJ) $(LIBSO)
106 cp $(LIBSO)* /boot/home/config/lib
107
108$(LIBSOMAJ): $(OBJSDLL)
109 $(CC) -nostart -Wl,-soname,$(LIBSOMAJ) -o \
110 $(LIBSOMAJ) $(OBJSDLL) $(LDFLAGS)
111
112pngtest: pngtest.o $(LIBSO)
113 $(CC) -L$(ZLIBLIB) -L. -lz -lpng15 -o pngtest pngtest.o
114
115test: pngtest
116 ./pngtest
117
118install-headers: png.h pngconf.h pnglibconf.h
119 -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
120 -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
121 cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME)
122 chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h
123 -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h
124 -@$(RM_F) $(DI)/libpng
125 (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
126
127install-static: install-headers libpng.a
128 -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
129 cp libpng.a $(DL)/$(LIBNAME).a
130 chmod 644 $(DL)/$(LIBNAME).a
131 -@$(RM_F) $(DL)/libpng.a
132 (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
133
134install-shared: install-headers $(LIBSOMAJ) libpng.pc
135 -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
136 -@$(RM_F) $(DL)/$(LIBSO)
137 -@$(RM_F) $(DL)/$(LIBSOREL)
138 -@$(RM_F) $(DL)/$(OLDSO)
139 cp $(LIBSOMAJ) $(DL)/$(LIBSOREL)
140 chmod 755 $(DL)/$(LIBSOREL)
141 (cd $(DL); \
142 $(LN_SF) $(LIBSOREL) $(LIBSO); \
143 $(LN_SF) $(LIBSO) $(OLDSO))
144 -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
145 -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
146 -@$(RM_F) $(DL)/pkgconfig/libpng.pc
147 cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
148 chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
149 (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
150
151install-man: libpng.3 libpngpf.3 png.5
152 -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
153 -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
154 -@$(RM_F) $(DM)/man3/libpng.3
155 -@$(RM_F) $(DM)/man3/libpngpf.3
156 cp libpng.3 $(DM)/man3
157 cp libpngpf.3 $(DM)/man3
158 -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
159 -@$(RM_F) $(DM)/man5/png.5
160 cp png.5 $(DM)/man5
161
162install-config: libpng-config
163 -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
164 -@$(RM_F) $(DB)/libpng-config
165 -@$(RM_F) $(DB)/$(LIBNAME)-config
166 cp libpng-config $(DB)/$(LIBNAME)-config
167 chmod 755 $(DB)/$(LIBNAME)-config
168 (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
169
170install: install-static install-shared install-man install-config
171
172# If you installed in $(DESTDIR), test-installed won't work until you
173# move the library to its final location. Use test-dd to test it
174# before then.
175
176test-dd:
177 echo
178 echo Testing installed dynamic shared library in $(DL).
179 $(CC) -I$(DI) $(CFLAGS) \
180 `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
181 -L$(DL) -L$(ZLIBLIB) -Wl,-rpath $(ZLIBLIB):$(DL) \
182 -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
183 ./pngtestd pngtest.png
184
185test-installed:
186 $(CC) $(CFLAGS) \
187 `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
188 -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
189 -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
190 ./pngtesti pngtest.png
191
192clean:
193 $(RM_F) *.o libpng.a pngtest pngout.png libpng-config \
194 $(LIBSO) $(LIBSOMAJ)* pngtesti \
195 pnglibconf.h libpng.pc
196
197# DO NOT DELETE THIS LINE -- make depend depends on it.
198
199png.o png.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
200pngerror.o pngerror.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
201pngrio.o pngrio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
202pngwio.o pngwio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
203pngmem.o pngmem.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
204pngset.o pngset.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
205pngget.o pngget.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
206pngread.o pngread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
207pngrtran.o pngrtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
208pngrutil.o pngrutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
209pngtrans.o pngtrans.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
210pngwrite.o pngwrite.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
211pngwtran.o pngwtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
212pngwutil.o pngwutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
213pngpread.o pngpread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
214
215pngtest.o: png.h pngconf.h pnglibconf.h