📄 makefile.w32
字号:
# Makefile for zlib
# Open Watcom C/C++ 1.3 or later. Earlier versions may also work.
# Last updated: 12-Jun-2005
# To use, do "wmake -f makefile.w32"
# If you wish to reduce the memory requirements (default 256K for big
# objects plus a few K), you can add to the LOC macro below:
# -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14
# See zconf.h for details about the memory requirements.
# Optional nonstandard preprocessor flags (e.g. -DMAX_MEM_LEVEL=7)
# should be added to the environment via "set LOCAL_ZLIB=-DFOO" or added
# to the declaration of LOC here:
LOC = $(LOCAL_ZLIB)
# Target OS: one of DOS, Windows, OS/2. Defaults to host OS. Uncomment
# appropriate pair of options to override.
#
# Extended DOS
#CC_TARGET=-bt=dos
#LD_TARGET=sys dos4g
#
# Win32
#CC_TARGET=-bt=nt
#LD_TARGET=sys nt
#
# OS/2
#CC_TARGET=-bt=os2
#LD_TARGET=sys os2v2
CC=wcc386
CFLAGS=-zq -wx -oaxt $(LOC) $(CC_TARGET)
LIB_CFLAGS=-zl $(CFLAGS)
LD=wlink
LDFLAGS=$(LD_TARGET) option quiet, map
# variables
ZLIB_LIB = zlib.lib
OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infback.obj
OBJ2 = inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
# targets
all: $(ZLIB_LIB) example.exe minigzip.exe
.c.obj:
$(CC) $(LIB_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
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
$(CC) $(CFLAGS) $*.c
minigzip.obj: minigzip.c zlib.h zconf.h
$(CC) $(CFLAGS) $*.c
# the command line is cut to fit in the MS-DOS 128 byte limit:
$(ZLIB_LIB): $(OBJ1) $(OBJ2)
if exist $(ZLIB_LIB) del $(ZLIB_LIB)
wlib -q $(ZLIB_LIB) $(OBJ1)
wlib -q $(ZLIB_LIB) $(OBJ2)
example.exe: example.obj $(ZLIB_LIB)
$(LD) $(LDFLAGS) file example.obj lib $(ZLIB_LIB)
minigzip.exe: minigzip.obj $(ZLIB_LIB)
$(LD) $(LDFLAGS) file minigzip.obj lib $(ZLIB_LIB)
test: example.exe minigzip.exe .symbolic
example
echo hello world | minigzip | minigzip -d
clean: .symbolic
-del *.obj
-del *.lib
-del *.exe
-del *.map
-del *.bak
-del foo.gz
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -