zlib/win32/Makefile.msc

93 lines
2.2 KiB
Makefile
Raw Normal View History

2011-09-10 02:22:10 -04:00
# Makefile for Win32 zlib.dll and the static library zlibstat.lib
# -- Microsoft (Visual) C.
# Author: Cosmin Truta, 11-Mar-2003
# Christian Spieler, 19-Mar-2003
2011-09-10 02:21:57 -04:00
#
# Usage: nmake -f win32/Makefile.msc
CC = cl
LD = cl
2011-09-10 02:22:10 -04:00
RC = rc
2011-09-10 02:21:57 -04:00
CFLAGS = -nologo -MD -O2
LDFLAGS = -nologo
OBJS = adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infback.obj \
inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
# targets
2011-09-10 02:22:10 -04:00
all: zlib.dll zlibstat.lib example.exe minigzip.exe exampl_s.exe minigz_s.exe
2011-09-10 02:21:57 -04:00
2011-09-10 02:22:10 -04:00
zlibstat.lib: $(OBJS)
2011-09-10 02:21:57 -04:00
lib -out:$@ $(OBJS)
2011-09-10 02:22:10 -04:00
zlib.dll: $(OBJS) zlib.res win32/zlib.def
link -release -def:win32/zlib.def -dll -out:$@ $(OBJS) zlib.res
zlib.lib: zlib.dll
2011-09-10 02:21:57 -04:00
example.exe: example.obj zlib.lib
$(LD) $(LDFLAGS) example.obj zlib.lib
minigzip.exe: minigzip.obj zlib.lib
$(LD) $(LDFLAGS) minigzip.obj zlib.lib
2011-09-10 02:22:10 -04:00
exampl_s.exe: example.obj zlibstat.lib
$(LD) $(LDFLAGS) -o $@ example.obj zlibstat.lib
minigz_s.exe: minigzip.obj zlibstat.lib
$(LD) $(LDFLAGS) -o $@ minigzip.obj zlibstat.lib
2011-09-10 02:21:57 -04:00
.c.obj:
2011-09-10 02:22:10 -04:00
$(CC) -c $(CFLAGS) $<
zlib.res: win32/zlib.rc
$(RC) /l 0x409 /fo$@ /d WIN32 win32/zlib.rc
2011-09-10 02:21:57 -04:00
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
gzio.obj: gzio.c zutil.h zlib.h zconf.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
# testing
test: example.exe minigzip.exe
example
echo hello world | minigzip | minigzip -d
2011-09-10 02:22:10 -04:00
teststat: exampl_s.exe minigz_s.exe
exampl_s
echo hello world | minigz_s | minigz_s -d
2011-09-10 02:21:57 -04:00
# cleanup
clean:
del *.obj
2011-09-10 02:22:10 -04:00
del *.dll
2011-09-10 02:21:57 -04:00
del *.lib
2011-09-10 02:22:10 -04:00
del *.exp
2011-09-10 02:21:57 -04:00
del *.exe