blob: ad117bc5e2ef5b9139244d456714a572e82ea0dc [file] [log] [blame]
The Android Open Source Project893912b2009-03-03 19:30:05 -08001# DJGPP (DOS gcc) makefile for libpng
Chris Craikb50c2172013-07-29 15:28:30 -07002# Copyright (C) 2002, 2006, 2009-2010-2011 Glenn Randers-Pehrson
The Android Open Source Project893912b2009-03-03 19:30:05 -08003# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
Patrick Scott5f6bd842010-06-28 16:55:16 -04004#
Patrick Scotta0bb96c2009-07-22 11:50:02 -04005# This code is released under the libpng license.
6# For conditions of distribution and use, see the disclaimer
7# and license in png.h
The Android Open Source Project893912b2009-03-03 19:30:05 -08008
9# where make install will put libpng.a and png.h
10#prefix=/usr/local
11prefix=.
12INCPATH=$(prefix)/include
13LIBPATH=$(prefix)/lib
14
15CC=gcc
Chris Craikb50c2172013-07-29 15:28:30 -070016CFLAGS=-I../zlib -O -DPNG_NO_SNPRINTF
The Android Open Source Project893912b2009-03-03 19:30:05 -080017LDFLAGS=-L. -L../zlib/ -lpng -lz -lm
18
19RANLIB=ranlib
20
21OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
22 pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o pngwtran.o \
23 pngmem.o pngerror.o pngpread.o
24
25all: libpng.a pngtest
26
Chris Craikb50c2172013-07-29 15:28:30 -070027# see scripts/pnglibconf.mak for more options
28pnglibconf.h: scripts/pnglibconf.h.prebuilt
29 cp scripts/pnglibconf.h.prebuilt $@
30
The Android Open Source Project893912b2009-03-03 19:30:05 -080031libpng.a: $(OBJS)
32 ar rc $@ $(OBJS)
33 $(RANLIB) $@
34
35pngtest: pngtest.o libpng.a
36 $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
37 coff2exe pngtest
38
39test: pngtest
40 ./pngtest
41clean:
Chris Craikb50c2172013-07-29 15:28:30 -070042 rm -f *.o libpng.a pngtest pngout.png pnglibconf.h
The Android Open Source Project893912b2009-03-03 19:30:05 -080043
44# DO NOT DELETE THIS LINE -- make depend depends on it.
45
Chris Craikb50c2172013-07-29 15:28:30 -070046png.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
47pngerror.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
48pngrio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
49pngwio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
50pngmem.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
51pngset.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
52pngget.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
53pngread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
54pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
55pngrtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
56pngrutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
57pngtrans.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
58pngwrite.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
59pngwtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
60pngwutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
The Android Open Source Project893912b2009-03-03 19:30:05 -080061
Chris Craikb50c2172013-07-29 15:28:30 -070062pngtest.o: png.h pngconf.h pnglibconf.h