]> git.saurik.com Git - wxWidgets.git/blame - src/png/scripts/makefile.lnx
regenerated from template
[wxWidgets.git] / src / png / scripts / makefile.lnx
CommitLineData
c801d85f
KB
1# makefile for libpng on Linux ELF with gcc
2# Copyright (C) 1996, 1997 Andreas Dilger
3# Copyright (C) 1998 Greg Roelofs
4# For conditions of distribution and use, see copyright notice in png.h
5
6CC=gcc
7
8# Where the zlib library and include files are located
9#ZLIBLIB=/usr/local/lib
10#ZLIBINC=/usr/local/include
11ZLIBLIB=../zlib
12ZLIBINC=../zlib
13
14WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
15 -Wmissing-declarations -Wtraditional -Wcast-align \
16 -Wstrict-prototypes -Wmissing-prototypes #-Wconversion
17CFLAGS=-I$(ZLIBINC) -Wall -O3 -funroll-loops -malign-loops=2 \
18 -malign-functions=2 #$(WARNMORE) -g -DPNG_DEBUG=5
19LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng -lz -lm
20
21RANLIB=ranlib
22#RANLIB=echo
23
24# read libpng.txt or png.h to see why PNGMAJ is 2. You should not
25# have to change it.
26PNGMAJ = 2
27PNGMIN = 1.0
28PNGVER = $(PNGMAJ).$(PNGMIN)
29
30# where make install puts libpng.a, libpng.so*, and png.h
31prefix=/usr/local
32INCPATH=$(prefix)/include
33LIBPATH=$(prefix)/lib
34
35OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
36 pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
37 pngwtran.o pngmem.o pngerror.o pngpread.o
38
39OBJSDLL = $(OBJS:.o=.pic.o)
40
41.SUFFIXES: .c .o .pic.o
42
43.c.pic.o:
44 $(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
45
46all: libpng.a libpng.so pngtest
47
48libpng.a: $(OBJS)
49 ar rc $@ $(OBJS)
50 $(RANLIB) $@
51
52libpng.so: libpng.so.$(PNGMAJ)
53 ln -sf libpng.so.$(PNGMAJ) libpng.so
54
55libpng.so.$(PNGMAJ): libpng.so.$(PNGVER)
56 ln -sf libpng.so.$(PNGVER) libpng.so.$(PNGMAJ)
57
58libpng.so.$(PNGVER): $(OBJSDLL)
59 $(CC) -shared -Wl,-soname,libpng.so.$(PNGMAJ) -o libpng.so.$(PNGVER) \
60 $(OBJSDLL)
61
62pngtest: pngtest.o libpng.so
63 $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
64
65test: pngtest
66 ./pngtest
67
68install: libpng.a libpng.so.$(PNGVER)
69 -@mkdir $(INCPATH) $(LIBPATH)
70 cp png.h pngconf.h $(INCPATH)
71 chmod 644 $(INCPATH)/png.h $(INCPATH)/pngconf.h
72 cp libpng.a libpng.so.$(PNGVER) $(LIBPATH)
73 chmod 755 $(LIBPATH)/libpng.so.$(PNGVER)
74 -@/bin/rm -f $(LIBPATH)/libpng.so.$(PNGMAJ) $(LIBPATH)/libpng.so
75 (cd $(LIBPATH); ln -sf libpng.so.$(PNGVER) libpng.so.$(PNGMAJ); \
76 ln -sf libpng.so.$(PNGMAJ) libpng.so)
77
78clean:
79 /bin/rm -f *.o libpng.a libpng.so* pngtest pngout.png
80
81# DO NOT DELETE THIS LINE -- make depend depends on it.
82
83png.o png.pic.o: png.h pngconf.h
84pngerror.o pngerror.pic.o: png.h pngconf.h
85pngrio.o pngrio.pic.o: png.h pngconf.h
86pngwio.o pngwio.pic.o: png.h pngconf.h
87pngmem.o pngmem.pic.o: png.h pngconf.h
88pngset.o pngset.pic.o: png.h pngconf.h
89pngget.o pngget.pic.o: png.h pngconf.h
90pngread.o pngread.pic.o: png.h pngconf.h
91pngrtran.o pngrtran.pic.o: png.h pngconf.h
92pngrutil.o pngrutil.pic.o: png.h pngconf.h
93pngtrans.o pngtrans.pic.o: png.h pngconf.h
94pngwrite.o pngwrite.pic.o: png.h pngconf.h
95pngwtran.o pngwtran.pic.o: png.h pngconf.h
96pngwutil.o pngwutil.pic.o: png.h pngconf.h
97pngpread.o pngpread.pic.o: png.h pngconf.h
98
99pngtest.o: png.h pngconf.h