libpng/scripts/makefile.bor

157 lines
3.4 KiB
Plaintext
Raw Normal View History

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
2000-03-21 06:13:06 -05:00
## Compiler, linker and lib stuff
CC=bcc
LD=bcc
LIB=tlib
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
CFLAGS=-O2 -Z -X- -w -I$(ZLIB_DIR) -$(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
2000-03-21 06:13:06 -05:00
## Variables
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
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:
$(CC) $(CFLAGS) -c {$*.c }
.c.exe:
2000-03-21 06:13:06 -05:00
$(CC) $(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
all: libpng pngtest
2000-03-21 06:13:06 -05: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
png.obj: png.c png.h pngconf.h pngpriv.h pngstruct.h pnginfo.h
pngerror.obj: pngerror.c png.h pngconf.h pngpriv.h pngstruct.h pnginfo.h
pngget.obj: pngget.c png.h pngconf.h pngpriv.h pngstruct.h pnginfo.h
pngmem.obj: pngmem.c png.h pngconf.h pngpriv.h pngstruct.h pnginfo.h
pngpread.obj: pngpread.c png.h pngconf.h pngpriv.h pngstruct.h pnginfo.h
pngread.obj: pngread.c png.h pngconf.h pngpriv.h pngstruct.h pnginfo.h
pngrio.obj: pngrio.c png.h pngconf.h pngpriv.h pngstruct.h pnginfo.h
pngrtran.obj: pngrtran.c png.h pngconf.h pngpriv.h pngstruct.h pnginfo.h
pngrutil.obj: pngrutil.c png.h pngconf.h pngpriv.h pngstruct.h pnginfo.h
pngset.obj: pngset.c png.h pngconf.h pngpriv.h pngstruct.h pnginfo.h
pngtrans.obj: pngtrans.c png.h pngconf.h pngpriv.h pngstruct.h pnginfo.h
pngwio.obj: pngwio.c png.h pngconf.h pngpriv.h pngstruct.h pnginfo.h
pngwrite.obj: pngwrite.c png.h pngconf.h pngpriv.h pngstruct.h pnginfo.h
pngwtran.obj: pngwtran.c png.h pngconf.h pngpriv.h pngstruct.h pnginfo.h
pngwutil.obj: pngwutil.c png.h pngconf.h pngpriv.h pngstruct.h pnginfo.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)
|
pngtest$(MODEL).obj: pngtest.c png.h pngconf.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:
-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