Home | History | Annotate | Line # | Download | only in delphi
zlibd32.mak revision 1.1
      1  1.1  christos # Makefile for zlib
      2  1.1  christos # For use with Delphi and C++ Builder under Win32
      3  1.1  christos # Updated for zlib 1.2.x by Cosmin Truta
      4  1.1  christos 
      5  1.1  christos # ------------ Borland C++ ------------
      6  1.1  christos 
      7  1.1  christos # This project uses the Delphi (fastcall/register) calling convention:
      8  1.1  christos LOC = -DZEXPORT=__fastcall -DZEXPORTVA=__cdecl
      9  1.1  christos 
     10  1.1  christos CC = bcc32
     11  1.1  christos LD = bcc32
     12  1.1  christos AR = tlib
     13  1.1  christos # do not use "-pr" in CFLAGS
     14  1.1  christos CFLAGS = -a -d -k- -O2 $(LOC)
     15  1.1  christos LDFLAGS =
     16  1.1  christos 
     17  1.1  christos 
     18  1.1  christos # variables
     19  1.1  christos ZLIB_LIB = zlib.lib
     20  1.1  christos 
     21  1.1  christos OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infback.obj
     22  1.1  christos OBJ2 = inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
     23  1.1  christos OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzio.obj+infback.obj
     24  1.1  christos OBJP2 = +inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj
     25  1.1  christos 
     26  1.1  christos 
     27  1.1  christos # targets
     28  1.1  christos all: $(ZLIB_LIB) example.exe minigzip.exe
     29  1.1  christos 
     30  1.1  christos .c.obj:
     31  1.1  christos 	$(CC) -c $(CFLAGS) $*.c
     32  1.1  christos 
     33  1.1  christos adler32.obj: adler32.c zlib.h zconf.h
     34  1.1  christos 
     35  1.1  christos compress.obj: compress.c zlib.h zconf.h
     36  1.1  christos 
     37  1.1  christos crc32.obj: crc32.c zlib.h zconf.h crc32.h
     38  1.1  christos 
     39  1.1  christos deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
     40  1.1  christos 
     41  1.1  christos gzio.obj: gzio.c zutil.h zlib.h zconf.h
     42  1.1  christos 
     43  1.1  christos infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
     44  1.1  christos  inffast.h inffixed.h
     45  1.1  christos 
     46  1.1  christos inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
     47  1.1  christos  inffast.h
     48  1.1  christos 
     49  1.1  christos inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
     50  1.1  christos  inffast.h inffixed.h
     51  1.1  christos 
     52  1.1  christos inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
     53  1.1  christos 
     54  1.1  christos trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h
     55  1.1  christos 
     56  1.1  christos uncompr.obj: uncompr.c zlib.h zconf.h
     57  1.1  christos 
     58  1.1  christos zutil.obj: zutil.c zutil.h zlib.h zconf.h
     59  1.1  christos 
     60  1.1  christos example.obj: example.c zlib.h zconf.h
     61  1.1  christos 
     62  1.1  christos minigzip.obj: minigzip.c zlib.h zconf.h
     63  1.1  christos 
     64  1.1  christos 
     65  1.1  christos # For the sake of the old Borland make,
     66  1.1  christos # the command line is cut to fit in the MS-DOS 128 byte limit:
     67  1.1  christos $(ZLIB_LIB): $(OBJ1) $(OBJ2)
     68  1.1  christos 	-del $(ZLIB_LIB)
     69  1.1  christos 	$(AR) $(ZLIB_LIB) $(OBJP1)
     70  1.1  christos 	$(AR) $(ZLIB_LIB) $(OBJP2)
     71  1.1  christos 
     72  1.1  christos 
     73  1.1  christos # testing
     74  1.1  christos test: example.exe minigzip.exe
     75  1.1  christos 	example
     76  1.1  christos 	echo hello world | minigzip | minigzip -d
     77  1.1  christos 
     78  1.1  christos example.exe: example.obj $(ZLIB_LIB)
     79  1.1  christos 	$(LD) $(LDFLAGS) example.obj $(ZLIB_LIB)
     80  1.1  christos 
     81  1.1  christos minigzip.exe: minigzip.obj $(ZLIB_LIB)
     82  1.1  christos 	$(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB)
     83  1.1  christos 
     84  1.1  christos 
     85  1.1  christos # cleanup
     86  1.1  christos clean:
     87  1.1  christos 	-del *.obj
     88  1.1  christos 	-del *.exe
     89  1.1  christos 	-del *.lib
     90  1.1  christos 	-del *.tds
     91  1.1  christos 	-del zlib.bak
     92  1.1  christos 	-del foo.gz
     93  1.1  christos 
     94