?? makefile
字號:
#==============================================================================# Makefile for UnZip, UnZipSFX and fUnZip: Unix and MS-DOS ("real" makes only)# Version: 5.5 16 February 2002#==============================================================================# INSTRUCTIONS (such as they are):## "make sunos" -- makes UnZip in current directory on a generic SunOS 4.x Sun# "make list" -- lists all supported systems (targets)# "make help" -- provides pointers on what targets to try if problems occur# "make wombat" -- chokes and dies if you haven't added the specifics for your# Wombat 68000 (or whatever) to the systems list## CF are flags for the C compiler. LF are flags for the loader. LF2 are more# flags for the loader, if they need to be at the end of the line instead of at# the beginning (for example, some libraries). FL and FL2 are the corre-# sponding flags for fUnZip. LOCAL_UNZIP is an environment variable that can# be used to add default C flags to your compile without editing the Makefile# (e.g., -DDEBUG_STRUC, or -FPi87 on PCs using Microsoft C).## Some versions of make do not define the macro "$(MAKE)"; this is rare, but# if things don't work, try using "make" instead of "$(MAKE)" in your system's# makerule. Or try adding the following line to your .login file:# setenv MAKE "make"# (That never works--makes that are too stupid to define MAKE are also too# stupid to look in the environment--but try it anyway for kicks. :-) )## Memcpy and memset are provided for those systems that don't have them; they# are in fileio.c and will be used if -DZMEM is included in CF. These days# almost all systems have them.## Be sure to test your new UnZip (and UnZipSFX and fUnZip); successful compila-# tion does not always imply a working program.###################### MACRO DEFINITIONS ####################### Defaults most systems use (use LOCAL_UNZIP in environment to add flags,# such as -DDOSWILD).# UnZip flagsCC = cc# try using "gcc" target rather than changing this (CC and LDLD = $(CC)# must match, else "unresolved symbol: ___main" is possible)AS = asLOC = $(LOCAL_UNZIP)AF = $(LOC)CF = -O -I. $(LOC)LF = -o unzipLF2 = -s# UnZipSFX flagsSL = -o unzipsfxSL2 = $(LF2)# fUnZip flagsFL = -o funzipFL2 = $(LF2)# general-purpose stuff#CP = cpCP = lnLN = lnRM = rm -fCHMOD = chmodBINPERMS = 755MANPERMS = 644STRIP = stripE =O = .oM = unixSHELL = /bin/sh# Version info for unix/unix.cHOST_VERSINFO=-DIZ_CC_NAME='\"\$$(CC) \"' -DIZ_OS_NAME='\"`uname -a`\"'# defaults for crc32 stuff and system dependent headersCRC32 = crc32OSDEP_H =# object filesOBJS1 = unzip$O $(CRC32)$O crctab$O crypt$O envargs$O explode$OOBJS2 = extract$O fileio$O globals$O inflate$O list$O match$OOBJS3 = process$O ttyio$O unreduce$O unshrink$O zipinfo$OOBJS = $(OBJS1) $(OBJS2) $(OBJS3) $M$OLOBJS = $(OBJS)OBJSDLL = $(OBJS:.o=.pic.o) api.pic.oOBJX = unzipsfx$O $(CRC32)$O crctab_$O crypt_$O extract_$O fileio_$O \ globals_$O inflate_$O match_$O process_$O ttyio_$O $M_$OLOBJX = $(OBJX)OBJF = funzip$O $(CRC32)$O cryptf$O globalsf$O inflatef$O ttyiof$O#OBJS_OS2 = $(OBJS1:.o=.obj) $(OBJS2:.o=.obj) os2.obj#OBJF_OS2 = $(OBJF:.o=.obj)UNZIP_H = unzip.h unzpriv.h globals.h $(OSDEP_H)# installation# (probably can change next two to `install' and `install -d' if you have it)INSTALL = cpINSTALL_PROGRAM = $(INSTALL)INSTALL_D = mkdir -p# on some systems, manext=l and MANDIR=/usr/man/man$(manext) may be appropriatemanext = 1prefix = /usr/localBINDIR = $(prefix)/bin# where to install executablesMANDIR = $(prefix)/man/man$(manext)# where to install man pagesINSTALLEDBIN = $(BINDIR)/funzip$E $(BINDIR)/unzip$E $(BINDIR)/unzipsfx$E \ $(BINDIR)/zipgrep$E $(BINDIR)/zipinfo$EINSTALLEDMAN = $(MANDIR)/funzip.$(manext) $(MANDIR)/unzip.$(manext) \ $(MANDIR)/unzipsfx.$(manext) $(MANDIR)/zipgrep.$(manext) \ $(MANDIR)/zipinfo.$(manext)# Solaris 2.x stuff:PKGDIR = IZunzipVERSION = Version 5.5UNZIPS = unzip$E funzip$E unzipsfx$E# this is a little ugly...well, OK, it's a lot ugly:MANS = man/funzip.1 man/unzip.1 man/unzipsfx.1 man/zipgrep.1 man/zipinfo.1DOCS = funzip.txt unzip.txt unzipsfx.txt zipgrep.txt zipinfo.txt# list of supported systems/targets in this versionSYSTEMSG = generic generic2 generic3 generic_zlib generic_shlibSYSTEMS1 = 386i 3Bx 7300 7300_gcc aix aix_rt amdahl amdahl_eft apollo aviionSYSTEMS2 = bsd bsdi bsdi_noasm bull coherent convex cray cray_opt cyber_sgiSYSTEMS3 = dec dnix encore eta freebsd gcc gould hk68 hp hpux isc isc_gccSYSTEMS4 = isi linux linux_dos linux_noasm linux_shlib linux_shlibz lynxSYSTEMS5 = maxosx macosx_gcc minix mips mpeix next next10 next2x next3xSYSTEMS6 = nextfat osf1 pixel ptx pyramid qnxnto realix regulus rs6000 scoSYSTEMS7 = sco_dos sco_sl sco_x286 sequent sgi solaris solaris_pkg stardentSYSTEMS8 = stellar sunos3 sunos4 sysv sysv_gcc sysv6300 tahoe ti_sysv ultrixSYSTEMS9 = vax v7 wombat xenix xos##################### DEFAULT HANDLING ###################### By default, print help on which makefile targets to try. (The SYSTEM# variable is no longer supported; use "make <target>" instead.)help: @echo "" @echo\ " If you're not sure about the characteristics of your system, try typing" @echo\ ' "make generic". If the compiler barfs and says something unpleasant about' @echo\ ' "timezone redefined," try typing "make clean" followed by "make generic2".' @echo\ ' If, on the other hand, it complains about an undefined symbol _ftime, try' @echo\ ' typing "make clean" followed by "make generic3". One of these actions' @echo\ ' should produce a working copy of unzip on most Unix systems. If you know' @echo\ ' a bit more about the machine on which you work, you might try "make list"' @echo\ ' for a list of the specific systems supported herein. (Many of them do' @echo\ " exactly the same thing, so don't agonize too much over which to pick if" @echo\ ' two or more sound equally likely.) Also check out the INSTALL file for' @echo\ ' notes on compiling various targets. As a last resort, feel free to read' @echo\ ' the numerous comments within the Makefile itself.' @echo\ ' Have a mostly pretty good day.' @echo ""list: @echo "" @echo\ 'Type "make <system>", where <system> is one of the following:' @echo "" @echo " $(SYSTEMSG)" @echo "" @echo " $(SYSTEMS1)" @echo " $(SYSTEMS2)" @echo " $(SYSTEMS3)" @echo " $(SYSTEMS4)" @echo " $(SYSTEMS5)" @echo " $(SYSTEMS6)" @echo " $(SYSTEMS7)" @echo " $(SYSTEMS8)" @echo " $(SYSTEMS9)"# @echo ""# @echo\# 'Targets for related utilities (ZipInfo and fUnZip) include:'# @echo ""# @echo " $(SYS_UTIL1)"# @echo " $(SYS_UTIL2)" @echo "" @echo\ 'For further (very useful) information, please read the comments in Makefile.' @echo ""generic_msg: @echo "" @echo\ ' Attempting "make generic" now. If this fails for some reason, type' @echo\ ' "make help" and/or "make list" for suggestions.' @echo ""################################################ BASIC COMPILE INSTRUCTIONS AND DEPENDENCIES ################################################# this is for GNU make; comment out and notify zip-bugs if it causes errors.SUFFIXES: .c .o .obj .pic.o# yes, we should be able to use the $O macro to combine these two, but it# fails on some brain-damaged makes (e.g., AIX's)...no big deal.c.o: $(CC) -c $(CF) $*.c.c.obj: $(CC) -c $(CF) $*.c.c.pic.o: $(CC) -c $(CF) -o $@ $*.c# this doesn't work...directories are always a pain with implicit rules#.1.txt: man/$<# nroff -Tman -man $< | col -b | uniq | \# sed 's/Sun Release ..../Info-ZIP /' > $@# these rules may be specific to Linux (or at least the GNU groff package)# and are really intended only for the authors' use in creating non-Unix# documentation files (which are provided with both source and binary# distributions). We should probably add a ".1.txt" rule for more generic# systems...funzip.txt: man/funzip.1 nroff -Tascii -man man/funzip.1 | col -b | uniq | expand > $@unzip.txt: man/unzip.1 nroff -Tascii -man man/unzip.1 | col -b | uniq | expand > $@unzipsfx.txt: man/unzipsfx.1 nroff -Tascii -man man/unzipsfx.1 | col -b | uniq | expand > $@zipgrep.txt: man/zipgrep.1 nroff -Tascii -man man/zipgrep.1 | col -b | uniq | expand > $@zipinfo.txt: man/zipinfo.1 nroff -Tascii -man man/zipinfo.1 | col -b | uniq | expand > $@all: generic_msg genericunzips: $(UNZIPS)objs: $(OBJS)objsdll: $(OBJSDLL)docs: $(DOCS)unzipsman: unzips docsunzipsdocs: unzips docs# EDIT HERE FOR PARALLEL MAKES on Sequent (and others?)--screws up MS-DOS# make utilities if default: change "unzip$E:" to "unzip$E:&"unzip$E: $(OBJS) # add `&' for parallel makes $(LD) $(LF) $(LOBJS) $(LF2)unzipsfx$E: $(OBJX) # add `&' for parallel makes $(LD) $(SL) $(LOBJX) $(SL2)funzip$E: $(OBJF) # add `&' for parallel makes $(LD) $(FL) $(OBJF) $(FL2)zipinfo$E: unzip$E # `&' is pointless here... @echo\ ' This is a Unix-specific target. ZipInfo is not enabled in some MS-DOS' @echo\ ' versions of UnZip; if it is in yours, copy unzip.exe to zipinfo.exe' @echo\ ' or else invoke as "unzip -Z" (in a batch file, for example).' $(LN) unzip$E zipinfo$Ecrc32$O: crc32.c $(UNZIP_H) zip.hcrctab$O: crctab.c $(UNZIP_H) zip.hcrypt$O: crypt.c $(UNZIP_H) zip.h crypt.h ttyio.henvargs$O: envargs.c $(UNZIP_H)explode$O: explode.c $(UNZIP_H)extract$O: extract.c $(UNZIP_H) crypt.hfileio$O: fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.hfunzip$O: funzip.c $(UNZIP_H) crypt.h ttyio.h tables.hglobals$O: globals.c $(UNZIP_H)inflate$O: inflate.c inflate.h $(UNZIP_H)list$O: list.c $(UNZIP_H)match$O: match.c $(UNZIP_H)process$O: process.c $(UNZIP_H)ttyio$O: ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.hunreduce$O: unreduce.c $(UNZIP_H)unshrink$O: unshrink.c $(UNZIP_H)unzip$O: unzip.c $(UNZIP_H) crypt.h unzvers.h consts.hzipinfo$O: zipinfo.c $(UNZIP_H)unzipsfx$O: unzip.c $(UNZIP_H) crypt.h unzvers.h consts.h # unzipsfx only -$(CP) unzip.c unzipsfx.c $(CC) -c $(CF) -DSFX unzipsfx.c $(RM) unzipsfx.ccrctab_$O: crctab.c $(UNZIP_H) zip.h -$(CP) crctab.c crctab_.c $(CC) -c $(CF) -DSFX crctab_.c $(RM) crctab_.ccrypt_$O: crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h # unzipsfx only -$(CP) crypt.c crypt_.c $(CC) -c $(CF) -DSFX crypt_.c $(RM) crypt_.cextract_$O: extract.c $(UNZIP_H) crypt.h # unzipsfx only -$(CP) extract.c extract_.c $(CC) -c $(CF) -DSFX extract_.c $(RM) extract_.cfileio_$O: fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h -$(CP) fileio.c fileio_.c $(CC) -c $(CF) -DSFX fileio_.c
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -