makefile.dj2 2.5 KB
Newer Older
G
Guy Schalnat 已提交
1
# DJGPP (DOS gcc) makefile for libpng
2
# Copyright (C) 2002, 2006, 2009-2014 Glenn Randers-Pehrson
G
Guy Schalnat 已提交
3
# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
4
#
5
# This code is released under the libpng license.
6
# For conditions of distribution and use, see the disclaimer
7
# and license in png.h
G
Guy Schalnat 已提交
8

9
# where make install will put libpng.a and png.h
10 11
#prefix=/usr/local
prefix=.
12 13
INCPATH=$(prefix)/include
LIBPATH=$(prefix)/lib
14

G
Guy Schalnat 已提交
15
CC=gcc
16 17
CPPFLAGS=-I../zlib -DPNG_NO_SNPRINTF
CFLAGS=-O
G
Guy Schalnat 已提交
18
LDFLAGS=-L. -L../zlib/ -lpng -lz -lm
G
Guy Schalnat 已提交
19

G
Guy Schalnat 已提交
20
RANLIB=ranlib
G
Guy Schalnat 已提交
21

22 23 24
CP=cp
RM_F=rm -f

25 26 27 28
# Pre-built configuration
# See scripts/pnglibconf.mak for more options
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt

A
Andreas Dilger 已提交
29
OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
G
Guy Schalnat 已提交
30
	pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o pngwtran.o \
31
	pngmem.o pngerror.o pngpread.o
G
Guy Schalnat 已提交
32

33 34 35
.c.o:
	$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<

36
all: libpng.a pngtest
G
Guy Schalnat 已提交
37

38
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
39
	$(CP) $(PNGLIBCONF_H_PREBUILT) $@
40

G
Guy Schalnat 已提交
41
libpng.a: $(OBJS)
42
	ar rc $@  $(OBJS)
G
Guy Schalnat 已提交
43 44 45
	$(RANLIB) $@

pngtest: pngtest.o libpng.a
46
	$(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
G
Guy Schalnat 已提交
47
	coff2exe pngtest
G
Guy Schalnat 已提交
48 49 50

test: pngtest
	./pngtest
G
Guy Schalnat 已提交
51
clean:
52
	$(RM_F) *.o libpng.a pngtest pngout.png pnglibconf.h
G
Guy Schalnat 已提交
53 54 55

# DO NOT DELETE THIS LINE -- make depend depends on it.

56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
png.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngerror.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngrio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngwio.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngmem.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngset.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngget.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngpread.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngrtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngrutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngtrans.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngwrite.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngwtran.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
pngwutil.o: png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
71

72
pngtest.o: png.h pngconf.h pnglibconf.h