beta-0.89.2
[luatex.git] / source / libs / libpng / libpng-src / scripts / makefile.gcc
blobba92d150931804e3b34ea3cc323844c2adcdaaf3
1 # makefile for libpng using gcc (generic, static library)
2 # Copyright (C) 2008, 2014 Glenn Randers-Pehrson
3 # Copyright (C) 2000 Cosmin Truta
4 # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
6 # This code is released under the libpng license.
7 # For conditions of distribution and use, see the disclaimer
8 # and license in png.h
10 # Location of the zlib library and include files
11 ZLIBINC = ../zlib
12 ZLIBLIB = ../zlib
14 # Compiler, linker, lib and other tools
15 CC = gcc
16 LD = $(CC)
17 AR_RC = ar rcs
18 RANLIB = ranlib
19 CP = cp
20 RM_F = rm -f
22 WARNMORE = -Wwrite-strings -Wpointer-arith -Wshadow \
23         -Wmissing-declarations -Wtraditional -Wcast-align \
24         -Wstrict-prototypes -Wmissing-prototypes # -Wconversion
25 CPPFLAGS = -I$(ZLIBINC) # -DPNG_DEBUG=5
26 CFLAGS = -W -Wall -O2 # $(WARNMORE) -g
27 LDFLAGS =
28 LIBS = -lz -lm
30 # File extensions
31 EXEEXT =
33 # Pre-built configuration
34 # See scripts/pnglibconf.mak for more options
35 PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
37 # Variables
38 OBJS =  png.o pngerror.o pngget.o pngmem.o pngpread.o \
39         pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
40         pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
42 # Targets
43 all: static
45 pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
46         $(CP) $(PNGLIBCONF_H_PREBUILT) $@
48 .c.o:
49         $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
51 static: libpng.a pngtest$(EXEEXT)
53 shared:
54         @echo This is a generic makefile that cannot create shared libraries.
55         @echo Please use a configuration that is specific to your platform.
56         @false
58 libpng.a: $(OBJS)
59         $(AR_RC) $@ $(OBJS)
60         $(RANLIB) $@
62 test: pngtest$(EXEEXT)
63         ./pngtest$(EXEEXT)
65 pngtest$(EXEEXT): pngtest.o libpng.a
66         $(LD) $(LDFLAGS) -L$(ZLIBLIB) -o $@ pngtest.o libpng.a $(LIBS)
68 clean:
69         $(RM_F) *.o libpng.a pngtest$(EXEEXT) pngout.png pnglibconf.h
71 png.o:      png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
72 pngerror.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
73 pngget.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
74 pngmem.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
75 pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
76 pngread.o:  png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
77 pngrio.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
78 pngrtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
79 pngrutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
80 pngset.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
81 pngtrans.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
82 pngwio.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
83 pngwrite.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
84 pngwtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
85 pngwutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
87 pngtest.o:  png.h pngconf.h pnglibconf.h