all repos — mgba @ 81a52403a3583039f4e571f1516cd0efe4872c4b

mGBA Game Boy Advance Emulator

src/third-party/libpng/scripts/makefile.bc32 (view raw)

  1# Makefile for libpng
  2# 32-bit Borland C++ (Note: All modules are compiled in C mode)
  3# To build the library, do:
  4#       "make -fmakefile.bc32"
  5#
  6# -------------------- 32-bit Borland C++ --------------------
  7
  8### Absolutely necessary for this makefile to work
  9.AUTODEPEND
 10
 11## Where zlib.h, zconf.h and zlib.lib are
 12ZLIB_DIR=..\zlib
 13
 14## Compiler, linker, librarian and other tools
 15CC=bcc32
 16LD=bcc32
 17LIB=tlib
 18CP=copy
 19
 20# -3 = 386, -4 = 486, -5 = Pentium etc.
 21!ifndef TARGET_CPU
 22#TARGET_CPU=-6
 23!endif
 24
 25# Use this if you don't want Borland's fancy exception handling
 26# (Caution: doesn't work with CBuilderX)
 27#NOEHLIB=noeh32.lib
 28
 29!ifdef DEBUG
 30CDEBUG=-v
 31LDEBUG=-v
 32!else
 33CDEBUG=
 34LDEBUG=
 35!endif
 36
 37# STACKOFLOW=1
 38!ifdef STACKOFLOW
 39CDEBUG=$(CDEBUG) -N
 40LDEBUG=$(LDEBUG) -N
 41!endif
 42
 43# -O2 optimize for speed
 44# -d  merge duplicate strings
 45# -k- turn off standard stack frame
 46# -w  display all warnings
 47CPPFLAGS=-I$(ZLIB_DIR)
 48CFLAGS=-O2 -d -k- -w $(TARGET_CPU) $(CDEBUG)
 49
 50# -M  generate map file
 51LDFLAGS=-L$(ZLIB_DIR) -M $(LDEBUG)
 52
 53# Pre-built configuration
 54# See scripts\pnglibconf.mak for more options
 55!ifndef PNGLIBCONF_H_PREBUILT
 56PNGLIBCONF_H_PREBUILT = scripts\pnglibconf.h.prebuilt
 57!endif
 58
 59## Variables
 60OBJS = \
 61	png.obj \
 62	pngerror.obj \
 63	pngget.obj \
 64	pngmem.obj \
 65	pngpread.obj \
 66	pngread.obj \
 67	pngrio.obj \
 68	pngrtran.obj \
 69	pngrutil.obj \
 70	pngset.obj \
 71	pngtrans.obj \
 72	pngwio.obj \
 73	pngwrite.obj \
 74	pngwtran.obj \
 75	pngwutil.obj
 76
 77LIBOBJS = \
 78	+png.obj \
 79	+pngerror.obj \
 80	+pngget.obj \
 81	+pngmem.obj \
 82	+pngpread.obj \
 83	+pngread.obj \
 84	+pngrio.obj \
 85	+pngrtran.obj \
 86	+pngrutil.obj \
 87	+pngset.obj \
 88	+pngtrans.obj \
 89	+pngwio.obj \
 90	+pngwrite.obj \
 91	+pngwtran.obj \
 92	+pngwutil.obj
 93
 94LIBNAME=libpng.lib
 95
 96## Implicit rules
 97# Braces let make "batch" calls to the compiler,
 98# 2 calls instead of 12; space is important.
 99.c.obj:
100	$(CC) $(CPPFLAGS) $(CFLAGS) -c {$*.c }
101
102.c.exe:
103	$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $*.c \
104	  $(LIBNAME) zlib.lib $(NOEHLIB)
105
106.obj.exe:
107	$(LD) $(LDFLAGS) $*.obj $(LIBNAME) zlib.lib $(NOEHLIB)
108
109## Major targets
110all: libpng pngtest
111
112libpng: $(LIBNAME)
113
114pngtest: pngtest.exe
115
116test: pngtest.exe
117	pngtest
118
119## Minor Targets
120
121pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
122	$(CP) $(PNGLIBCONF_H_PREBUILT) $@
123
124png.obj: png.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
125pngerror.obj: pngerror.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
126pngget.obj: pngget.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
127pngmem.obj: pngmem.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
128pngpread.obj: pngpread.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
129pngread.obj: pngread.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
130pngrio.obj: pngrio.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
131pngrtran.obj: pngrtran.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
132pngrutil.obj: pngrutil.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
133pngset.obj: pngset.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
134pngtrans.obj: pngtrans.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
135pngwio.obj: pngwio.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
136pngwrite.obj: pngwrite.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
137pngwtran.obj: pngwtran.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
138pngwutil.obj: pngwutil.c png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
139pngtest.obj: pngtest.c png.h pngconf.h pnglibconf.h
140
141$(LIBNAME): $(OBJS)
142	-del $(LIBNAME)
143	$(LIB) $(LIBNAME) @&&|
144$(LIBOBJS), libpng
145|
146
147# Cleanup
148clean:
149	-del pnglibconf.h
150	-del *.obj
151	-del $(LIBNAME)
152	-del pngtest.exe
153	-del *.lst
154	-del *.map
155	-del *.tds
156	-del pngout.png
157
158# End of makefile for libpng