| 1 |
# Makefile for Zip, ZipCloak, ZipNote and ZipSplit for |
| 2 |
# 32-bit Microsoft Visual C++ |
| 3 |
|
| 4 |
# To use, do "nmake -f makefile.w32" |
| 5 |
|
| 6 |
# Add -DNO_ASM to CFLAGS and comment out the ASMOBJS definition if |
| 7 |
# you do not have masm 6.1X. |
| 8 |
|
| 9 |
# Optional nonstandard preprocessor flags (as -DMEDIUM_MEM or -DNO_ASM) |
| 10 |
# should be added to the environment via "set LOCAL_ZIP=-DFOO" or added |
| 11 |
# to the declaration of LOC here: |
| 12 |
LOC = $(LOCAL_ZIP) |
| 13 |
|
| 14 |
# Uncomment the following macro to use the optimized assembler |
| 15 |
# routines in Zip: |
| 16 |
ASMOBJS = gvmat64.obj |
| 17 |
|
| 18 |
# ------------- 32-bit Microsoft Visual C++ ------------- |
| 19 |
CC=cl -nologo |
| 20 |
CFLAGS=-W3 -O2 -DNO_ASM_CRC -DASMV -DWIN32 $(LOC) |
| 21 |
UTILFLAGS=$(CFLAGS) -DUTIL -Fo$@ |
| 22 |
|
| 23 |
# Remove "-coff" from ASFLAGS if you do not have MASM 6.11. |
| 24 |
|
| 25 |
AS=ml64 -nologo |
| 26 |
ASFLAGS= /c /Zi /DINFOZIP |
| 27 |
|
| 28 |
# If you build 16-bit executables with MS Visual C++ v1.0/1.5 and link them |
| 29 |
# with the /KNOWEAS switch, you can build dual-mode MS-DOS/Win32 executables |
| 30 |
# by passing the -stub switch to the 32-bit linker to specify the 16-bit part. |
| 31 |
|
| 32 |
LD=link -nologo |
| 33 |
LDFLAGS=advapi32.lib |
| 34 |
|
| 35 |
# variables |
| 36 |
OBJZ = zip.obj crypt.obj ttyio.obj zipfile.obj zipup.obj fileio.obj util.obj \ |
| 37 |
crc32.obj globals.obj |
| 38 |
|
| 39 |
OBJI = deflate.obj trees.obj $(ASMOBJS) win32.obj win32zip.obj nt.obj |
| 40 |
|
| 41 |
OBJU = zipfile_.obj fileio_.obj util_.obj globals.obj win32_.obj |
| 42 |
OBJN = zipnote.obj $(OBJU) |
| 43 |
OBJC = zipcloak.obj crc32_.obj crypt_.obj ttyio.obj $(OBJU) |
| 44 |
OBJS = zipsplit.obj $(OBJU) |
| 45 |
|
| 46 |
ZIP_H = zip.h ziperr.h tailor.h win32/osdep.h |
| 47 |
|
| 48 |
ZIPS = zip.exe zipnote.exe zipsplit.exe zipcloak.exe |
| 49 |
|
| 50 |
zips: $(ZIPS) |
| 51 |
|
| 52 |
zip.obj: zip.c $(ZIP_H) revision.h crc32.h crypt.h ttyio.h |
| 53 |
$(CC) -c $(CFLAGS) $*.c |
| 54 |
|
| 55 |
zipfile.obj: zipfile.c $(ZIP_H) crc32.h |
| 56 |
$(CC) -c $(CFLAGS) $*.c |
| 57 |
|
| 58 |
zipup.obj: zipup.c $(ZIP_H) revision.h crc32.h crypt.h win32/zipup.h |
| 59 |
$(CC) -c $(CFLAGS) $*.c |
| 60 |
|
| 61 |
fileio.obj: fileio.c $(ZIP_H) crc32.h |
| 62 |
$(CC) -c $(CFLAGS) $*.c |
| 63 |
|
| 64 |
util.obj: util.c $(ZIP_H) |
| 65 |
$(CC) -c $(CFLAGS) $*.c |
| 66 |
|
| 67 |
globals.obj: globals.c $(ZIP_H) |
| 68 |
$(CC) -c $(CFLAGS) $*.c |
| 69 |
|
| 70 |
deflate.obj: deflate.c $(ZIP_H) |
| 71 |
$(CC) -c $(CFLAGS) $*.c |
| 72 |
|
| 73 |
trees.obj: trees.c $(ZIP_H) |
| 74 |
$(CC) -c $(CFLAGS) $*.c |
| 75 |
|
| 76 |
crc32.obj: crc32.c $(ZIP_H) crc32.h |
| 77 |
$(CC) -c $(CFLAGS) $*.c |
| 78 |
|
| 79 |
crypt.obj: crypt.c $(ZIP_H) crypt.h crc32.h ttyio.h |
| 80 |
$(CC) -c $(CFLAGS) $*.c |
| 81 |
|
| 82 |
ttyio.obj: ttyio.c $(ZIP_H) crypt.h ttyio.h |
| 83 |
$(CC) -c $(CFLAGS) $*.c |
| 84 |
|
| 85 |
win32zip.obj: win32/win32zip.c $(ZIP_H) win32/win32zip.h win32/nt.h |
| 86 |
$(CC) -c $(CFLAGS) -I. win32/win32zip.c |
| 87 |
|
| 88 |
win32.obj: win32/win32.c $(ZIP_H) win32/win32zip.h |
| 89 |
$(CC) -c $(CFLAGS) -I. win32/win32.c |
| 90 |
|
| 91 |
nt.obj: win32/nt.c $(ZIP_H) win32/nt.h |
| 92 |
$(CC) -c $(CFLAGS) -I. win32/nt.c |
| 93 |
|
| 94 |
zipcloak.obj: zipcloak.c $(ZIP_H) revision.h crypt.h ttyio.h |
| 95 |
$(CC) -c $(CFLAGS) $*.c |
| 96 |
|
| 97 |
zipnote.obj: zipnote.c $(ZIP_H) revision.h |
| 98 |
$(CC) -c $(CFLAGS) $*.c |
| 99 |
|
| 100 |
zipsplit.obj: zipsplit.c $(ZIP_H) revision.h |
| 101 |
$(CC) -c $(CFLAGS) $*.c |
| 102 |
|
| 103 |
zipfile_.obj: zipfile.c $(ZIP_H) crc32.h |
| 104 |
$(CC) -c $(UTILFLAGS) zipfile.c |
| 105 |
|
| 106 |
fileio_.obj: fileio.c $(ZIP_H) crc32.h |
| 107 |
$(CC) -c $(UTILFLAGS) fileio.c |
| 108 |
|
| 109 |
util_.obj: util.c $(ZIP_H) |
| 110 |
$(CC) -c $(UTILFLAGS) util.c |
| 111 |
|
| 112 |
crc32_.obj: crc32.c $(ZIP_H) crc32.h |
| 113 |
$(CC) -c $(UTILFLAGS) crc32.c |
| 114 |
|
| 115 |
crypt_.obj: crypt.c $(ZIP_H) crypt.h crc32.h ttyio.h |
| 116 |
$(CC) -c $(UTILFLAGS) crypt.c |
| 117 |
|
| 118 |
win32_.obj: win32/win32.c $(ZIP_H) win32/win32zip.h |
| 119 |
$(CC) -c $(UTILFLAGS) -I. win32/win32.c |
| 120 |
|
| 121 |
gvmat64.obj: win32/gvmat64.asm |
| 122 |
$(AS) $(ASFLAGS) win32\gvmat64.asm |
| 123 |
|
| 124 |
zip.exe: $(OBJZ) $(OBJI) |
| 125 |
$(LD) $(LDFLAGS) $(OBJZ) $(OBJI) |
| 126 |
|
| 127 |
zipcloak.exe: $(OBJC) |
| 128 |
$(LD) $(LDFLAGS) $(OBJC) |
| 129 |
|
| 130 |
zipnote.exe: $(OBJN) |
| 131 |
$(LD) $(LDFLAGS) $(OBJN) |
| 132 |
|
| 133 |
zipsplit.exe: $(OBJS) |
| 134 |
$(LD) $(LDFLAGS) $(OBJS) |