]> git.saurik.com Git - wxWidgets.git/blame - src/png/scripts/makefile.std
reset s_bInAssert in wxDoOnAssert() in an exception-safe way (replaces patch 1900613)
[wxWidgets.git] / src / png / scripts / makefile.std
CommitLineData
0272a10d
VZ
1# makefile for libpng
2# Copyright (C) 2002, 2006 Glenn Randers-Pehrson
3# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
4# For conditions of distribution and use, see copyright notice in png.h
5
6# where make install puts libpng.a and png.h
7prefix=/usr/local
8INCPATH=$(prefix)/include
9LIBPATH=$(prefix)/lib
10
11# override DESTDIR= on the make install command line to easily support
12# installing into a temporary location. Example:
13#
14# make install DESTDIR=/tmp/build/libpng
15#
16# If you're going to install into a temporary location
17# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
18# you execute make install.
19DESTDIR=
20
21# Where the zlib library and include files are located
22#ZLIBLIB=/usr/local/lib
23#ZLIBINC=/usr/local/include
24ZLIBLIB=../zlib
25ZLIBINC=../zlib
26
27CC=cc
28AR_RC=ar rc
29MKDIR_P=mkdir
30LN_SF=ln -sf
31RANLIB=ranlib
32RM_F=rm -f
33
34CFLAGS=-I$(ZLIBINC) -O # -g -DPNG_DEBUG=5
35LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
36
37OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
38 pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
39 pngwtran.o pngmem.o pngerror.o pngpread.o
40
41all: libpng.a pngtest
42
43libpng.a: $(OBJS)
44 $(AR_RC) $@ $(OBJS)
45 $(RANLIB) $@
46
47pngtest: pngtest.o libpng.a
48 $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
49
50test: pngtest
51 ./pngtest
52
53install: libpng.a
54 -@$(MKDIR_P) $(DESTDIR)$(INCPATH)
55 -@$(MKDIR_P) $(DESTDIR)$(INCPATH)/libpng
56 -@$(MKDIR_P) $(DESTDIR)$(LIBPATH)
57 -@$(RM_F) $(DESTDIR)$(INCPATH)/png.h
58 -@$(RM_F) $(DESTDIR)$(INCPATH)/pngconf.h
59 cp png.h $(DESTDIR)$(INCPATH)/libpng
60 cp pngconf.h $(DESTDIR)$(INCPATH)/libpng
61 chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h
62 chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h
63 (cd $(DESTDIR)$(INCPATH); ln -f -s libpng/* .)
64 cp libpng.a $(DESTDIR)$(LIBPATH)
65 chmod 644 $(DESTDIR)$(LIBPATH)/libpng.a
66
67clean:
68 $(RM_F) *.o libpng.a pngtest pngout.png
69
70DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
71writelock:
72 chmod a-w *.[ch35] $(DOCS) scripts/*
73
74# DO NOT DELETE THIS LINE -- make depend depends on it.
75
76png.o: png.h pngconf.h
77pngerror.o: png.h pngconf.h
78pngrio.o: png.h pngconf.h
79pngwio.o: png.h pngconf.h
80pngmem.o: png.h pngconf.h
81pngset.o: png.h pngconf.h
82pngget.o: png.h pngconf.h
83pngread.o: png.h pngconf.h
84pngrtran.o: png.h pngconf.h
85pngrutil.o: png.h pngconf.h
86pngtest.o: png.h pngconf.h
87pngtrans.o: png.h pngconf.h
88pngwrite.o: png.h pngconf.h
89pngwtran.o: png.h pngconf.h
90pngwutil.o: png.h pngconf.h
91pngpread.o: png.h pngconf.h
92