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