]> git.tdb.fi Git - ext/libpng.git/blob - scripts/makefile.dj2
Adjust library name to match upstream
[ext/libpng.git] / scripts / makefile.dj2
1 # DJGPP (DOS gcc) makefile for libpng
2 # Copyright (C) 2020-2022 Cosmin Truta
3 # Copyright (C) 2002, 2006, 2009-2014 Glenn Randers-Pehrson
4 # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
5 #
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
9
10 CC=gcc
11 CPPFLAGS=-I../zlib -DPNG_NO_SNPRINTF
12 CFLAGS=-O
13 LDFLAGS=-L. -L../zlib/ -lpng -lz -lm
14
15 CP=cp
16 RM_F=rm -f
17
18 # Pre-built configuration
19 # See scripts/pnglibconf.mak for more options
20 PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
21
22 OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
23        pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
24        pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
25
26 .c.o:
27         $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
28
29 all: libpng.a pngtest
30
31 pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
32         $(CP) $(PNGLIBCONF_H_PREBUILT) $@
33
34 libpng.a: $(OBJS)
35         ar rc $@ $(OBJS)
36         ranlib $@
37
38 pngtest: pngtest.o libpng.a
39         $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
40         coff2exe pngtest
41
42 test: pngtest
43         ./pngtest
44
45 install:
46         @echo "The $@ target is no longer supported by this makefile."
47         @false
48
49 clean:
50         $(RM_F) *.o libpng.a pngtest pngout.png pnglibconf.h
51
52 # DO NOT DELETE THIS LINE -- make depend depends on it.
53
54 png.o:      png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
55 pngerror.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
56 pngrio.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
57 pngwio.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
58 pngmem.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
59 pngset.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
60 pngget.o:   png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
61 pngread.o:  png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
62 pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
63 pngrtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
64 pngrutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
65 pngtrans.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
66 pngwrite.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
67 pngwtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
68 pngwutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
69
70 pngtest.o:  png.h pngconf.h pnglibconf.h