⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 makefile

📁 压缩算法的源代码
💻
📖 第 1 页 / 共 2 页
字号:
#==============================================================================# Makefile for UnZip, UnZipSFX and fUnZip:  Unix and MS-DOS ("real" makes only)# Version:  5.12                                                 25 August 1994#==============================================================================# INSTRUCTIONS (such as they are):## "make vax"	-- makes UnZip on a generic Unix VAX in the current directory# "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 which 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 file_io.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 (if you do,LD = $(CC)#	you MUST change LD, too--else "unresolved symbol:  ___main")LOC = $(LOCAL_UNZIP)CF = -O -I. $(LOC)LF = -o unzipLF2 = -s# UnZipSFX flagsSL = -o unzipsfxSL2 = $(LF2)# fUnZip flagsFL = -o funzipFL2 = $(LF2)# general-purpose stuffCP = cpLN = lnRM = rm -fCHMOD = chmodSTRIP = stripE =O = .oM = unixSHELL = /bin/sh# object filesOBJS1 = unzip$O crypt$O envargs$O explode$O extract$O file_io$OOBJS2 = inflate$O match$O unreduce$O unshrink$O zipinfo$OOBJS = $(OBJS1) $(OBJS2) $M$OLOBJS = $(OBJS)OBJX = unzipsfx$O crypt$O extract_$O file_io$O inflate$O match$O $M_$OLOBJX = $(OBJX)OBJF = funzip$O crypt_$O inflate_$O#OBJS_OS2 = $(OBJS1:.o=.obj) $(OBJS2:.o=.obj) os2.obj#OBJF_OS2 = $(OBJF:.o=.obj)# installationINSTALL = cp#	probably can change this to 'install' if you have it# 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)/zipinfo$E $(BINDIR)/unzipsfx$E \	$(BINDIR)/unzip$EINSTALLEDMAN = $(MANDIR)/unzip.$(manext) $(MANDIR)/funzip.$(manext) \	$(MANDIR)/unzipsfx.$(manext) $(MANDIR)/zipinfo.$(manext)#UNZIPS = unzip$E funzip$E unzipsfx$E# this is a little ugly...well, no, it's a lot ugly:MANS = unix/unzip.1 unix/unzipsfx.1 unix/zipinfo.1 unix/funzip.1DOCS = unzip.doc unzipsfx.doc zipinfo.doc funzip.doc# list of supported systems/targets in this versionSYSTEMS1 = 386i 3Bx 7300 7300_gcc aix aix_rt amdahl amdahl_eft apolloSYSTEMS2 = aviion bcc_dos bsd bsd386 bull coherent convex cray cray_sccSYSTEMS3 = cray_v3 cyber_sgi dec dnix encore eta gcc gcc_dos genericSYSTEMS4 = generic2 generic3 gould hk68 hp hpux linux minix mips msc_dosSYSTEMS5 = next next10 next2x next3x nextfat osf1 pixel ptx pyramidSYSTEMS6 = regulus rs6000 sco sco_dos sco_sl sco_x286 sequent sgi solarisSYSTEMS7 = stellar sun sysv sysv_gcc sysv6300 tahoe ultrix vax v7 wombatSYSTEMS8 = 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.  Note that to compile'	@echo\ '  the decryption version of UnZip, you must obtain the full versions of'	@echo\ '  crypt.c and crypt.h (see the "Where" file for ftp and mail-server sites).'	@echo\ '  Have a mostly pretty good day.'	@echo ""list:	@echo ""	@echo\ 'Type "make <system>", where <system> is one of the following:'	@echo ""	@echo  "	$(SYSTEMS1)"	@echo  "	$(SYSTEMS2)"	@echo  "	$(SYSTEMS3)"	@echo  "	$(SYSTEMS4)"	@echo  "	$(SYSTEMS5)"	@echo  "	$(SYSTEMS6)"	@echo  "	$(SYSTEMS7)"	@echo  "	$(SYSTEMS8)"#	@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.c$O:	$(CC) -c $(CF) $*.c# this doesn't work...directories are always a pain with implicit rules#.1.doc:		unix/$<#	nroff -Tman -man $< | col -b | uniq | \#	 sed 's/Sun Release ..../Info-ZIP        /' > $@# these rules are specific to Suns and are really intended only for the# authors' use in creating non-Unix documentation files (which are pro-# vided with both source and binary distributions).  We should probably# add a ".1.man" rule for more generic systems...unzip.doc:	unix/unzip.1	nroff -Tman -man unix/unzip.1 | col -b | uniq | \	 sed 's/Sun Release ..../Info-ZIP        /' > $@unzipsfx.doc:	unix/unzipsfx.1	nroff -Tman -man unix/unzipsfx.1 | col -b | uniq | \	 sed 's/Sun Release ..../Info-ZIP        /' > $@zipinfo.doc:	unix/zipinfo.1	nroff -Tman -man unix/zipinfo.1 | col -b | uniq | \	 sed 's/Sun Release ..../Info-ZIP        /' > $@funzip.doc:	unix/funzip.1	nroff -Tman -man unix/funzip.1 | col -b | uniq | \	 sed 's/Sun Release ..../Info-ZIP        /' > $@all:		generic_msg genericunzips:		$(UNZIPS)docs:		$(DOCS)unzipsman:	unzips docsunzipsdocs:	unzips docs# this really only works for Unix targets, unless specify E and O on cmd lineclean:	rm -f $(OBJS) $(OBJF) $(OBJX) $(UNZIPS)install:	$(UNZIPS) $(MANS)	$(INSTALL) $(UNZIPS) $(BINDIR)	$(RM) $(BINDIR)/zipinfo$E	$(LN) $(BINDIR)/unzip$E $(BINDIR)/zipinfo$E	$(INSTALL) unix/unzip.1 $(MANDIR)/unzip.$(manext)	$(INSTALL) unix/unzipsfx.1 $(MANDIR)/unzipsfx.$(manext)	$(INSTALL) unix/zipinfo.1 $(MANDIR)/zipinfo.$(manext)	$(INSTALL) unix/funzip.1 $(MANDIR)/funzip.$(manext)	$(CHMOD) 755  $(INSTALLEDBIN)	$(CHMOD) 644  $(INSTALLEDMAN)# alternatively, could use zip method:  -cd $(BINDIR); rm -f $(UNZIPS)  [etc.]uninstall:	rm -f $(INSTALLEDBIN) $(INSTALLEDMAN)# 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	@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$Ecrypt$O:	crypt.c unzip.h zip.h crypt.henvargs$O:	envargs.c unzip.hexplode$O:	explode.c unzip.hextract$O:	extract.c unzip.h crypt.hfile_io$O:	file_io.c unzip.h crypt.h tables.hfunzip$O:	funzip.c unzip.h crypt.h tables.hinflate$O:	inflate.c inflate.h unzip.hmatch$O:	match.c unzip.hunreduce$O:	unreduce.c unzip.hunshrink$O:	unshrink.c unzip.hunzip$O:	unzip.c unzip.h crypt.h version.hzipinfo$O:	zipinfo.c unzip.hcrypt_$O:	crypt.c unzip.h zip.h crypt.h		# funzip only	$(CP) crypt.c crypt_.c	$(CC) -c $(CF) -DFUNZIP 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_.cinflate_$O:	inflate.c inflate.h unzip.h crypt.h	# funzip only	$(CP) inflate.c inflate_.c	$(CC) -c $(CF) -DFUNZIP inflate_.c	$(RM) inflate_.cmsdos$O:	msdos/msdos.c unzip.h			# MS-DOS only	$(CC) -c $(CF) msdos/msdos.cmsdos_$O:	msdos/msdos.c unzip.h			# MS-DOS unzipsfx only	$(CP) msdos\msdos.c msdos_.c > nul	$(CC) -c $(CF) -DSFX msdos_.c	$(RM) msdos_.c#os2$O:		os2/os2.c unzip.h			# OS/2 only#	$(CC) -c $(CF) os2/os2.cunix$O:		unix/unix.c unzip.h			# Unix only	$(CC) -c $(CF) unix/unix.cunix_$O:	unix/unix.c unzip.h			# Unix unzipsfx only	$(CP) unix/unix.c unix_.c	$(CC) -c $(CF) -DSFX unix_.c	$(RM) unix_.cunzipsfx$O:	unzip.c unzip.h crypt.h version.h	# unzipsfx only	$(CP) unzip.c unzipsfx.c	$(CC) -c $(CF) -DSFX unzipsfx.c	$(RM) unzipsfx.cunix_make:#	@echo\# '(Ignore any errors from `make'"' due to the following command; it's harmless.)"	-@2>&1 $(LN) unix/Makefile . > /dev/null || echo > /dev/null################################# INDIVIDUAL MACHINE MAKERULES ######################################   TABS ARE REQUIRED FOR MANY VERSIONS OF "MAKE"!   ######----------------------------------------------------------------------------#  Generic targets (can't assume make utility groks "$(MAKE)")#----------------------------------------------------------------------------generic:	unzips	   # first try if unknowngeneric2:	unix_make  # second try if unknown:  hope make is called "make"	make unzips CF="$(CF) -DBSD"generic3:	unix_make  # third try if unknown:  hope make is called "make"	make unzips CF="$(CF) -DSYSV"#----------------------------------------------------------------------------#  "Normal" group (both big- and little-endian, structure-padding or not):#----------------------------------------------------------------------------386i:		unzips	# sun386i, SunOS 4.0.23Bx:		unzips	# AT&T 3B2/1000-80; should work on any WE32XXX machine#aix_rt:		unzips	# IBM RT 6150 under AIX 2.2.1apollo:		unzips	# Apollo Domain/OS machinesbull:		unzips	# Bull DPX/2, BOS 2.00.45 (doesn't require -Xk switch)convex:		unzips	# Convex C-120 and C-210 (-O is enough; -ext is default)cray:		unzips	# Cray-2 and Y-MP, using default (possibly old) compilerdec:		unzips	# DEC 5820 (MIPS RISC), test version of Ultrix v4.0encore:		unzips	# Multimaxeta:		unzips	# ETA-10P*, hybrid SysV with BSD 4.3 enhancementsgould:		unzips	# Gould PN9000 running UTX/32 2.1Bu01hp:		unzips	# HP 9000 series (68020), 4.3BSD or HP-UX A.B3.10 Ver Dhpux:		unzips	# (to match zip's makefile entry)mips:		unzips	# MIPS M120-5(?), SysV.3 [error in sys/param.h file?]next10:		unzips	# NeXT (generic; use next2x or next3x for better opt.)osf1:		unzips	# DECstation, including Alpha-based; DEC OSF/1 v1.xpyr_:		unzips	# [failsafe target for pyramid target below]pyr_ucb:	unzips	# Pyramids running BSD universe by default (see below)sco:		unzips	# Xenix/386 (tested on 2.3.1); SCO Unix 3.2.0.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -