Makefile.gcc
资源名称:unzip540.zip [点击查看]
上传用户:andy_li
上传日期:2007-01-06
资源大小:1019k
文件大小:6k
源码类别:
压缩解压
开发平台:
MultiPlatform
- # Makefile for UnZip, fUnZip and UnZipSFX for native Win32-Intel ports of gcc.
- # Currently supported implementations: Cygnus/Win32 and MinGW32.
- #
- # First version: Cosmin Truta <cosmint@cs.ubbcluj.ro>, Dec 1997.
- # Last revision: Christian Spieler, 29-Apr-1998
- #
- # To use, do "make -f win32/makefile.gcc".
- ### Optional section
- # Optional nonstandard preprocessor flags (as -DUSE_ZLIB or -DUSE_SMITH_CODE)
- # should be added to the environment via "set LOCAL_UNZIP=-DFOO" or added
- # to the declaration of LOCFLAGS here:
- LOCFLAGS = $(LOCAL_UNZIP)
- ### Compiler-specific section
- # ------------ GNU C ------------
- CC = gcc
- #AS = as
- AS = $(CC)
- #LD = ld
- LD = $(CC)
- # Quiet
- CC_QUIET_OPT =
- AS_QUIET_OPT = $(CC_QUIET_OPT)
- LD_QUIET_OPT = $(CC_QUIET_OPT)
- # Warnings
- CC_WARN_OPT = -Wall
- AS_WARN_OPT = $(CC_WARN_OPT)
- LD_WARN_OPT =
- # Debug version
- CC_DEBUG_OPT = -g
- AS_DEBUG_OPT = $(CC_DEBUG_OPT)
- LD_DEBUG_OPT = $(CC_DEBUG_OPT)
- # Release version
- CC_RELEASE_OPT =
- AS_RELEASE_OPT =
- LD_RELEASE_OPT = -s
- # Smallest code
- CC_SIZE_OPT = -O1
- # Fastest code
- CC_SPEED_OPT = -O2
- # Output object file name
- CC_OUT_OPT = -o
- # Other specific options
- CC_SPECIFIC_OPT = -c -DASM_CRC -DWIN32
- AS_SPECIFIC_OPT = -c
- LD_SPECIFIC_OPT = -o $@
- # Libraries for the debug & release version
- LD_RELEASE_LIBS = -luser32 -ladvapi32
- LD_DEBUG_LIBS = $(LD_RELEASE_LIBS)
- ### System-specific section
- # Suffixes
- OBJ = .o
- EXE = .exe
- .SUFFIXES: .c .S $(OBJ) $(EXE)
- # Commands
- RM = rm -f
- ### General section
- CFLAGS = $(CC_SPECIFIC_OPT) $(CC_QUIET_OPT) $(CC_WARN_OPT) $(LOCFLAGS)
- $(CC_OUT_OPT) $@
- ASFLAGS = $(AS_SPECIFIC_OPT) $(AS_QUIET_OPT) $(AS_WARN_OPT) $(LOCFLAGS)
- LDFLAGS = $(LD_SPECIFIC_OPT) $(LD_QUIET_OPT) $(LD_WARN_OPT)
- # To build with debug info, use 'make DEBUG=1'.
- ifdef DEBUG
- CVER = $(CC_DEBUG_OPT)
- ASVER = $(AS_DEBUG_OPT)
- LDVER = $(LD_DEBUG_OPT)
- GENFLAGS =
- FFLAGS = -DFUNZIP
- SFXFLAGS = -DSFX
- LDLIBS = $(LD_DEBUG_LIBS)
- else
- CVER = $(CC_RELEASE_OPT)
- ASVER = $(AS_RELEASE_OPT)
- LDVER = $(LD_RELEASE_OPT)
- GENFLAGS = $(CC_SPEED_OPT)
- FFLAGS = $(CC_SPEED_OPT) -DFUNZIP
- SFXFLAGS = $(CC_SIZE_OPT) -DSFX
- LDLIBS = $(LD_RELEASE_LIBS)
- endif
- # Object files
- OBJA = crc_i386$(OBJ)
- OBJS1 = unzip$(OBJ) crc32$(OBJ) crctab$(OBJ) crypt$(OBJ) envargs$(OBJ)
- OBJS2 = explode$(OBJ) extract$(OBJ) fileio$(OBJ) globals$(OBJ) inflate$(OBJ)
- OBJS3 = list$(OBJ) match$(OBJ) process$(OBJ) ttyio$(OBJ) unreduce$(OBJ)
- OBJS4 = unshrink$(OBJ) zipinfo$(OBJ) win32$(OBJ) nt$(OBJ)
- OBJS = $(OBJS1) $(OBJS2) $(OBJS3) $(OBJS4) $(OBJA)
- OBJX1 = unzipsfx$(OBJ) crc32$(OBJ) crctab$(OBJ) crypt$(OBJ) extractx$(OBJ)
- OBJX2 = fileiox$(OBJ) globalsx$(OBJ) inflatex$(OBJ) matchx$(OBJ) processx$(OBJ)
- OBJX3 = ttyiox$(OBJ) win32x$(OBJ) nt$(OBJ)
- OBJX = $(OBJX1) $(OBJX2) $(OBJX3) $(OBJA)
- OBJF1 = funzip$(OBJ) crc32$(OBJ) cryptf$(OBJ) globalsf$(OBJ) inflatef$(OBJ)
- OBJF2 = ttyiof$(OBJ) win32f$(OBJ)
- OBJF = $(OBJF1) $(OBJF2) $(OBJA)
- UNZIP_H = unzip.h unzpriv.h globals.h win32/w32cfg.h
- # Default target is all the executables
- unzips: unzip$(EXE) funzip$(EXE) unzipsfx$(EXE)
- unzip$(EXE): $(OBJS)
- $(LD) $(LDFLAGS) $(LDVER) $(OBJS) $(LDLIBS)
- unzipsfx$(EXE): $(OBJX)
- $(LD) $(LDFLAGS) $(LDVER) $(OBJX) $(LDLIBS)
- funzip$(EXE): $(OBJF)
- $(LD) $(LDFLAGS) $(LDVER) $(OBJF) $(LDLIBS)
- # How to compile sources
- .c$(OBJ):
- $(CC) $(CFLAGS) $(CVER) $(GENFLAGS) $<
- .S$(OBJ):
- $(AS) $(ASFLAGS) $(ASVER) $(GENFLAGS) $<
- # Dependencies
- 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)
- list$(OBJ): list.c $(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)
- crc_i386$(OBJ): crc_i386.S
- win32$(OBJ): win32/win32.c $(UNZIP_H) win32/nt.h
- $(CC) $(CFLAGS) $(CVER) $(GENFLAGS) -I. win32/win32.c
- nt$(OBJ): win32/nt.c win32/nt.h
- $(CC) $(CFLAGS) $(CVER) $(GENFLAGS) -I. win32/nt.c
- win32x$(OBJ): win32/win32.c $(UNZIP_H) win32/nt.h # unzipsfx only
- $(CC) $(CFLAGS) $(CVER) $(SFXFLAGS) -I. win32/win32.c
- ntx$(OBJ): win32/nt.c win32/nt.h # unzipsfx only
- $(CC) $(CFLAGS) $(CVER) $(SFXFLAGS) -I. win32/nt.c
- win32f$(OBJ): win32/win32.c $(UNZIP_H) win32/nt.h # funzip only
- $(CC) $(CFLAGS) $(CVER) $(FFLAGS) -I. win32/win32.c
- cryptf$(OBJ): crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h # funzip only
- $(CC) $(CFLAGS) $(CVER) $(FFLAGS) crypt.c
- extractx$(OBJ): extract.c $(UNZIP_H) crypt.h # unzipsfx only
- $(CC) $(CFLAGS) $(CVER) $(SFXFLAGS) extract.c
- fileiox$(OBJ): fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h # unzipsfx only
- $(CC) $(CFLAGS) $(CVER) $(SFXFLAGS) fileio.c
- globalsx$(OBJ): globals.c $(UNZIP_H) # unzipsfx only
- $(CC) $(CFLAGS) $(CVER) $(SFXFLAGS) globals.c
- globalsf$(OBJ): globals.c $(UNZIP_H) # funzip only
- $(CC) $(CFLAGS) $(CVER) $(FFLAGS) globals.c
- inflatex$(OBJ): inflate.c inflate.h $(UNZIP_H) crypt.h # unzipsfx only
- $(CC) $(CFLAGS) $(CVER) $(SFXFLAGS) inflate.c
- inflatef$(OBJ): inflate.c inflate.h $(UNZIP_H) crypt.h # funzip only
- $(CC) $(CFLAGS) $(CVER) $(FFLAGS) inflate.c
- matchx$(OBJ): match.c $(UNZIP_H) # unzipsfx only
- $(CC) $(CFLAGS) $(CVER) $(SFXFLAGS) match.c
- processx$(OBJ): process.c $(UNZIP_H) # unzipsfx only
- $(CC) $(CFLAGS) $(CVER) $(SFXFLAGS) process.c
- ttyiox$(OBJ): ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h # unzipsfx only
- $(CC) $(CFLAGS) $(CVER) $(SFXFLAGS) ttyio.c
- ttyiof$(OBJ): ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h # funzip only
- $(CC) $(CFLAGS) $(CVER) $(FFLAGS) ttyio.c
- unzipsfx$(OBJ): unzip.c $(UNZIP_H) crypt.h version.h consts.h # unzipsfx only
- $(CC) $(CFLAGS) $(CVER) $(SFXFLAGS) unzip.c
- clean:
- $(RM) *$(OBJ)
- $(RM) *$(EXE)