📄 makefile
字号:
# Cray-2 and Y-MP, running Unicos 5.1 or 6.0 (SysV + BSD enhancements)# and Standard (ANSI) C compiler 1.5, 2.0 or 3.0.cray: $(MAKE) unzip CC="scc" LD="scc"# The unzip41 build on a Cyber 910/SGI running Irix v3.3.3 was successful# with the following change to Makefile:cyber_sgi: $(MAKE) unzip CFLAGS="$(CFLAGS) -I/usr/include/bsd"\ LDFLAGS="-lbsd $(LDFLAGS)"# OS/2 2.0 (32-bit) with GNU C compiler (emx)gcc_os2: $(MAKE) unzip.exe CC=gcc LD=gcc EXE=.exe\ OBJS="$(OBJS) dosname.o"\ CFLAGS="-O -DOS2 -DEMX32 $(CR) $(LOCAL_UNZIP)"\ LDFLAGS="-s" LDFLAGS2="-los2 -o unzip.exe"# Heurikon HK68 (68010), UniPlus+ System V 5.0, Green Hills C-68000hk68: $(MAKE) unzip CC="gcc" LD="gcc" LDFLAGS="-n $(LDFLAGS)" \ CFLAGS="-ga -X138 -DUNIX $(CR) $(LOCAL_UNZIP) -Dlocaltime=localti -Dtimezone=timezon"# OS/2 2.0 (32-bit) with IBM C Set/2 compiler#file_io2.obj: # compile this one module without optimization $(CC) -c $(CFLAGS) -O- -Fofile_io2.obj file_io.cicc_os2: $(MAKE) -nologo unzip.exe CC=icc LD=icc EXE=.exe O=.obj\ OBJS="$(OS2_OBJS:file_io.obj=file_io2.obj)"\ CFLAGS="-Q -Sm -O -Gs -DOS2 $(CR) $(LOCAL_UNZIP)"\ LDFLAGS="-Q" LDFLAGS2="unzip.def -Fe unzip.exe"# Minix 1.5 PC for the 386 with gcc or bccminix: $(MAKE) unzip CC=gcc CFLAGS="$(CFLAGS) -DMINIX"# PCs (IBM-type), running MS-DOS, Microsoft C 6.00 and NMAKE. Can't use the# SYSTEM environment variable; that requires processing the "default:" target,# which expands to some 200+ characters--well over DOS's 128-character limit.# "nmake msc_dos" works fine, aside from an annoying message, "temporary file# e:\ln023193 has been created." I have no idea how to suppress this, but it# appears to be benign (comes from the link phase; the file is always deleted).# The environment variable LOCAL_UNZIP should be set to something appropriate# if your library uses other than the default floating-point routines; for # example, SET LOCAL_UNZIP=-FPi87. This target assumes the small-model library# and an 80286 or better. At present, everything should still fit within the# 128-character command-line limit (barely); if not, remove the -nologo. [GRR]#msc_dos: $(MAKE) unzip.exe\ CFLAGS="-Ox $(CR) $(LOCAL_UNZIP) -nologo -G2" CC=cl\ LD=link EXE=.exe O=.obj LDFLAGS="/noi /nol" LDFLAGS2=",unzip;"# The stack size for OS/2 must be increased to 0x1000, i.e. # "-F 1000" has to be added to LDFLAGS for msc_os2. Otherwise# stack overflow occurs, which are only detected if compiled# with debugging option, i.e. not with -Gs!! Otherwise something# minor important seems to be overwritten :-) [K. U. Rommel]## Extra stack causes errors in GRR version ("/st:0x1000"); no problems# encountered so far without. EXEHDR /VERBOSE reports 0a00 bytes of# extra stack already, so maybe the two versions are different... [GRR]## $(LOCAL_UNZIP): math libraries and/or any other personal or debugging# definitions: e.g., SET LOCAL_UNZIP=-FPi87 -DDEBUG_STRUC# $(NOD): intended to be used as SET NOD=-link /nod:slibcep to allow the# use of default library names (slibce.lib) instead of protected-mode# names (slibcep.lib), but it fails: MSC adds its own /nod qualifier,# and there seems to be no way to override this. Typical...##msc_os2: # old Newtware version (may not work)# $(MAKE) -nologo unzip.exe CC=cl LD=link EXE=.exe O=.obj\# OBJS="$(OBJS) dosname.obj"\# CFLAGS="-nologo -Ox -G2s -DOS2 $(CR) $(LOCAL_UNZIP) -Lp"\# LDFLAGS="/noi /nol" LDFLAGS2=",unzip,,,unzip.def"# bind -nologo unzip.exe -n DOSSETPATHINFOmsc_os2: # Kai Uwe Rommel version $(MAKE) -nologo unzip.exe CC=cl LD=cl EXE=.exe O=.obj\ OBJS="$(OS2_OBJS)"\ CFLAGS="-nologo -Ox -G2s -DOS2 $(CR) $(LOCAL_UNZIP)"\ LDFLAGS="-nologo $(LOCAL_UNZIP) -Lp -F 1000"\ LDFLAGS2="unzip.def -o unzip.exe $(NOD)" bind -nologo unzip.exe -n DOSSETPATHINFO# NeXT 2.x: make the executable smaller.next: # 68030 BSD 4.3+Mach $(MAKE) unzip LDFLAGS2="-object -s"# I successfully compiled and tested the unzip program (v30) for the# Silicon Graphics environment (Personal Iris 4D20/G with IRIX v3.2.2)p_iris: # Silicon Graphics Personal Iris 4D20 $(MAKE) unzip CFLAGS="$(CFLAGS) -I/usr/include/bsd -DBSD"\ LDFLAGS="-lbsd $(LDFLAGS)"# I have finished porting unzip 3.0 to the Pyramid 90X under OSX4.1.# The biggest problem was the default structure alignment yielding two# extra bytes. The compiler has the -q option to pack structures, and# this was all that was needed. To avoid needing ZMEMS we could compile in# the att universe, but it runs slower!#pyramid: # Pyramid 90X, probably all, under >= OSx4.1, BSD universe make unzip CFLAGS="$(CFLAGS) -q -DBSD -DZMEM"# SCO cross compile from unix to DOS. Tested with Xenix/386 and# OpenDeskTop. Should work with xenix/286 as well. (davidsen)# Note that you *must* remove the unix objects and executable# before doing this!#sco_dos: $(MAKE) unzip CFLAGS="-O $(CR) $(LOCAL_UNZIP) -dos -M0" LDFLAGS="-dos"\ LDFLAGS2="-o unzip.exe"# SCO Xenix/286 2.2.1sco_x286: $(MAKE) unzip CFLAGS="$(CFLAGS) -Ml2" LDFLAGS="$(LDFLAGS) -Ml2"# Sequent Symmetry is a 386 but needs -DZMEM# This should also work on Balance but I can't test it just yet.sequent: # Sequent w/Dynix $(MAKE) unzip CFLAGS="$(CFLAGS) -DBSD -DZMEM"# I didn't do this. I swear. No, really.wombat: # Wombat 68000 (or whatever) @echo @echo ' Ha ha! Just kidding.' @echo################### SHIP MAKERULES #################### Ship section: ship comes with the Zip distribution and is more properly# supported there. But the following targets should at least get you started# if for some reason you're only interested in UnZip. The comments near the# top of ship.c explain how to use it, and a little further poking around# should clear up any problems related to things which should be defined but# aren't, or which shouldn't be defined but are. As with ZipInfo below, we# assume *some* competence..._ship: ship.c $(DEF) $(CC) $(CFLAGS) ship.c $(DEF) $(LDFLAGS2)ship: # most BSD-type systems, by default $(MAKE) _ship LDFLAGS2="-s -o ship"ship_sysv: # not tested; DIRENT used only to determine mailer $(MAKE) _ship CFLAGS="$(CFLAGS) -DDIRENT" LDFLAGS2="-s -o ship"ship_dos: # not tested $(MAKE) -nologo _ship CC=cl EXE=.exe\ CFLAGS="-nologo -Ox $(LOCAL_UNZIP) -G2s -F 2000"\ LDFLAGS2="-o ship.exe"ship_os2: # MSC 6.0, 16-bit OS/2 $(MAKE) -nologo _ship CC=cl EXE=.exe DEF=ship.def\ CFLAGS="-nologo -Ox $(LOCAL_UNZIP) -G2s -DOS2 -Lp -F 2000"\ LDFLAGS2="-o ship.exe" bind -nologo ship.exeship_icc: # IBM C Set/2, 32-bit OS/2 $(MAKE) -nologo _ship CC=icc EXE=.exe DEF=ship.def\ CFLAGS="-Q -Sm -O $(LOCAL_UNZIP) -Gs -DOS2"\ LDFLAGS2="-Fe ship.exe"ship_gcc: # GNU gcc / emx, 32-bit OS/2 $(MAKE) _ship CC=gcc LD=gcc EXE=.exe\ CFLAGS="-O -DOS2" LDFLAGS2="-s -o ship.exe"###################### ZIPINFO MAKERULES ####################### Zipinfo section: it is assumed here that anyone competent enough to# wonder about the internal guts of a zipfile is probably also competent# enough to compile the program without a lot of hand-holding. If not...# oh well. :-)zipinfo$O: zipinfo.c unzip.h $(CC) -c $(CFLAGS) $(ZC) zipinfo.cmisc_$O: misc.c unzip.h $(MV) misc.c misc_.c $(CC) -c $(CFLAGS) $(ZC) -DZIPINFO misc_.c $(MV) misc_.c misc.czipinfo$(EXE): $(ZI_OBJS) $(LD) $(ZL) $(ZI_OBJS) $(ZL2)zi_dos: $(MAKE) zipinfo.exe CFLAGS="-Ox -nologo $(LOCAL_UNZIP) -G2" CC=cl\ LD=link EXE=.exe O=.obj ZL="/noi /nol" ZL2=",zipinfo;" ZC="" MV="ren"#zi_os2: # GRR (Newtware) version (do not delete!)# $(MAKE) -nologo zipinfo.exe CC=cl LD=link EXE=.exe O=.obj\# CFLAGS="-nologo -Ox $(LOCAL_UNZIP) -G2s -DOS2 -Lp" ZC="" MV="ren"\# ZL="/nol /noi" ZL2=",zipinfo,,,zipinfo.def"# bind -nologo zipinfo.exezi_os2: # Kai Uwe Rommel version (do not delete!) $(MAKE) -nologo zipinfo.exe CC=cl LD=cl EXE=.exe O=.obj\ CFLAGS="-nologo -Ox $(LOCAL_UNZIP) -G2s -DOS2" ZC="" MV="ren"\ ZL="-nologo $(LOCAL_UNZIP) -Lp -Fb" ZL2="zipinfo.def -o zipinfo.exe"zi_icc: # IBM C Set/2, 32-bit OS/2 $(MAKE) -nologo zipinfo.exe CC=icc LD=icc EXE=.exe O=.obj\ CFLAGS="-Q -Sm -O -Gs -DOS2" ZC="" MV="ren"\ ZL="-Q" ZL2="zipinfo.def -Fe zipinfo.exe"zi_gcc: # GNU gcc / emx, 32-bit OS/2 $(MAKE) zipinfo.exe CC=gcc LD=gcc EXE=.exe\ CFLAGS="-O -DOS2 -DEMX32" ZC="" MV="ren"\ ZL="-s" ZL2="-o zipinfo.exe"################# ATTRIBUTIONS ################## Thanks to the following people for their help in testing and/or porting# to various machines (and thanks to the many others who aren't listed# here but should be):## (original Unix port: Carl Mascott <cmascott@world.std.com>)# 386i: Richard Stephen <stephen@corp.telecom.co.nz># 3Bx: Bob Kemp <hrrca!bobc@cbnewse.att.com># 7300: Richard H. Gumpertz <rhg@cpsolv.CPS.COM># Greg Roelofs <roelofs@amelia.nas.nasa.gov># amdahl: Kim DeVaughn <ked01@juts.ccc.amdahl.com>, Greg Roelofs# apollo: Tim Geibelhaus# aviion: Bruce Kahn <bkahn@archive.webo.dg.com># bull: Matt D'Errico <doc@magna.com># coherent: David Fenyes <dfenyes@thesis1.med.uth.tmc.edu># convex: Randy Wright <rwright@convex.com># cray: Greg Roelofs, Paul Borman <prb@cray.com># cyber_sgi: Clint Pulley <u001@cs910.cciw.ca># dec: "Moby" Dick O'Connor <djo7613@u.washington.edu># dnix: Bo Kullmar <bk@kullmar.se># eta: Greg Flint <afc@klaatu.cc.purdue.edu># gould: Onno van der Linden <linden@fwi.uva.nl># hk68: John Limpert <gronk!johnl@uunet.UU.NET># hp: Randy McCaskile <rmccask@seas.gwu.edu> (HP-UX)# Gershon Elber <gershon@cs.utah.edu> (HP BSD 4.3)# icc_os2: Kai Uwe Rommel <rommel@informatik.tu-muenchen.de># minix: Kai Uwe Rommel (Minix 1.5)# mips: Peter Jones <jones@mips1.uqam.ca># msc_dos: Greg Roelofs# msc_os2: Wim Bonner <wbonner@yoda.eecs.wsu.edu># Kai Uwe Rommel, Greg Roelofs# next: Mark Adler <madler@piglet.caltech.edu># p_iris: Valter V. Cavecchia <root@itnsg1.cineca.it># pyramid: James Dugal <jpd@usl.edu># rs6000: Filip Gieszczykiewicz <fmg@smi.med.pitt.edu># rtaix: Erik-Jan Vens# sco: Onno van der Linden (SCO Unix 3.2.0)# Bill Davidsen <davidsen@crdos1.crd.ge.com> (Xenix/386)# sco_dos: Bill Davidsen# sco_x286: Ricky Mobley <ddi1!lrark!rick@uunet.UU.NET># sequent: Phil Howard <phil@ux1.cso.uiuc.edu># sgi: Greg Roelofs (Iris 4D/380?)# sun: Onno van der Linden (Sun 4), Greg Roelofs (Sun 3, 4)# tahoe: Mark Edwards <mce%sdcc10@ucsd.edu># ultrix: Greg Flint (VAX)# Michael Graff <explorer@iastate.edu> (DECstation 2100?)# Greg Roelofs (DEC 5810)# Alex A Sergejew <aas@brain.wph.uq.oz.au># vax: Forrest Gehrke <feg@dodger.att.com> (SysV)# David Kirschbaum <kirsch@usasoc.soc.mil> (BSD 4.3)# Jim Steiner <steiner@pica.army.mil> (8600+Ultrix)# wombat: Joe Isuzu <joe@trustme.isuzu.com># zi_dos: Greg Roelofs# zi_icc: Kai Uwe Rommel# zi_os2: Greg Roelofs, Kai Uwe Rommel# zipinfo: Greg Roelofs
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -