Home | History | Annotate | Line # | Download | only in win32
Makefile.bor revision 1.1.1.2
      1      1.1  christos # Makefile for zlib
      2      1.1  christos # Borland C++ for Win32
      3      1.1  christos #
      4      1.1  christos # Usage:
      5      1.1  christos #  make -f win32/Makefile.bor
      6      1.1  christos #  make -f win32/Makefile.bor LOCAL_ZLIB=-DASMV OBJA=match.obj OBJPA=+match.obj
      7      1.1  christos 
      8      1.1  christos # ------------ Borland C++ ------------
      9      1.1  christos 
     10      1.1  christos # Optional nonstandard preprocessor flags (e.g. -DMAX_MEM_LEVEL=7)
     11      1.1  christos # should be added to the environment via "set LOCAL_ZLIB=-DFOO" or
     12      1.1  christos # added to the declaration of LOC here:
     13      1.1  christos LOC = $(LOCAL_ZLIB)
     14      1.1  christos 
     15      1.1  christos CC = bcc32
     16      1.1  christos AS = bcc32
     17      1.1  christos LD = bcc32
     18      1.1  christos AR = tlib
     19      1.1  christos CFLAGS  = -a -d -k- -O2 $(LOC)
     20      1.1  christos ASFLAGS = $(LOC)
     21      1.1  christos LDFLAGS = $(LOC)
     22      1.1  christos 
     23      1.1  christos 
     24      1.1  christos # variables
     25      1.1  christos ZLIB_LIB = zlib.lib
     26      1.1  christos 
     27  1.1.1.2  christos OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzlib.obj gzread.obj
     28  1.1.1.2  christos OBJ2 = gzwrite.obj infback.obj inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
     29      1.1  christos #OBJA =
     30  1.1.1.2  christos OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzclose.obj+gzlib.obj+gzread.obj
     31  1.1.1.2  christos OBJP2 = +gzwrite.obj+infback.obj+inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj
     32      1.1  christos #OBJPA=
     33      1.1  christos 
     34      1.1  christos 
     35      1.1  christos # targets
     36      1.1  christos all: $(ZLIB_LIB) example.exe minigzip.exe
     37      1.1  christos 
     38      1.1  christos .c.obj:
     39      1.1  christos 	$(CC) -c $(CFLAGS) $<
     40      1.1  christos 
     41      1.1  christos .asm.obj:
     42      1.1  christos 	$(AS) -c $(ASFLAGS) $<
     43      1.1  christos 
     44      1.1  christos adler32.obj: adler32.c zlib.h zconf.h
     45      1.1  christos 
     46      1.1  christos compress.obj: compress.c zlib.h zconf.h
     47      1.1  christos 
     48      1.1  christos crc32.obj: crc32.c zlib.h zconf.h crc32.h
     49      1.1  christos 
     50      1.1  christos deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
     51      1.1  christos 
     52  1.1.1.2  christos gzclose.obj: gzclose.c zlib.h zconf.h gzguts.h
     53  1.1.1.2  christos 
     54  1.1.1.2  christos gzlib.obj: gzlib.c zlib.h zconf.h gzguts.h
     55  1.1.1.2  christos 
     56  1.1.1.2  christos gzread.obj: gzread.c zlib.h zconf.h gzguts.h
     57  1.1.1.2  christos 
     58  1.1.1.2  christos gzwrite.obj: gzwrite.c zlib.h zconf.h gzguts.h
     59      1.1  christos 
     60      1.1  christos infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
     61      1.1  christos  inffast.h inffixed.h
     62      1.1  christos 
     63      1.1  christos inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
     64      1.1  christos  inffast.h
     65      1.1  christos 
     66      1.1  christos inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
     67      1.1  christos  inffast.h inffixed.h
     68      1.1  christos 
     69      1.1  christos inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
     70      1.1  christos 
     71      1.1  christos trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h
     72      1.1  christos 
     73      1.1  christos uncompr.obj: uncompr.c zlib.h zconf.h
     74      1.1  christos 
     75      1.1  christos zutil.obj: zutil.c zutil.h zlib.h zconf.h
     76      1.1  christos 
     77  1.1.1.2  christos example.obj: test/example.c zlib.h zconf.h
     78      1.1  christos 
     79  1.1.1.2  christos minigzip.obj: test/minigzip.c zlib.h zconf.h
     80      1.1  christos 
     81      1.1  christos 
     82      1.1  christos # For the sake of the old Borland make,
     83      1.1  christos # the command line is cut to fit in the MS-DOS 128 byte limit:
     84      1.1  christos $(ZLIB_LIB): $(OBJ1) $(OBJ2) $(OBJA)
     85      1.1  christos 	-del $(ZLIB_LIB)
     86      1.1  christos 	$(AR) $(ZLIB_LIB) $(OBJP1)
     87      1.1  christos 	$(AR) $(ZLIB_LIB) $(OBJP2)
     88      1.1  christos 	$(AR) $(ZLIB_LIB) $(OBJPA)
     89      1.1  christos 
     90      1.1  christos 
     91      1.1  christos # testing
     92      1.1  christos test: example.exe minigzip.exe
     93      1.1  christos 	example
     94      1.1  christos 	echo hello world | minigzip | minigzip -d
     95      1.1  christos 
     96      1.1  christos example.exe: example.obj $(ZLIB_LIB)
     97      1.1  christos 	$(LD) $(LDFLAGS) example.obj $(ZLIB_LIB)
     98      1.1  christos 
     99      1.1  christos minigzip.exe: minigzip.obj $(ZLIB_LIB)
    100      1.1  christos 	$(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB)
    101      1.1  christos 
    102      1.1  christos 
    103      1.1  christos # cleanup
    104      1.1  christos clean:
    105  1.1.1.2  christos 	-del $(ZLIB_LIB)
    106      1.1  christos 	-del *.obj
    107      1.1  christos 	-del *.exe
    108      1.1  christos 	-del *.tds
    109      1.1  christos 	-del zlib.bak
    110      1.1  christos 	-del foo.gz
    111