]> git.saurik.com Git - wxWidgets.git/blame - src/png/scripts/makefile.hpux
Regenerated makefiles for 2.5.2
[wxWidgets.git] / src / png / scripts / makefile.hpux
CommitLineData
c6b71bff
GD
1# makefile for libpng, HPUX (10.20 and 11.00)
2# Copyright (C) 1999-2002 Glenn Randers-Pehrson
3# Copyright (C) 1995 Guy Eric Schalnat, Group 42
4# contributed by Jim Rice and updated by Chris Schleicher, Hewlett Packard
5# For conditions of distribution and use, see copyright notice in png.h
6
7# Where the zlib library and include files are located
8ZLIBLIB=/opt/zlib/lib
9ZLIBINC=/opt/zlib/include
10
11CC=cc
12CFLAGS=-I$(ZLIBINC) -O -Ae +DA1.1 +DS2.0
13# Caution: be sure you have built zlib with the same CFLAGS.
14CCFLAGS=-I$(ZLIBINC) -O -Ae +DA1.1 +DS2.0
15LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
16
17RANLIB=ranlib
18
19PNGMAJ = 0
20PNGMIN = 1.2.4
21PNGVER = $(PNGMAJ).$(PNGMIN)
22LIBNAME = libpng12
23
24# where make install puts libpng.a, libpng12.sl, and png.h
25prefix=/opt/libpng
26INCPATH=$(prefix)/include
27LIBPATH=$(prefix)/lib
28MANPATH=$(prefix)/man
29BINPATH=$(prefix)/bin
30
31# override DESTDIR= on the make install command line to easily support
32# installing into a temporary location. Example:
33#
34# make install DESTDIR=/tmp/build/libpng
35#
36# If you're going to install into a temporary location
37# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
38# you execute make install.
39DESTDIR=
40
41DB=$(DESTDIR)$(BINPATH)
42DI=$(DESTDIR)$(INCPATH)
43DL=$(DESTDIR)$(LIBPATH)
44DM=$(DESTDIR)$(MANPATH)
45
46OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
47 pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
48 pngwtran.o pngmem.o pngerror.o pngpread.o
49
50OBJSDLL = $(OBJS:.o=.pic.o)
51
52.SUFFIXES: .c .o .pic.o
53
54.c.pic.o:
55 $(CC) -c $(CFLAGS) +z -o $@ $*.c
56
57all: libpng.a $(LIBNAME).sl pngtest libpng.pc libpng-config
58
59libpng.a: $(OBJS)
60 ar rc $@ $(OBJS)
61 $(RANLIB) $@
62
63libpng.pc:
64 cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
65
66libpng-config:
67 ( cat scripts/libpng-config-head.in; \
68 echo prefix=\"$(prefix)\"; \
69 echo cppflags=\"-I$(INCPATH)/$(LIBNAME)\"; \
70 echo cflags=\"-Ae +DA1.1 +DS2.0"; \
71 echo ldflags=\"-L$(LIBPATH)\"; \
72 echo libs=\"-lpng12 -lz -lm\"; \
73 cat scripts/libpng-config-body.in ) > libpng-config
74 chmod +x libpng-config
75
76$(LIBNAME).sl: $(LIBNAME).sl.$(PNGMAJ)
77 ln -sf $(LIBNAME).sl.$(PNGMAJ) $(LIBNAME).sl
78
79$(LIBNAME).sl.$(PNGMAJ): $(LIBNAME).sl.$(PNGVER)
80 ln -sf $(LIBNAME).sl.$(PNGVER) $(LIBNAME).sl.$(PNGMAJ)
81
82$(LIBNAME).sl.$(PNGVER): $(OBJSDLL)
83 $(LD) -b -L$(ZLIBLIB) +s +b $(ZLIBLIB) \
84 +h $(LIBNAME).sl.$(PNGMAJ) -o $(LIBNAME).sl.$(PNGVER) \
85 $(OBJSDLL) -lz
86
87pngtest: pngtest.o libpng.a
88 $(CC) -o pngtest $(CCFLAGS) pngtest.o $(LDFLAGS)
89
90test: pngtest
91 ./pngtest
92
93install-headers: png.h pngconf.h
94 -@if [ ! -d $(DI) ]; then mkdir $(DI); fi
95 -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
96 cp png.h pngconf.h $(DI)/$(LIBNAME)
97 chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
98 -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
99 -@/bin/rm -f $(DI)/libpng
100 (cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
101
102install-static: install-headers libpng.a
103 -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
104 cp libpng.a $(DL)/$(LIBNAME).a
105 chmod 644 $(DL)/$(LIBNAME).a
106 -@/bin/rm -f $(DL)/libpng.a
107 (cd $(DL); ln -sf $(LIBNAME).a libpng.a)
108
109install-shared: install-headers $(LIBNAME).sl.$(PNGVER) libpng.pc
110 -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
111 -@/bin/rm -f $(DL)/$(LIBNAME).sl.$(PNGMAJ)* $(DL)/$(LIBNAME).sl
112 -@/bin/rm -f $(DL)/libpng.sl
113 -@/bin/rm -f $(DL)/libpng.sl.3
114 -@/bin/rm -f $(DL)/libpng.sl.3.*
115 cp $(LIBNAME).sl.$(PNGVER) $(DL)
116 chmod 755 $(DL)/$(LIBNAME).sl.$(PNGVER)
117 (cd $(DL); \
118 ln -sf $(LIBNAME).sl.$(PNGVER) libpng.sl; \
119 ln -sf $(LIBNAME).sl.$(PNGVER) libpng.sl.3; \
120 ln -sf $(LIBNAME).sl.$(PNGVER) libpng.sl.3.$(PNGMIN); \
121 ln -sf $(LIBNAME).sl.$(PNGVER) $(LIBNAME).sl.$(PNGMAJ); \
122 ln -sf $(LIBNAME).sl.$(PNGMAJ) $(LIBNAME).sl)
123 -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
124 -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
125 -@/bin/rm -f $(DL)/pkgconfig/libpng.pc
126 cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
127 chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
128 (cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
129
130install-man: libpng.3 libpngpf.3 png.5
131 -@if [ ! -d $(DM) ]; then mkdir $(DM); fi
132 -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi
133 -@/bin/rm -f $(DM)/man3/libpng.3
134 -@/bin/rm -f $(DM)/man3/libpngpf.3
135 cp libpng.3 $(DM)/man3
136 cp libpngpf.3 $(DM)/man3
137 -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi
138 -@/bin/rm -f $(DM)/man5/png.5
139 cp png.5 $(DM)/man5
140
141install-config: libpng-config
142 -@if [ ! -d $(DB) ]; then mkdir $(DB); fi
143 -@/bin/rm -f $(DB)/libpng-config
144 -@/bin/rm -f $(DB)/$(LIBNAME)-config
145 cp libpng-config $(DB)/$(LIBNAME)-config
146 chmod 755 $(DB)/$(LIBNAME)-config
147 (cd $(DB); ln -sf $(LIBNAME)-config libpng-config)
148
149install: install-static install-shared install-man install-config
150
151# If you installed in $(DESTDIR), test-installed won't work until you
152# move the library to its final location.
153
154test-installed:
155 echo
156 echo Testing installed dynamic shared library.
157 $(CC) $(CCFLAGS) \
158 `$(BINPATH)/libpng12-config --cppflags --cflags` pngtest.c \
159 -L$(ZLIBLIB) \
160 -o pngtesti `$(BINPATH)/libpng12-config --ldflags --libs`
161 ./pngtesti pngtest.png
162
163clean:
164 /bin/rm -f *.o libpng.a pngtest pngtesti pngout.png libpng.pc \
165 libpng-config $(LIBNAME).sl $(LIBNAME).sl.$(PNGMAJ)*
166
167DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
168writelock:
169 chmod a-w *.[ch35] $(DOCS) scripts/*
170
171# DO NOT DELETE THIS LINE -- make depend depends on it.
172
173png.o: png.h pngconf.h
174pngerror.o: png.h pngconf.h
175pngrio.o: png.h pngconf.h
176pngwio.o: png.h pngconf.h
177pngmem.o: png.h pngconf.h
178pngset.o: png.h pngconf.h
179pngget.o: png.h pngconf.h
180pngread.o: png.h pngconf.h
181pngrtran.o: png.h pngconf.h
182pngrutil.o: png.h pngconf.h
183pngtest.o: png.h pngconf.h
184pngtrans.o: png.h pngconf.h
185pngwrite.o: png.h pngconf.h
186pngwtran.o: png.h pngconf.h
187pngwutil.o: png.h pngconf.h
188pngpread.o: png.h pngconf.h