Home | History | Annotate | Line # | Download | only in msdos
      1      1.1  christos # Makefile for zlib
      2      1.1  christos # Turbo C 2.01, Turbo C++ 1.01
      3      1.1  christos # Last updated: 15-Mar-2003
      4      1.1  christos 
      5      1.1  christos # To use, do "make -fmakefile.tc"
      6      1.1  christos # To compile in small model, set below: MODEL=s
      7      1.1  christos 
      8      1.1  christos # WARNING: the small model is supported but only for small values of
      9      1.1  christos # MAX_WBITS and MAX_MEM_LEVEL. For example:
     10      1.1  christos #    -DMAX_WBITS=11 -DMAX_MEM_LEVEL=3
     11      1.1  christos # If you wish to reduce the memory requirements (default 256K for big
     12      1.1  christos # objects plus a few K), you can add to CFLAGS below:
     13      1.1  christos #   -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14
     14      1.1  christos # See zconf.h for details about the memory requirements.
     15      1.1  christos 
     16      1.1  christos # ------------ Turbo C 2.01, Turbo C++ 1.01 ------------
     17      1.1  christos MODEL=l
     18      1.1  christos CC=tcc
     19      1.1  christos LD=tcc
     20      1.1  christos AR=tlib
     21      1.1  christos # CFLAGS=-O2 -G -Z -m$(MODEL) -DMAX_WBITS=11 -DMAX_MEM_LEVEL=3
     22      1.1  christos CFLAGS=-O2 -G -Z -m$(MODEL)
     23      1.1  christos LDFLAGS=-m$(MODEL) -f-
     24      1.1  christos 
     25      1.1  christos 
     26      1.1  christos # variables
     27      1.1  christos ZLIB_LIB = zlib_$(MODEL).lib
     28      1.1  christos 
     29  1.1.1.2  christos OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzlib.obj gzread.obj
     30  1.1.1.2  christos OBJ2 = gzwrite.obj infback.obj inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
     31  1.1.1.2  christos OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzclose.obj+gzlib.obj+gzread.obj
     32  1.1.1.2  christos OBJP2 = +gzwrite.obj+infback.obj+inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj
     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) $*.c
     40      1.1  christos 
     41      1.1  christos adler32.obj: adler32.c zlib.h zconf.h
     42      1.1  christos 
     43      1.1  christos compress.obj: compress.c zlib.h zconf.h
     44      1.1  christos 
     45      1.1  christos crc32.obj: crc32.c zlib.h zconf.h crc32.h
     46      1.1  christos 
     47      1.1  christos deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
     48      1.1  christos 
     49  1.1.1.2  christos gzclose.obj: gzclose.c zlib.h zconf.h gzguts.h
     50  1.1.1.2  christos 
     51  1.1.1.2  christos gzlib.obj: gzlib.c zlib.h zconf.h gzguts.h
     52  1.1.1.2  christos 
     53  1.1.1.2  christos gzread.obj: gzread.c zlib.h zconf.h gzguts.h
     54  1.1.1.2  christos 
     55  1.1.1.2  christos gzwrite.obj: gzwrite.c zlib.h zconf.h gzguts.h
     56      1.1  christos 
     57      1.1  christos infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
     58      1.1  christos  inffast.h inffixed.h
     59      1.1  christos 
     60      1.1  christos inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
     61      1.1  christos  inffast.h
     62      1.1  christos 
     63      1.1  christos inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
     64      1.1  christos  inffast.h inffixed.h
     65      1.1  christos 
     66      1.1  christos inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
     67      1.1  christos 
     68      1.1  christos trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h
     69      1.1  christos 
     70      1.1  christos uncompr.obj: uncompr.c zlib.h zconf.h
     71      1.1  christos 
     72      1.1  christos zutil.obj: zutil.c zutil.h zlib.h zconf.h
     73      1.1  christos 
     74  1.1.1.2  christos example.obj: test/example.c zlib.h zconf.h
     75      1.1  christos 
     76  1.1.1.2  christos minigzip.obj: test/minigzip.c zlib.h zconf.h
     77      1.1  christos 
     78      1.1  christos 
     79      1.1  christos # the command line is cut to fit in the MS-DOS 128 byte limit:
     80      1.1  christos $(ZLIB_LIB): $(OBJ1) $(OBJ2)
     81      1.1  christos 	-del $(ZLIB_LIB)
     82      1.1  christos 	$(AR) $(ZLIB_LIB) $(OBJP1)
     83      1.1  christos 	$(AR) $(ZLIB_LIB) $(OBJP2)
     84      1.1  christos 
     85      1.1  christos example.exe: example.obj $(ZLIB_LIB)
     86      1.1  christos 	$(LD) $(LDFLAGS) example.obj $(ZLIB_LIB)
     87      1.1  christos 
     88      1.1  christos minigzip.exe: minigzip.obj $(ZLIB_LIB)
     89      1.1  christos 	$(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB)
     90      1.1  christos 
     91      1.1  christos test: example.exe minigzip.exe
     92      1.1  christos 	example
     93      1.1  christos 	echo hello world | minigzip | minigzip -d
     94      1.1  christos 
     95      1.1  christos clean:
     96      1.1  christos 	-del *.obj
     97      1.1  christos 	-del *.lib
     98      1.1  christos 	-del *.exe
     99      1.1  christos 	-del zlib_*.bak
    100      1.1  christos 	-del foo.gz
    101