2000-03-21 11:13:06 +00: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 20:37:28 +00:00
|
|
|
# -------------------- 32-bit Borland C++ --------------------
|
2000-03-21 11:13:06 +00:00
|
|
|
|
|
|
|
### Absolutely necessary for this makefile to work
|
|
|
|
.AUTODEPEND
|
|
|
|
|
|
|
|
## Where zlib.h, zconf.h and zlib.lib are
|
|
|
|
ZLIB_DIR=..\zlib
|
|
|
|
|
|
|
|
## Compiler, linker and lib stuff
|
|
|
|
CC=bcc32
|
|
|
|
LD=bcc32
|
|
|
|
LIB=tlib
|
|
|
|
|
2006-02-21 04:09:05 +00:00
|
|
|
# -3 = 386, -4 = 486, -5 = Pentium etc.
|
2000-03-21 11:13:06 +00:00
|
|
|
!ifndef TARGET_CPU
|
2006-02-21 04:09:05 +00:00
|
|
|
#TARGET_CPU=-6
|
2000-03-21 11:13:06 +00:00
|
|
|
!endif
|
|
|
|
|
|
|
|
# Use this if you don't want Borland's fancy exception handling
|
2006-02-21 04:09:05 +00:00
|
|
|
# (Caution: doesn't work with CBuilderX)
|
|
|
|
#NOEHLIB=noeh32.lib
|
2000-03-21 11:13:06 +00: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-21 04:09:05 +00:00
|
|
|
# -d merge duplicate strings
|
|
|
|
# -k- turn off standard stack frame
|
|
|
|
# -w display all warnings
|
|
|
|
CFLAGS=-I$(ZLIB_DIR) -O2 -d -k- -w $(TARGET_CPU) $(CDEBUG)
|
2000-03-21 11:13:06 +00:00
|
|
|
|
|
|
|
# -M generate map file
|
2006-02-21 04:09:05 +00:00
|
|
|
LDFLAGS=-L$(ZLIB_DIR) -M $(LDEBUG)
|
2000-03-21 11:13:06 +00: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:
|
|
|
|
$(CC) $(CFLAGS) -c {$*.c }
|
|
|
|
|
|
|
|
.c.exe:
|
|
|
|
$(CC) $(CFLAGS) $(LDFLAGS) $*.c $(LIBNAME) zlib.lib $(NOEHLIB)
|
|
|
|
|
|
|
|
.obj.exe:
|
|
|
|
$(LD) $(LDFLAGS) $*.obj $(LIBNAME) zlib.lib $(NOEHLIB)
|
|
|
|
|
|
|
|
## Major targets
|
|
|
|
all: libpng pngtest
|
|
|
|
|
|
|
|
libpng: $(LIBNAME)
|
|
|
|
|
|
|
|
pngtest: pngtest.exe
|
|
|
|
|
|
|
|
test: pngtest.exe
|
|
|
|
pngtest
|
|
|
|
|
|
|
|
## Minor Targets
|
|
|
|
|
2009-05-07 22:12:33 +00:00
|
|
|
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
|
|
|
|
pngtest.obj: pngtest.c png.h pngconf.h
|
2000-03-21 11:13:06 +00:00
|
|
|
|
|
|
|
$(LIBNAME): $(OBJS)
|
|
|
|
-del $(LIBNAME)
|
|
|
|
$(LIB) $(LIBNAME) @&&|
|
|
|
|
$(LIBOBJS), libpng
|
|
|
|
|
|
|
|
|
|
2006-02-21 04:09:05 +00:00
|
|
|
# Cleanup
|
2000-03-21 11:13:06 +00:00
|
|
|
clean:
|
|
|
|
-del *.obj
|
2006-02-21 04:09:05 +00:00
|
|
|
-del $(LIBNAME)
|
|
|
|
-del pngtest.exe
|
2000-03-21 11:13:06 +00:00
|
|
|
-del *.lst
|
|
|
|
-del *.map
|
|
|
|
-del *.tds
|
2006-02-21 04:09:05 +00:00
|
|
|
-del pngout.png
|
2000-03-21 11:13:06 +00:00
|
|
|
|
|
|
|
# End of makefile for libpng
|