1 | # DJGPP (DOS gcc) makefile for libpng
|
---|
2 | # Copyright (C) 2020-2024 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 | AR=ar
|
---|
12 | RANLIB=ranlib
|
---|
13 | CPPFLAGS=-I../zlib -DPNG_NO_SNPRINTF
|
---|
14 | CFLAGS=-O
|
---|
15 | ARFLAGS=rc
|
---|
16 | LDFLAGS=-L. -L../zlib/ -lpng -lz -lm
|
---|
17 |
|
---|
18 | CP=cp
|
---|
19 | RM_F=rm -f
|
---|
20 |
|
---|
21 | # Pre-built configuration
|
---|
22 | # See scripts/pnglibconf.mak for more options
|
---|
23 | PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
|
---|
24 |
|
---|
25 | OBJS = png.o pngerror.o pngget.o pngmem.o pngpread.o \
|
---|
26 | pngread.o pngrio.o pngrtran.o pngrutil.o pngset.o \
|
---|
27 | pngtrans.o pngwio.o pngwrite.o pngwtran.o pngwutil.o
|
---|
28 |
|
---|
29 | .c.o:
|
---|
30 | $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
---|
31 |
|
---|
32 | all: libpng.a pngtest
|
---|
33 |
|
---|
34 | pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
|
---|
35 | $(CP) $(PNGLIBCONF_H_PREBUILT) $@
|
---|
36 |
|
---|
37 | libpng.a: $(OBJS)
|
---|
38 | $(AR) $(ARFLAGS) $@ $(OBJS)
|
---|
39 | $(RANLIB) $@
|
---|
40 |
|
---|
41 | pngtest: pngtest.o libpng.a
|
---|
42 | $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
|
---|
43 | coff2exe pngtest
|
---|
44 |
|
---|
45 | test: pngtest
|
---|
46 | ./pngtest
|
---|
47 |
|
---|
48 | install:
|
---|
49 | @echo "The $@ target is no longer supported by this makefile."
|
---|
50 | @false
|
---|
51 |
|
---|
52 | clean:
|
---|
53 | $(RM_F) *.o libpng.a pngtest pngout.png pnglibconf.h
|
---|
54 |
|
---|
55 | # DO NOT DELETE THIS LINE -- make depend depends on it.
|
---|
56 |
|
---|
57 | png.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
---|
58 | pngerror.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
---|
59 | pngrio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
---|
60 | pngwio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
---|
61 | pngmem.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
---|
62 | pngset.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
---|
63 | pngget.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
---|
64 | pngread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
---|
65 | pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
---|
66 | pngrtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
---|
67 | pngrutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
---|
68 | pngtrans.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
---|
69 | pngwrite.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
---|
70 | pngwtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
---|
71 | pngwutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
---|
72 |
|
---|
73 | pngtest.o: png.h pngconf.h pnglibconf.h
|
---|