fukasawa e60969
# Makefile for libpng
fukasawa e60969
# 32-bit Borland C++ (Note: All modules are compiled in C mode)
fukasawa e60969
# To build the library, do:
fukasawa e60969
#       "make -fmakefile.bc32"
fukasawa e60969
#
fukasawa e60969
# -------------------- 32-bit Borland C++ --------------------
fukasawa e60969
fukasawa e60969
### Absolutely necessary for this makefile to work
fukasawa e60969
.AUTODEPEND
fukasawa e60969
fukasawa e60969
## Where zlib.h, zconf.h and zlib.lib are
fukasawa e60969
ZLIB_DIR=..\zlib
fukasawa e60969
fukasawa e60969
## Compiler, linker, librarian and other tools
fukasawa e60969
CC=bcc32
fukasawa e60969
LD=bcc32
fukasawa e60969
LIB=tlib
fukasawa e60969
CP=copy
fukasawa e60969
fukasawa e60969
# -3 = 386, -4 = 486, -5 = Pentium etc.
fukasawa e60969
!ifndef TARGET_CPU
fukasawa e60969
#TARGET_CPU=-6
fukasawa e60969
!endif
fukasawa e60969
fukasawa e60969
# Use this if you don't want Borland's fancy exception handling
fukasawa e60969
# (Caution: doesn't work with CBuilderX)
fukasawa e60969
#NOEHLIB=noeh32.lib
fukasawa e60969
fukasawa e60969
!ifdef DEBUG
fukasawa e60969
CDEBUG=-v
fukasawa e60969
LDEBUG=-v
fukasawa e60969
!else
fukasawa e60969
CDEBUG=
fukasawa e60969
LDEBUG=
fukasawa e60969
!endif
fukasawa e60969
fukasawa e60969
# STACKOFLOW=1
fukasawa e60969
!ifdef STACKOFLOW
fukasawa e60969
CDEBUG=$(CDEBUG) -N
fukasawa e60969
LDEBUG=$(LDEBUG) -N
fukasawa e60969
!endif
fukasawa e60969
fukasawa e60969
# -O2 optimize for speed
fukasawa e60969
# -d  merge duplicate strings
fukasawa e60969
# -k- turn off standard stack frame
fukasawa e60969
# -w  display all warnings
fukasawa e60969
CPPFLAGS=-I$(ZLIB_DIR)
fukasawa e60969
CFLAGS=-O2 -d -k- -w $(TARGET_CPU) $(CDEBUG)
fukasawa e60969
fukasawa e60969
# -M  generate map file
fukasawa e60969
LDFLAGS=-L$(ZLIB_DIR) -M $(LDEBUG)
fukasawa e60969
fukasawa e60969
# Pre-built configuration
fukasawa e60969
# See scripts\pnglibconf.mak for more options
fukasawa e60969
!ifndef PNGLIBCONF_H_PREBUILT
fukasawa e60969
PNGLIBCONF_H_PREBUILT = scripts\pnglibconf.h.prebuilt
fukasawa e60969
!endif
fukasawa e60969
fukasawa e60969
## Variables
fukasawa e60969
OBJS = \
fukasawa e60969
	png.obj \
fukasawa e60969
	pngerror.obj \
fukasawa e60969
	pngget.obj \
fukasawa e60969
	pngmem.obj \
fukasawa e60969
	pngpread.obj \
fukasawa e60969
	pngread.obj \
fukasawa e60969
	pngrio.obj \
fukasawa e60969
	pngrtran.obj \
fukasawa e60969
	pngrutil.obj \
fukasawa e60969
	pngset.obj \
fukasawa e60969
	pngtrans.obj \
fukasawa e60969
	pngwio.obj \
fukasawa e60969
	pngwrite.obj \
fukasawa e60969
	pngwtran.obj \
fukasawa e60969
	pngwutil.obj
fukasawa e60969
fukasawa e60969
LIBOBJS = \
fukasawa e60969
	+png.obj \
fukasawa e60969
	+pngerror.obj \
fukasawa e60969
	+pngget.obj \
fukasawa e60969
	+pngmem.obj \
fukasawa e60969
	+pngpread.obj \
fukasawa e60969
	+pngread.obj \
fukasawa e60969
	+pngrio.obj \
fukasawa e60969
	+pngrtran.obj \
fukasawa e60969
	+pngrutil.obj \
fukasawa e60969
	+pngset.obj \
fukasawa e60969
	+pngtrans.obj \
fukasawa e60969
	+pngwio.obj \
fukasawa e60969
	+pngwrite.obj \
fukasawa e60969
	+pngwtran.obj \
fukasawa e60969
	+pngwutil.obj
fukasawa e60969
fukasawa e60969
LIBNAME=libpng.lib
fukasawa e60969
fukasawa e60969
## Implicit rules
fukasawa e60969
# Braces let make "batch" calls to the compiler,
fukasawa e60969
# 2 calls instead of 12; space is important.
fukasawa e60969
.c.obj:
fukasawa e60969
	$(CC) $(CPPFLAGS) $(CFLAGS) -c {$*.c }
fukasawa e60969
fukasawa e60969
.c.exe:
fukasawa e60969
	$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $*.c \
fukasawa e60969
	  $(LIBNAME) zlib.lib $(NOEHLIB)
fukasawa e60969
fukasawa e60969
.obj.exe:
fukasawa e60969
	$(LD) $(LDFLAGS) $*.obj $(LIBNAME) zlib.lib $(NOEHLIB)
fukasawa e60969
fukasawa e60969
## Major targets
fukasawa e60969
all: libpng pngtest
fukasawa e60969
fukasawa e60969
libpng: $(LIBNAME)
fukasawa e60969
fukasawa e60969
pngtest: pngtest.exe
fukasawa e60969
fukasawa e60969
test: pngtest.exe
fukasawa e60969
	pngtest
fukasawa e60969
fukasawa e60969
## Minor Targets
fukasawa e60969
fukasawa e60969
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
fukasawa e60969
	$(CP) $(PNGLIBCONF_H_PREBUILT) $@
fukasawa e60969
fukasawa e60969
png.obj: png.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
fukasawa e60969
pngerror.obj: pngerror.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
fukasawa e60969
pngget.obj: pngget.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
fukasawa e60969
pngmem.obj: pngmem.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
fukasawa e60969
pngpread.obj: pngpread.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
fukasawa e60969
pngread.obj: pngread.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
fukasawa e60969
pngrio.obj: pngrio.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
fukasawa e60969
pngrtran.obj: pngrtran.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
fukasawa e60969
pngrutil.obj: pngrutil.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
fukasawa e60969
pngset.obj: pngset.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
fukasawa e60969
pngtrans.obj: pngtrans.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
fukasawa e60969
pngwio.obj: pngwio.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
fukasawa e60969
pngwrite.obj: pngwrite.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
fukasawa e60969
pngwtran.obj: pngwtran.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
fukasawa e60969
pngwutil.obj: pngwutil.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
fukasawa e60969
pngtest.obj: pngtest.c png.h pngconf.h pnglibconf.h
fukasawa e60969
fukasawa e60969
$(LIBNAME): $(OBJS)
fukasawa e60969
	-del $(LIBNAME)
fukasawa e60969
	$(LIB) $(LIBNAME) @&&|
fukasawa e60969
$(LIBOBJS), libpng
fukasawa e60969
|
fukasawa e60969
fukasawa e60969
# Cleanup
fukasawa e60969
clean:
fukasawa e60969
	-del pnglibconf.h
fukasawa e60969
	-del *.obj
fukasawa e60969
	-del $(LIBNAME)
fukasawa e60969
	-del pngtest.exe
fukasawa e60969
	-del *.lst
fukasawa e60969
	-del *.map
fukasawa e60969
	-del *.tds
fukasawa e60969
	-del pngout.png
fukasawa e60969
fukasawa e60969
# End of makefile for libpng