aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8/source/Irrlicht/libpng/scripts/makefile.darwin
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/irrlicht-1.8/source/Irrlicht/libpng/scripts/makefile.darwin')
-rw-r--r--libraries/irrlicht-1.8/source/Irrlicht/libpng/scripts/makefile.darwin220
1 files changed, 220 insertions, 0 deletions
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/libpng/scripts/makefile.darwin b/libraries/irrlicht-1.8/source/Irrlicht/libpng/scripts/makefile.darwin
new file mode 100644
index 0000000..bb62b09
--- /dev/null
+++ b/libraries/irrlicht-1.8/source/Irrlicht/libpng/scripts/makefile.darwin
@@ -0,0 +1,220 @@
1# makefile for libpng on Darwin / Mac OS X
2# Copyright (C) 2002, 2004, 2006, 2008, 2010-2011 Glenn Randers-Pehrson
3# Copyright (C) 2001 Christoph Pfisterer
4# derived from makefile.linux:
5# Copyright (C) 1998, 1999 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# where "make install" puts libpng.a, libpng15.dylib, png.h, pngconf.h,
13# and pnglibconf.h
14prefix=/usr/local
15exec_prefix=$(prefix)
16
17# Where the zlib library and include files are located
18#ZLIBLIB=/usr/local/lib
19#ZLIBINC=/usr/local/include
20ZLIBLIB=../zlib
21ZLIBINC=../zlib
22
23# Library name:
24LIBNAME = libpng15
25PNGMAJ = 15
26
27# Shared library names:
28LIBSO=$(LIBNAME).dylib
29LIBSOMAJ=$(LIBNAME).$(PNGMAJ).dylib
30LIBSOREL=$(LIBNAME).$(PNGMAJ).$(RELEASE).dylib
31OLDSO=libpng.dylib
32
33# Utilities:
34CC=cc
35AR_RC=ar rc
36MKDIR_P=mkdir -p
37LN_SF=ln -sf
38RANLIB=ranlib
39RM_F=/bin/rm -f
40ARCH="-arch i386 -arch x86_64"
41
42# CFLAGS=-I$(ZLIBINC) -W -Wall -O3 -funroll-loops
43CFLAGS=-I$(ZLIBINC) -W -Wall -O -funroll-loops $(ARCH)
44LDFLAGS=-L. -L$(ZLIBLIB) -lpng15 -lz $(ARCH)
45
46INCPATH=$(prefix)/include
47LIBPATH=$(exec_prefix)/lib
48MANPATH=$(prefix)/man
49BINPATH=$(exec_prefix)/bin
50
51# override DESTDIR= on the make install command line to easily support
52# installing into a temporary location. Example:
53#
54# make install DESTDIR=/tmp/build/libpng
55#
56# If you're going to install into a temporary location
57# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
58# you execute make install.
59DESTDIR=
60
61DB=$(DESTDIR)$(BINPATH)
62DI=$(DESTDIR)$(INCPATH)
63DL=$(DESTDIR)$(LIBPATH)
64DM=$(DESTDIR)$(MANPATH)
65
66OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
67 pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
68 pngwtran.o pngmem.o pngerror.o pngpread.o
69
70OBJSDLL = $(OBJS:.o=.pic.o)
71
72.SUFFIXES: .c .o .pic.o
73
74.c.pic.o:
75 $(CC) -c $(CFLAGS) -fno-common -o $@ $*.c
76
77all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
78
79# see scripts/pnglibconf.mak for more options
80pnglibconf.h: scripts/pnglibconf.h.prebuilt
81 cp scripts/pnglibconf.h.prebuilt $@
82
83libpng.a: $(OBJS)
84 $(AR_RC) $@ $(OBJS)
85 $(RANLIB) $@
86
87libpng.pc:
88 cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
89 -e s!@exec_prefix@!$(exec_prefix)! \
90 -e s!@libdir@!$(LIBPATH)! \
91 -e s!@includedir@!$(INCPATH)! \
92 -e s!-lpng15!-lpng15\ -lz! > libpng.pc
93
94libpng-config:
95 ( cat scripts/libpng-config-head.in; \
96 echo prefix=\"$(prefix)\"; \
97 echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
98 echo L_opts=\"-L$(LIBPATH)\"; \
99 echo libs=\"-lpng15 -lz\"; \
100 cat scripts/libpng-config-body.in ) > libpng-config
101 chmod +x libpng-config
102
103$(LIBSO): $(LIBSOMAJ)
104 $(LN_SF) $(LIBSOMAJ) $(LIBSO)
105
106$(LIBSOMAJ): $(OBJSDLL)
107 $(CC) -dynamiclib \
108 -install_name $(LIBPATH)/$(LIBSOMAJ) \
109 -current_version 15 -compatibility_version 15 \
110 -o $(LIBSOMAJ) \
111 $(OBJSDLL) -L$(ZLIBLIB) -lz
112
113pngtest: pngtest.o $(LIBSO)
114 $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
115
116test: pngtest
117 ./pngtest
118
119install-headers: png.h pngconf.h pnglibconf.h
120 -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
121 -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
122 cp png.h pngconf.h pnglibconf.h $(DI)/$(LIBNAME)
123 chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h $(DI)/$(LIBNAME)/pnglibconf.h
124 -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h $(DI)/pnglibconf.h
125 -@$(RM_F) $(DI)/libpng
126 (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
127
128install-static: install-headers libpng.a
129 -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
130 cp libpng.a $(DL)/$(LIBNAME).a
131 chmod 644 $(DL)/$(LIBNAME).a
132 $(RANLIB) $(DL)/$(LIBNAME).a
133 -@$(RM_F) $(DL)/libpng.a
134 (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
135
136install-shared: install-headers $(LIBSOMAJ) libpng.pc
137 -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
138 -@$(RM_F) $(DL)/$(LIBSO)
139 -@$(RM_F) $(DL)/$(LIBSOREL)
140 -@$(RM_F) $(DL)/$(OLDSO)
141 cp $(LIBSOMAJ) $(DL)/$(LIBSOREL)
142 chmod 755 $(DL)/$(LIBSOREL)
143 (cd $(DL); \
144 $(LN_SF) $(LIBSOREL) $(LIBSO); \
145 $(LN_SF) $(LIBSO) $(OLDSO))
146 -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
147 -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
148 -@$(RM_F) $(DL)/pkgconfig/libpng.pc
149 cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
150 chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
151 (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
152
153install-man: libpng.3 libpngpf.3 png.5
154 -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
155 -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
156 -@$(RM_F) $(DM)/man3/libpng.3
157 -@$(RM_F) $(DM)/man3/libpngpf.3
158 cp libpng.3 $(DM)/man3
159 cp libpngpf.3 $(DM)/man3
160 -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
161 -@$(RM_F) $(DM)/man5/png.5
162 cp png.5 $(DM)/man5
163
164install-config: libpng-config
165 -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
166 -@$(RM_F) $(DB)/libpng-config
167 -@$(RM_F) $(DB)/$(LIBNAME)-config
168 cp libpng-config $(DB)/$(LIBNAME)-config
169 chmod 755 $(DB)/$(LIBNAME)-config
170 (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
171
172install: install-static install-shared install-man install-config
173
174# If you installed in $(DESTDIR), test-installed won't work until you
175# move the library to its final location. Use test-dd to test it
176# before then.
177
178test-dd:
179 echo
180 echo Testing installed dynamic shared library in $(DL).
181 $(CC) -I$(DI) -I$(ZLIBINC) \
182 `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
183 -L$(DL) -L$(ZLIBLIB) \
184 -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
185 ./pngtestd pngtest.png
186
187test-installed:
188 $(CC) $(CFLAGS) \
189 `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
190 -L$(ZLIBLIB) \
191 -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
192 ./pngtesti pngtest.png
193
194clean:
195 $(RM_F) *.o libpng.a pngtest pngout.png libpng-config \
196 libpng.pc $(LIBNAME).*dylib pngtesti pnglibconf.h
197
198DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
199writelock:
200 chmod a-w *.[ch35] $(DOCS) scripts/*
201
202# DO NOT DELETE THIS LINE -- make depend depends on it.
203
204png.o png.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
205pngerror.o pngerror.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
206pngrio.o pngrio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
207pngwio.o pngwio.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
208pngmem.o pngmem.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
209pngset.o pngset.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
210pngget.o pngget.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
211pngread.o pngread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
212pngrtran.o pngrtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
213pngrutil.o pngrutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
214pngtrans.o pngtrans.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
215pngwrite.o pngwrite.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
216pngwtran.o pngwtran.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
217pngwutil.o pngwutil.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
218pngpread.o pngpread.pic.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
219
220pngtest.o: png.h pngconf.h pnglibconf.h