1996-01-26 02:38:47 -05:00
|
|
|
# Makefile for libpng
|
2000-03-21 06:13:06 -05:00
|
|
|
# 16-bit Borland C++ (Note: All modules are compiled in C mode)
|
|
|
|
# To build the library, do:
|
|
|
|
# "make -fmakefile.bor -DMODEL=c"
|
|
|
|
# or: "make -fmakefile.bor -DMODEL=l"
|
1996-01-26 02:38:47 -05:00
|
|
|
#
|
2000-03-21 06:13:06 -05:00
|
|
|
# ------------ Borland C++ ------------
|
1996-01-26 02:38:47 -05:00
|
|
|
|
|
|
|
### Absolutely necessary for this makefile to work
|
|
|
|
.AUTODEPEND
|
|
|
|
|
2000-03-21 06:13:06 -05:00
|
|
|
## Where zlib.h, zconf.h and zlib_MODEL.lib are
|
|
|
|
ZLIB_DIR=..\zlib
|
1996-01-26 02:38:47 -05:00
|
|
|
|
2014-06-05 10:53:19 -04:00
|
|
|
## Compiler, linker, librarian and other tools
|
2000-03-21 06:13:06 -05:00
|
|
|
CC=bcc
|
|
|
|
LD=bcc
|
|
|
|
LIB=tlib
|
2014-06-05 10:53:19 -04:00
|
|
|
CP=copy
|
1996-01-26 02:38:47 -05:00
|
|
|
|
|
|
|
!ifndef MODEL
|
|
|
|
MODEL=l
|
|
|
|
!endif
|
|
|
|
|
2000-03-21 06:13:06 -05:00
|
|
|
MODEL_ARG=-m$(MODEL)
|
|
|
|
|
1996-01-26 02:38:47 -05:00
|
|
|
#TARGET_CPU=3
|
|
|
|
# 2 = 286, 3 = 386, etc.
|
|
|
|
!ifndef TARGET_CPU
|
|
|
|
TARGET_CPU=2
|
|
|
|
!endif
|
|
|
|
|
2000-03-21 06:13:06 -05:00
|
|
|
# Use this if you don't want Borland's fancy exception handling
|
|
|
|
# (for Borland C++ 4.0 or later)
|
|
|
|
#NOEHLIB=noeh$(MODEL).lib
|
1996-01-26 02:38:47 -05:00
|
|
|
|
|
|
|
!ifdef DEBUG
|
|
|
|
CDEBUG=-v
|
|
|
|
LDEBUG=-v
|
|
|
|
!else
|
|
|
|
CDEBUG=
|
|
|
|
LDEBUG=
|
|
|
|
!endif
|
|
|
|
|
|
|
|
# STACKOFLOW=1
|
|
|
|
!ifdef STACKOFLOW
|
|
|
|
CDEBUG=$(CDEBUG) -N
|
|
|
|
LDEBUG=$(LDEBUG) -N
|
|
|
|
!endif
|
|
|
|
|
2000-03-21 06:13:06 -05:00
|
|
|
# -X- turn on dependency generation in the object file
|
|
|
|
# -w set all warnings on
|
1996-01-26 02:38:47 -05:00
|
|
|
# -O2 optimize for speed
|
|
|
|
# -Z global optimization
|
2014-02-05 23:28:57 -05:00
|
|
|
CPPFLAGS=-I$(ZLIB_DIR)
|
|
|
|
CFLAGS=-O2 -Z -X- -w -$(TARGET_CPU) $(MODEL_ARG) $(CDEBUG)
|
1996-01-26 02:38:47 -05:00
|
|
|
|
|
|
|
# -M generate map file
|
2000-03-21 06:13:06 -05:00
|
|
|
LDFLAGS=-M -L$(ZLIB_DIR) $(MODEL_ARG) $(LDEBUG)
|
1996-01-26 02:38:47 -05:00
|
|
|
|
2014-06-05 10:53:19 -04:00
|
|
|
# Pre-built configuration
|
|
|
|
# See scripts/pnglibconf.mak for more options
|
|
|
|
PNGLIBCONF_H_PREBUILT = scripts/pnglibconf.h.prebuilt
|
|
|
|
|
2000-03-21 06:13:06 -05:00
|
|
|
## Variables
|
2009-05-02 16:36:08 -04:00
|
|
|
|
1996-01-26 02:38:47 -05:00
|
|
|
OBJS = \
|
2000-03-21 06:13:06 -05:00
|
|
|
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
|
1996-01-26 02:38:47 -05:00
|
|
|
|
|
|
|
LIBOBJS = \
|
2000-03-21 06:13:06 -05:00
|
|
|
+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
|
1996-01-26 02:38:47 -05:00
|
|
|
|
|
|
|
LIBNAME=libpng$(MODEL).lib
|
|
|
|
|
|
|
|
## Implicit rules
|
2009-05-02 16:36:08 -04:00
|
|
|
|
1996-01-26 02:38:47 -05:00
|
|
|
# Braces let make "batch" calls to the compiler,
|
|
|
|
# 2 calls instead of 12; space is important.
|
|
|
|
.c.obj:
|
2014-02-05 23:28:57 -05:00
|
|
|
$(CC) $(CPPFLAGS) $(CFLAGS) -c {$*.c }
|
1996-01-26 02:38:47 -05:00
|
|
|
|
|
|
|
.c.exe:
|
2014-02-05 23:28:57 -05:00
|
|
|
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $*.c \
|
|
|
|
$(LIBNAME) zlib_$(MODEL).lib $(NOEHLIB)
|
1996-01-26 02:38:47 -05:00
|
|
|
|
|
|
|
## Major targets
|
2006-08-19 14:59:24 -04:00
|
|
|
|
2009-05-02 16:36:08 -04:00
|
|
|
all: libpng pngtest
|
2000-03-21 06:13:06 -05:00
|
|
|
|
2014-06-05 10:53:19 -04:00
|
|
|
# try !include scripts\pnglibconf.mak for more options
|
|
|
|
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
|
|
|
|
$(CP) $< $@
|
2010-04-17 09:17:51 -04:00
|
|
|
|
1996-01-26 02:38:47 -05:00
|
|
|
libpng: $(LIBNAME)
|
|
|
|
|
|
|
|
pngtest: pngtest$(MODEL).exe
|
|
|
|
|
1998-12-29 12:47:59 -05:00
|
|
|
test: pngtest$(MODEL).exe
|
1996-01-26 02:38:47 -05:00
|
|
|
pngtest$(MODEL)
|
|
|
|
|
|
|
|
## Minor Targets
|
|
|
|
|
2014-02-05 23:28:57 -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
|
1996-01-26 02:38:47 -05:00
|
|
|
|
|
|
|
$(LIBNAME): $(OBJS)
|
|
|
|
-del $(LIBNAME)
|
1999-09-17 13:27:26 -04:00
|
|
|
$(LIB) $(LIBNAME) @&&|
|
1996-01-26 02:38:47 -05:00
|
|
|
$(LIBOBJS), libpng$(MODEL)
|
|
|
|
|
|
|
|
|
|
2010-04-17 09:17:51 -04:00
|
|
|
pngtest$(MODEL).obj: pngtest.c png.h pngconf.h pnglibconf.h
|
1996-01-26 02:38:47 -05:00
|
|
|
$(CC) $(CFLAGS) -opngtest$(MODEL) -c pngtest.c
|
|
|
|
|
|
|
|
pngtest$(MODEL).exe: pngtest$(MODEL).obj
|
2000-03-21 06:13:06 -05:00
|
|
|
$(LD) $(LDFLAGS) pngtest$(MODEL).obj $(LIBNAME) zlib_$(MODEL).lib $(NOEHLIB)
|
1996-01-26 02:38:47 -05:00
|
|
|
|
|
|
|
# Clean up anything else you want
|
|
|
|
clean:
|
2010-04-17 09:17:51 -04:00
|
|
|
-del pnglibconf.h
|
1996-01-26 02:38:47 -05:00
|
|
|
-del *.obj
|
2000-03-21 06:13:06 -05:00
|
|
|
-del *.exe
|
1996-01-26 02:38:47 -05:00
|
|
|
-del *.lib
|
|
|
|
-del *.lst
|
2000-03-21 06:13:06 -05:00
|
|
|
-del *.map
|
1996-01-26 02:38:47 -05:00
|
|
|
|
|
|
|
# End of makefile for libpng
|