123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- MODEL=l
- CC=tcc
- LD=tcc
- AR=tlib
- CFLAGS=-O2 -G -Z -m$(MODEL)
- LDFLAGS=-m$(MODEL) -f-
- ZLIB_LIB = zlib_$(MODEL).lib
- OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzlib.obj gzread.obj
- OBJ2 = gzwrite.obj infback.obj inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
- OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzclose.obj+gzlib.obj+gzread.obj
- OBJP2 = +gzwrite.obj+infback.obj+inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj
- all: $(ZLIB_LIB) example.exe minigzip.exe
- .c.obj:
- $(CC) -c $(CFLAGS) $*.c
- adler32.obj: adler32.c zlib.h zconf.h
- compress.obj: compress.c zlib.h zconf.h
- crc32.obj: crc32.c zlib.h zconf.h crc32.h
- deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
- gzclose.obj: gzclose.c zlib.h zconf.h gzguts.h
- gzlib.obj: gzlib.c zlib.h zconf.h gzguts.h
- gzread.obj: gzread.c zlib.h zconf.h gzguts.h
- gzwrite.obj: gzwrite.c zlib.h zconf.h gzguts.h
- infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h inffixed.h
- inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h
- inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h inffixed.h
- inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
- trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h
- uncompr.obj: uncompr.c zlib.h zconf.h
- zutil.obj: zutil.c zutil.h zlib.h zconf.h
- example.obj: example.c zlib.h zconf.h
- minigzip.obj: minigzip.c zlib.h zconf.h
- $(ZLIB_LIB): $(OBJ1) $(OBJ2)
- -del $(ZLIB_LIB)
- $(AR) $(ZLIB_LIB) $(OBJP1)
- $(AR) $(ZLIB_LIB) $(OBJP2)
- example.exe: example.obj $(ZLIB_LIB)
- $(LD) $(LDFLAGS) example.obj $(ZLIB_LIB)
- minigzip.exe: minigzip.obj $(ZLIB_LIB)
- $(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB)
- test: example.exe minigzip.exe
- example
- echo hello world | minigzip | minigzip -d
- clean:
- -del *.obj
- -del *.lib
- -del *.exe
- -del zlib_*.bak
- -del foo.gz
|