]> git.saurik.com Git - wxWidgets.git/blame - src/png/scripts/makefile.sco
correcting a missing redraw area on certain resize operations when window has a border
[wxWidgets.git] / src / png / scripts / makefile.sco
CommitLineData
c6b71bff
GD
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 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
9CC=cc
10
11# where make install puts libpng.a, libpng.so*, and png.h
12prefix=/usr/local
13
14# Where the zlib library and include files are located
15#ZLIBLIB=/usr/local/lib
16#ZLIBINC=/usr/local/include
17ZLIBLIB=../zlib
18ZLIBINC=../zlib
19
20CFLAGS= -dy -belf -I$(ZLIBINC) -O3
21LDFLAGS=-L. -L$(ZLIBLIB) -lpng12 -lz -lm
22
23#RANLIB=ranlib
24RANLIB=echo
25
26PNGMAJ = 0
27PNGMIN = 1.2.4
28PNGVER = $(PNGMAJ).$(PNGMIN)
29LIBNAME = libpng12
30
31INCPATH=$(prefix)/include/libpng
32LIBPATH=$(prefix)/lib
33MANPATH=$(prefix)/man
34BINPATH=$(prefix)/bin
35
36# override DESTDIR= on the make install command line to easily support
37# installing into a temporary location. Example:
38#
39# make install DESTDIR=/tmp/build/libpng
40#
41# If you're going to install into a temporary location
42# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
43# you execute make install.
44DESTDIR=
45
46DB=$(DESTDIR)$(BINPATH)
47DI=$(DESTDIR)$(INCPATH)
48DL=$(DESTDIR)$(LIBPATH)
49DM=$(DESTDIR)$(MANPATH)
50
51OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
52 pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
53 pngwtran.o pngmem.o pngerror.o pngpread.o
54
55OBJSDLL = $(OBJS:.o=.pic.o)
56
57.SUFFIXES: .c .o .pic.o
58
59.c.pic.o:
60 $(CC) -c $(CFLAGS) -KPIC -o $@ $*.c
61
62all: libpng.a $(LIBNAME).so pngtest libpng.pc libpng-config
63
64libpng.a: $(OBJS)
65 ar rc $@ $(OBJS)
66 $(RANLIB) $@
67
68libpng.pc:
69 cat scripts/libpng.pc.in | sed -e s\!@PREFIX@!$(prefix)! > libpng.pc
70
71libpng-config:
72 ( cat scripts/libpng-config-head.in; \
73 echo prefix=\"$(prefix)\"; \
74 echo cppflags=\"-I$(INCPATH)/$(LIBNAME)\"; \
75 echo cflags=\"-belf\"; \
76 echo ldflags=\"-L$(LIBPATH)\"; \
77 echo libs=\"-lpng12 -lz -lm\"; \
78 cat scripts/libpng-config-body.in ) > libpng-config
79 chmod +x libpng-config
80
81$(LIBNAME).so: $(LIBNAME).so.$(PNGMAJ)
82 ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so
83
84$(LIBNAME).so.$(PNGMAJ): $(LIBNAME).so.$(PNGVER)
85 ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ)
86
87$(LIBNAME).so.$(PNGVER): $(OBJSDLL)
88 $(CC) -G -Wl,-h,$(LIBNAME).so.$(PNGMAJ) -o $(LIBNAME).so.$(PNGVER) \
89 $(OBJSDLL)
90
91pngtest: pngtest.o $(LIBNAME).so
92 LD_RUN_PATH=.:$(ZLIBLIB) $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
93
94test: pngtest
95 ./pngtest
96
97install-headers: png.h pngconf.h
98 -@if [ ! -d $(DI) ]; then mkdir $(DI); fi
99 -@if [ ! -d $(DI)/$(LIBNAME) ]; then mkdir $(DI)/$(LIBNAME); fi
100 -@/bin/rm -f $(DI)/png.h
101 -@/bin/rm -f $(DI)/pngconf.h
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 -f -s $(LIBNAME) libpng; ln -f -s $(LIBNAME)/* .)
107
108install-static: install-headers libpng.a
109 -@if [ ! -d $(DL) ]; then mkdir $(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 -f -s $(LIBNAME).a libpng.a)
114
115install-shared: install-headers $(LIBNAME).so.$(PNGVER) libpng.pc
116 -@if [ ! -d $(DL) ]; then mkdir $(DL); fi
117 -@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)* $(DL)/$(LIBNAME).so
118 -@/bin/rm -f $(DL)/libpng.so
119 -@/bin/rm -f $(DL)/libpng.so.3
120 -@/bin/rm -f $(DL)/libpng.so.3.*
121 cp $(LIBNAME).so.$(PNGVER) $(DL)
122 chmod 755 $(DL)/$(LIBNAME).so.$(PNGVER)
123 (cd $(DL); \
124 ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so; \
125 ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so.3; \
126 ln -f -s $(LIBNAME).so.$(PNGVER) libpng.so.3.$(PNGMIN); \
127 ln -f -s $(LIBNAME).so.$(PNGVER) $(LIBNAME).so.$(PNGMAJ); \
128 ln -f -s $(LIBNAME).so.$(PNGMAJ) $(LIBNAME).so)
129 -@if [ ! -d $(DL)/pkgconfig ]; then mkdir $(DL)/pkgconfig; fi
130 -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
131 -@/bin/rm -f $(DL)/pkgconfig/libpng.pc
132 cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
133 chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
134 (cd $(DL)/pkgconfig; ln -f -s $(LIBNAME).pc libpng.pc)
135
136install-man: libpng.3 libpngpf.3 png.5
137 -@if [ ! -d $(DM) ]; then mkdir $(DM); fi
138 -@if [ ! -d $(DM)/man3 ]; then mkdir $(DM)/man3; fi
139 -@/bin/rm -f $(DM)/man3/libpng.3
140 -@/bin/rm -f $(DM)/man3/libpngpf.3
141 cp libpng.3 $(DM)/man3
142 cp libpngpf.3 $(DM)/man3
143 -@if [ ! -d $(DM)/man5 ]; then mkdir $(DM)/man5; fi
144 -@/bin/rm -f $(DM)/man5/png.5
145 cp png.5 $(DM)/man5
146
147install-config: libpng-config
148 -@if [ ! -d $(DB) ]; then mkdir $(DB); fi
149 -@/bin/rm -f $(DB)/libpng-config
150 -@/bin/rm -f $(DB)/$(LIBNAME)-config
151 cp libpng-config $(DB)/$(LIBNAME)-config
152 chmod 755 $(DB)/$(LIBNAME)-config
153 (cd $(DB); ln -sf $(LIBNAME)-config libpng-config)
154
155install: install-static install-shared install-man install-config
156
157# If you installed in $(DESTDIR), test-installed won't work until you
158# move the library to its final location.
159
160test-installed:
161 $(CC) $(CFLAGS) \
162 `$(BINPATH)/libpng12-config --cppflags --cflags` pngtest.c \
163 -L$(ZLIBLIB) \
164 -o pngtesti `$(BINPATH)/libpng12-config --ldflags --libs`
165 ./pngtesti pngtest.png
166
167clean:
168 /bin/rm -f *.o libpng.a pngtest pngout.png libpng.pc libpng-config \
169 $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtest-static pngtesti
170
171
172clean:
173 /bin/rm -f *.o libpng.a $(LIBNAME).so $(LIBNAME).so.$(PNGMAJ)* pngtest pngout.png
174
175DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
176writelock:
177 chmod a-w *.[ch35] $(DOCS) scripts/*
178
179# DO NOT DELETE THIS LINE -- make depend depends on it.
180
181png.o png.pic.o: png.h pngconf.h
182pngerror.o pngerror.pic.o: png.h pngconf.h
183pngrio.o pngrio.pic.o: png.h pngconf.h
184pngwio.o pngwio.pic.o: png.h pngconf.h
185pngmem.o pngmem.pic.o: png.h pngconf.h
186pngset.o pngset.pic.o: png.h pngconf.h
187pngget.o pngget.pic.o: png.h pngconf.h
188pngread.o pngread.pic.o: png.h pngconf.h
189pngrtran.o pngrtran.pic.o: png.h pngconf.h
190pngrutil.o pngrutil.pic.o: png.h pngconf.h
191pngtrans.o pngtrans.pic.o: png.h pngconf.h
192pngwrite.o pngwrite.pic.o: png.h pngconf.h
193pngwtran.o pngwtran.pic.o: png.h pngconf.h
194pngwutil.o pngwutil.pic.o: png.h pngconf.h
195pngpread.o pngpread.pic.o: png.h pngconf.h
196
197pngtest.o: png.h pngconf.h