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