2015-01-17 14:53:18 -05:00
|
|
|
# Makefile for libpng
|
|
|
|
# TurboC/C++ (Note: All modules are compiled in C mode)
|
|
|
|
|
|
|
|
# To use, do "make -fmakefile.tc3"
|
|
|
|
|
2017-06-05 15:10:38 -04:00
|
|
|
# ----- Turbo C++ 3.0 -----
|
2015-01-17 14:53:18 -05:00
|
|
|
|
|
|
|
MODEL=l
|
2017-06-05 15:10:38 -04:00
|
|
|
CPPFLAGS=-I..\zlib
|
|
|
|
CFLAGS=-O2 -Z -m$(MODEL)
|
2015-01-17 14:53:18 -05:00
|
|
|
CC=tcc
|
|
|
|
LD=tcc
|
|
|
|
LIB=tlib
|
|
|
|
LDFLAGS=-m$(MODEL) -L..\zlib
|
2017-06-05 15:10:38 -04:00
|
|
|
CP=copy
|
|
|
|
|
|
|
|
# Pre-built configuration
|
|
|
|
# See scripts\pnglibconf.mak for more options
|
|
|
|
!ifndef PNGLIBCONF_H_PREBUILT
|
|
|
|
PNGLIBCONF_H_PREBUILT = scripts\pnglibconf.h.prebuilt
|
|
|
|
!endif
|
|
|
|
|
2015-01-17 14:53:18 -05:00
|
|
|
O=.obj
|
|
|
|
E=.exe
|
|
|
|
|
|
|
|
# variables
|
|
|
|
OBJS1 = png$(O) pngset$(O) pngget$(O) pngrutil$(O) pngtrans$(O) pngwutil$(O)
|
|
|
|
OBJS2 = pngmem$(O) pngpread$(O) pngread$(O) pngerror$(O) pngwrite$(O)
|
|
|
|
OBJS3 = pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O)
|
|
|
|
OBJSL1 = +png$(O) +pngset$(O) +pngget$(O) +pngrutil$(O) +pngtrans$(O)
|
|
|
|
OBJSL2 = +pngwutil$(O) +pngmem$(O) +pngpread$(O) +pngread$(O) +pngerror$(O)
|
|
|
|
OBJSL3 = +pngwrite$(O) +pngrtran$(O) +pngwtran$(O) +pngrio$(O) +pngwio$(O)
|
|
|
|
|
|
|
|
all: libpng$(MODEL).lib pngtest$(E)
|
|
|
|
|
2017-06-05 15:10:38 -04:00
|
|
|
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
|
|
|
|
$(CP) $(PNGLIBCONF_H_PREBUILT) $@
|
2015-01-17 14:53:18 -05:00
|
|
|
|
|
|
|
pngtest: pngtest$(E)
|
|
|
|
|
|
|
|
test: pngtest$(E)
|
|
|
|
pngtest$(E)
|
|
|
|
|
|
|
|
png$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
2017-06-05 15:10:38 -04:00
|
|
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
|
2015-01-17 14:53:18 -05:00
|
|
|
|
|
|
|
pngset$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
2017-06-05 15:10:38 -04:00
|
|
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
|
2015-01-17 14:53:18 -05:00
|
|
|
|
|
|
|
pngget$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
2017-06-05 15:10:38 -04:00
|
|
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
|
2015-01-17 14:53:18 -05:00
|
|
|
|
|
|
|
pngread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
2017-06-05 15:10:38 -04:00
|
|
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
|
2015-01-17 14:53:18 -05:00
|
|
|
|
|
|
|
pngpread$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
2017-06-05 15:10:38 -04:00
|
|
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
|
2015-01-17 14:53:18 -05:00
|
|
|
|
|
|
|
pngrtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
2017-06-05 15:10:38 -04:00
|
|
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
|
2015-01-17 14:53:18 -05:00
|
|
|
|
|
|
|
pngrutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
2017-06-05 15:10:38 -04:00
|
|
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
|
2015-01-17 14:53:18 -05:00
|
|
|
|
|
|
|
pngerror$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
2017-06-05 15:10:38 -04:00
|
|
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
|
2015-01-17 14:53:18 -05:00
|
|
|
|
|
|
|
pngmem$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
2017-06-05 15:10:38 -04:00
|
|
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
|
2015-01-17 14:53:18 -05:00
|
|
|
|
|
|
|
pngrio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
2017-06-05 15:10:38 -04:00
|
|
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
|
2015-01-17 14:53:18 -05:00
|
|
|
|
|
|
|
pngwio$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
2017-06-05 15:10:38 -04:00
|
|
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
|
2015-01-17 14:53:18 -05:00
|
|
|
|
|
|
|
pngtest$(O): png.h pngconf.h pnglibconf.h
|
2017-06-05 15:10:38 -04:00
|
|
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
|
2015-01-17 14:53:18 -05:00
|
|
|
|
|
|
|
pngtrans$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
2017-06-05 15:10:38 -04:00
|
|
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
|
2015-01-17 14:53:18 -05:00
|
|
|
|
|
|
|
pngwrite$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
2017-06-05 15:10:38 -04:00
|
|
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
|
2015-01-17 14:53:18 -05:00
|
|
|
|
|
|
|
pngwtran$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
2017-06-05 15:10:38 -04:00
|
|
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
|
2015-01-17 14:53:18 -05:00
|
|
|
|
|
|
|
pngwutil$(O): png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
2017-06-05 15:10:38 -04:00
|
|
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $*.c
|
2015-01-17 14:53:18 -05:00
|
|
|
|
|
|
|
libpng$(MODEL).lib: $(OBJS1) $(OBJS2) $(OBJS3)
|
|
|
|
$(LIB) libpng$(MODEL) +$(OBJSL1)
|
|
|
|
$(LIB) libpng$(MODEL) +$(OBJSL2)
|
|
|
|
$(LIB) libpng$(MODEL) +$(OBJSL3)
|
|
|
|
|
|
|
|
pngtest$(E): pngtest$(O) libpng$(MODEL).lib
|
|
|
|
$(LD) $(LDFLAGS) pngtest.obj libpng$(MODEL).lib zlib_$(MODEL).lib
|
|
|
|
|
|
|
|
# End of makefile for libpng
|