Makefile
资源名称:unzip540.zip [点击查看]
上传用户:andy_li
上传日期:2007-01-06
资源大小:1019k
文件大小:5k
源码类别:
压缩解压
开发平台:
MultiPlatform
- # NMAKE Makefile for Windows NT/Windows 95
- # D. Feinleib 7/92 <t-davefe@microsoft.com>
- # H. Gessau 9/93 <henryg@kullmar.kullmar.se>
- # J. Lee 8/95 (johnnyl@microsoft.com)
- #
- # Last revised: 24 Nov 98
- #
- # Tested with VC++ 2.0 for NT for MIPS and Alpha, Visual C++ 2.2 for Intel CPUs
- #
- # Nmake macros for building Windows NT applications
- # To build with debug info use 'nmake debug=1'
- !IFNDEF debug
- NODEBUG=1
- !ENDIF
- !IF "$(CPU)" == "" && "$(PROCESSOR_ARCHITECTURE)" == "x86"
- CPU = i386
- !ENDIF
- !IF "$(CPU)" == "" && "$(PROCESSOR_ARCHITECTURE)" == "MIPS"
- CPU = $(PROCESSOR_ARCHITECTURE)
- !ENDIF
- !IF "$(CPU)" == "" && "$(PROCESSOR_ARCHITECTURE)" == "ALPHA"
- CPU = $(PROCESSOR_ARCHITECTURE)
- !ENDIF
- !IF "$(CPU)" == "" && "$(PROCESSOR_ARCHITECTURE)" == "PPC"
- CPU = $(PROCESSOR_ARCHITECTURE)
- !ENDIF
- !IF "$(CPU)" == ""
- CPU = i386
- !ENDIF
- !include <ntwin32.mak>
- # object files
- OBJS1 = unzip.obj $(CRC32).obj crctab.obj crypt.obj envargs.obj explode.obj
- OBJS2 = extract.obj fileio.obj globals.obj inflate.obj list.obj match.obj
- OBJS3 = process.obj ttyio.obj unreduce.obj unshrink.obj zipinfo.obj
- OBJS4 = win32.obj nt.obj
- OBJS = $(OBJS1) $(OBJS2) $(OBJS3) $(OBJS4)
- OBJX1 = unzipsfx.obj $(CRC32X).obj crctab.obj crypt.obj extract_.obj fileio.obj
- OBJX2 = globalsx.obj inflate.obj match.obj process_.obj ttyio.obj
- OBJX3 = win32_.obj nt.obj
- OBJX = $(OBJX1) $(OBJX2) $(OBJX3)
- OBJF1 = funzip.obj $(CRC32F).obj cryptf.obj globalsf.obj inflatef.obj ttyiof.obj
- OBJF2 = win32f.obj
- OBJF = $(OBJF1) $(OBJF2)
- UNZIP_H = unzip.h unzpriv.h globals.h win32/w32cfg.h
- #CF_LOC = -DMSDOS -DNO_ASM -J
- #CF_LOC = -nologo -DNO_ASM -J -DREENTRANT
- CF_LOC = -nologo -DNO_ASM -J
- #CF_LOC = -nologo -DASM_CRC -J
- cvars = $(cvars) $(CF_LOC)
- CRC32 = crc32
- #CRC32 = crc_i386
- CRC32X = $(CRC32)
- CRC32F = $(CRC32)
- # USER32.LIB is needed for OemToChar and related routines
- conlibs=$(conlibs) user32.lib
- # Some optimization (if not debugging)
- # [GRR 950816: Steve suggests changing optimization flags to -O2, except for
- # UnZipSFX (-01)]
- !IFDEF NODEBUG
- !IF "$(CPU)" == "i386"
- cdebug = -Ogityb2
- !ELSE
- cdebug = -Ogitb2
- !ENDIF
- !ENDIF
- # How to compile sources
- .c.obj:
- $(cc) $(cdebug) $(cflags) $(cvars) -o $@ $<
- # How to link
- .obj.exe:
- $(link) $(ldebug) $(conflags) $(conlibs) $** -out:$@
- # Default target is all the executables
- unzips : unzip.exe funzip.exe unzipsfx.exe
- unzip.exe: $(OBJS)
- unzipsfx.exe: $(OBJX)
- funzip.exe: $(OBJF)
- crc32.obj: crc32.c $(UNZIP_H) zip.h
- crctab.obj: crctab.c $(UNZIP_H) zip.h
- crypt.obj: crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h
- envargs.obj: envargs.c $(UNZIP_H)
- explode.obj: explode.c $(UNZIP_H)
- extract.obj: extract.c $(UNZIP_H) crypt.h
- fileio.obj: fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h
- funzip.obj: funzip.c $(UNZIP_H) crypt.h ttyio.h tables.h
- globals.obj: globals.c $(UNZIP_H)
- inflate.obj: inflate.c inflate.h $(UNZIP_H)
- match.obj: match.c $(UNZIP_H)
- process.obj: process.c $(UNZIP_H)
- ttyio.obj: ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h
- unreduce.obj: unreduce.c $(UNZIP_H)
- unshrink.obj: unshrink.c $(UNZIP_H)
- unzip.obj: unzip.c $(UNZIP_H) crypt.h version.h consts.h
- zipinfo.obj: zipinfo.c $(UNZIP_H)
- win32.obj: win32win32.c $(UNZIP_H) win32nt.h
- $(cc) $(cdebug) $(cflags) $(cvars) -I. win32win32.c
- nt.obj: win32nt.c win32nt.h
- $(cc) $(cdebug) $(cflags) $(cvars) -I. win32nt.c
- crc_i386.obj: win32/crc_i386.asm
- masm -ml win32/crc_i386.asm,$@;
- win32_.obj: win32win32.c $(UNZIP_H) win32nt.h # unzipsfx only
- $(cc) $(cdebug) $(cflags) $(cvars) -I. -DSFX win32win32.c -Fo$@
- win32f.obj: win32win32.c $(UNZIP_H) win32nt.h # funzip only
- $(cc) $(cdebug) $(cflags) $(cvars) -I. -DFUNZIP win32win32.c -Fo$@
- cryptf.obj: crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h # funzip only
- $(cc) $(cdebug) $(cflags) $(cvars) -DFUNZIP crypt.c -Fo$@
- extract_.obj: extract.c $(UNZIP_H) crypt.h # unzipsfx only
- $(cc) $(cdebug) $(cflags) $(cvars) -DSFX extract.c -Fo$@
- globalsx.obj: globals.c $(UNZIP_H) # unzipsfx only
- $(cc) $(cdebug) $(cflags) $(cvars) -DSFX globals.c -Fo$@
- globalsf.obj: globals.c $(UNZIP_H) # funzip only
- $(cc) $(cdebug) $(cflags) $(cvars) -DFUNZIP globals.c -Fo$@
- inflatef.obj: inflate.c inflate.h $(UNZIP_H) crypt.h # funzip only
- $(cc) $(cdebug) $(cflags) $(cvars) -DFUNZIP inflate.c -Fo$@
- process_.obj: process.c $(UNZIP_H) # unzipsfx only
- $(cc) $(cdebug) $(cflags) $(cvars) -DSFX process.c -Fo$@
- ttyiof.obj: ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h # funzip only
- $(cc) $(cdebug) $(cflags) $(cvars) -DFUNZIP ttyio.c -Fo$@
- unzipsfx.obj: unzip.c $(UNZIP_H) crypt.h version.h consts.h # unzipsfx only
- $(cc) $(cdebug) $(cflags) $(cvars) -DSFX unzip.c -Fo$@
- clean:
- del /q $(OBJS) unzip.exe $(OBJF) funzip.exe $(OBJX) unzipsfx.exe