libpng/scripts/makefile.borland

169 lines
2.8 KiB
Plaintext
Raw Normal View History

1996-01-26 07:38:47 +00:00
# Makefile for libpng
# Borland C++ 4.5 (Note: All modules are compiled in C mode)
# Will work with C++ 4.02 also
# To build the library, do:
1999-10-01 19:22:25 +00:00
# "make -fmakefile.borland -DMODEL=m"
# or: "make -fmakefile.borland -DMODEL=l"
1996-01-26 07:38:47 +00:00
#
# ------------- Borland C++ 4.5 -------------
### Absolutely necessary for this makefile to work
.AUTODEPEND
## Useful user options
# Usually defined in builtins.mak or the environment
# Currently unused.
!ifndef BCROOT
BCROOT=N:\BC45
!endif
# Where zlib.h and zconf.h and zlib.lib are
ZLIB_PATH=..\zlib
!ifndef MODEL
MODEL=l
!endif
#TARGET_CPU=3
# 2 = 286, 3 = 386, etc.
!ifndef TARGET_CPU
TARGET_CPU=2
!endif
# Use this if you don't want Borland's fancy exception handling.
NOEHLIB=noeh$(MODEL).lib
!ifdef DEBUG
CDEBUG=-v
LDEBUG=-v
!else
CDEBUG=
LDEBUG=
!endif
# STACKOFLOW=1
!ifdef STACKOFLOW
CDEBUG=$(CDEBUG) -N
LDEBUG=$(LDEBUG) -N
!endif
## Compiler, linker, and lib stuff
CC=bcc
LD=bcc
LIB=tlib
MODELARG=-m$(MODEL)
# -X- turns on dependency generation in the object file
# -w sets all warnings on
# -O2 optimize for speed
# -Z global optimization
CFLAGS=-O2 -Z -X- -w -I$(ZLIB_PATH) -$(TARGET_CPU) $(MODELARG) $(CDEBUG)
# -M generate map file
LDFLAGS=-M $(LDEBUG)
O=obj
## variables
OBJS = \
1999-09-17 17:27:26 +00:00
png.$(O) \
pngerror.$(O) \
pngmem.$(O) \
pngpread.$(O) \
pngset.$(O) \
pngget.$(O) \
pngread.$(O) \
pngrio.$(O) \
pngrtran.$(O) \
pngrutil.$(O) \
pngtrans.$(O) \
pngwrite.$(O) \
pngwtran.$(O) \
pngwio.$(O) \
pngwutil.$(O)
1996-01-26 07:38:47 +00:00
LIBOBJS = \
1999-09-17 17:27:26 +00:00
+png.$(O) \
+pngerror.$(O) \
+pngmem.$(O) \
+pngpread.$(O) \
+pngread.$(O) \
+pngset.$(O) \
+pngget.$(O) \
+pngrio.$(O) \
+pngrtran.$(O) \
+pngrutil.$(O) \
+pngtrans.$(O) \
+pngwrite.$(O) \
+pngwtran.$(O) \
+pngwio.$(O) \
+pngwutil.$(O)
1996-01-26 07:38:47 +00:00
LIBNAME=libpng$(MODEL).lib
## Implicit rules
# Braces let make "batch" calls to the compiler,
# 2 calls instead of 12; space is important.
.c.obj:
$(CC) $(CFLAGS) -c {$*.c }
.c.exe:
$(CC) $(CFLAGS) $(LDFLAGS) $*.c
## Major targets
libpng: $(LIBNAME)
pngtest: pngtest$(MODEL).exe
1998-12-29 17:47:59 +00:00
test: pngtest$(MODEL).exe
1996-01-26 07:38:47 +00:00
pngtest$(MODEL)
## Minor Targets
png.obj: png.c
1997-05-16 07:46:07 +00:00
pngset.obj: pngset.c
pngget.obj: pngget.c
1996-01-26 07:38:47 +00:00
pngread.obj: pngread.c
pngpread.obj: pngpread.c
pngrtran.obj: pngrtran.c
pngrutil.obj: pngrutil.c
pngerror.obj: pngerror.c
pngmem.obj: pngmem.c
1996-06-05 20:50:50 +00:00
pngrio.obj: pngrio.c
pngwio.obj: pngwio.c
1996-01-26 07:38:47 +00:00
pngtrans.obj: pngtrans.c
pngwrite.obj: pngwrite.c
pngwtran.obj: pngwtran.c
pngwutil.obj: pngwutil.c
$(LIBNAME): $(OBJS)
-del $(LIBNAME)
1999-09-17 17:27:26 +00:00
$(LIB) $(LIBNAME) @&&|
1996-01-26 07:38:47 +00:00
$(LIBOBJS), libpng$(MODEL)
|
pngtest$(MODEL).obj: pngtest.c
$(CC) $(CFLAGS) -opngtest$(MODEL) -c pngtest.c
pngtest$(MODEL).exe: pngtest$(MODEL).obj
$(CC) $(MODELARG) $(LDFLAGS) -L$(ZLIB_PATH) pngtest$(MODEL).obj $(LIBNAME) zlib$(MODEL).lib $(NOEHLIB)
# Clean up anything else you want
clean:
-del *.obj
-del *.lib
-del *.lst
# End of makefile for libpng