This repository has been archived on 2023-11-11. You can view files and clone it, but cannot push or open issues or pull requests.
libpng/scripts/makefile.bor

157 lines
3.0 KiB
Plaintext
Raw Normal View History

1996-01-26 07:38:47 +00:00
# Makefile for libpng
2000-03-21 11:13:06 +00: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 07:38:47 +00:00
#
2000-03-21 11:13:06 +00:00
# ------------ Borland C++ ------------
1996-01-26 07:38:47 +00:00
### Absolutely necessary for this makefile to work
.AUTODEPEND
2000-03-21 11:13:06 +00:00
## Where zlib.h, zconf.h and zlib_MODEL.lib are
ZLIB_DIR=..\zlib
1996-01-26 07:38:47 +00:00
2000-03-21 11:13:06 +00:00
## Compiler, linker and lib stuff
CC=bcc
LD=bcc
LIB=tlib
1996-01-26 07:38:47 +00:00
!ifndef MODEL
MODEL=l
!endif
2000-03-21 11:13:06 +00:00
MODEL_ARG=-m$(MODEL)
1996-01-26 07:38:47 +00:00
#TARGET_CPU=3
# 2 = 286, 3 = 386, etc.
!ifndef TARGET_CPU
TARGET_CPU=2
!endif
2000-03-21 11:13:06 +00: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 07:38:47 +00: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 11:13:06 +00:00
# -X- turn on dependency generation in the object file
# -w set all warnings on
1996-01-26 07:38:47 +00:00
# -O2 optimize for speed
# -Z global optimization
CFLAGS=-DPNG_CONFIGURE_LIBPNG -O2 -Z -X- -w -I$(ZLIB_DIR) -$(TARGET_CPU) $(MODEL_ARG) $(CDEBUG)
1996-01-26 07:38:47 +00:00
# -M generate map file
2000-03-21 11:13:06 +00:00
LDFLAGS=-M -L$(ZLIB_DIR) $(MODEL_ARG) $(LDEBUG)
1996-01-26 07:38:47 +00:00
2000-03-21 11:13:06 +00:00
## Variables
1996-01-26 07:38:47 +00:00
OBJS = \
2000-03-21 11:13:06 +00: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 07:38:47 +00:00
LIBOBJS = \
2000-03-21 11:13:06 +00: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 07:38:47 +00:00
LIBNAME=libpng$(MODEL).lib
## Implicit rules
1996-01-26 07:38:47 +00: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 11:13:06 +00:00
$(CC) $(CFLAGS) $(LDFLAGS) $*.c $(LIBNAME) zlib_$(MODEL).lib $(NOEHLIB)
1996-01-26 07:38:47 +00:00
## Major targets
2000-03-21 11:13:06 +00:00
all: libpng pngtest
1996-01-26 07:38:47 +00:00
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 png.h pngconf.h
pngerror.obj: pngerror.c png.h pngconf.h
pngget.obj: pngget.c png.h pngconf.h
pngmem.obj: pngmem.c png.h pngconf.h
pngpread.obj: pngpread.c png.h pngconf.h
pngread.obj: pngread.c png.h pngconf.h
pngrio.obj: pngrio.c png.h pngconf.h
pngrtran.obj: pngrtran.c png.h pngconf.h
pngrutil.obj: pngrutil.c png.h pngconf.h
pngset.obj: pngset.c png.h pngconf.h
pngtrans.obj: pngtrans.c png.h pngconf.h
pngwio.obj: pngwio.c png.h pngconf.h
pngwrite.obj: pngwrite.c png.h pngconf.h
pngwtran.obj: pngwtran.c png.h pngconf.h
pngwutil.obj: pngwutil.c png.h pngconf.h
1996-01-26 07:38:47 +00:00
$(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 png.h pngconf.h
1996-01-26 07:38:47 +00:00
$(CC) $(CFLAGS) -opngtest$(MODEL) -c pngtest.c
pngtest$(MODEL).exe: pngtest$(MODEL).obj
2000-03-21 11:13:06 +00:00
$(LD) $(LDFLAGS) pngtest$(MODEL).obj $(LIBNAME) zlib_$(MODEL).lib $(NOEHLIB)
1996-01-26 07:38:47 +00:00
# Clean up anything else you want
clean:
-del *.obj
2000-03-21 11:13:06 +00:00
-del *.exe
1996-01-26 07:38:47 +00:00
-del *.lib
-del *.lst
2000-03-21 11:13:06 +00:00
-del *.map
1996-01-26 07:38:47 +00:00
# End of makefile for libpng