home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / unzip52.zip / unix / Makefile < prev    next >
Makefile  |  1996-04-27  |  35KB  |  943 lines

  1. #==============================================================================
  2. # Makefile for UnZip, UnZipSFX and fUnZip:  Unix and MS-DOS ("real" makes only)
  3. # Version:  5.20                                                  27 April 1996
  4. #==============================================================================
  5.  
  6.  
  7. # INSTRUCTIONS (such as they are):
  8. #
  9. # "make sunos"    -- makes UnZip in current directory on a generic SunOS 4.x Sun
  10. # "make list"    -- lists all supported systems (targets)
  11. # "make help"    -- provides pointers on what targets to try if problems occur
  12. # "make wombat" -- chokes and dies if you haven't added the specifics for your
  13. #            Wombat 68000 (or whatever) to the systems list
  14. #
  15. # CF are flags for the C compiler.  LF are flags for the loader.  LF2 are more
  16. # flags for the loader, if they need to be at the end of the line instead of at
  17. # the beginning (for example, some libraries).  FL and FL2 are the corre-
  18. # sponding flags for fUnZip.  LOCAL_UNZIP is an environment variable that can
  19. # be used to add default C flags to your compile without editing the Makefile
  20. # (e.g., -DDEBUG_STRUC, or -FPi87 on PCs using Microsoft C).
  21. #
  22. # Some versions of make do not define the macro "$(MAKE)"; this is rare, but
  23. # if things don't work, try using "make" instead of "$(MAKE)" in your system's
  24. # makerule.  Or try adding the following line to your .login file:
  25. #    setenv MAKE "make"
  26. # (That never works--makes which are too stupid to define MAKE are also too
  27. # stupid to look in the environment--but try it anyway for kicks. :-) )
  28. #
  29. # Memcpy and memset are provided for those systems that don't have them; they
  30. # are in fileio.c and will be used if -DZMEM is included in CF.  These days
  31. # almost all systems have them.
  32. #
  33. # Be sure to test your new UnZip (and UnZipSFX and fUnZip); successful compila-
  34. # tion does not always imply a working program.
  35.  
  36.  
  37. #####################
  38. # MACRO DEFINITIONS #
  39. #####################
  40.  
  41. # Defaults most systems use (use LOCAL_UNZIP in environment to add flags,
  42. # such as -DDOSWILD).
  43.  
  44. # UnZip flags
  45. CC = cc#    try using "gcc" target rather than changing this (if you do,
  46. LD = $(CC)#    LD MUST change, also--else "unresolved symbol:  ___main")
  47. AS = as
  48. LOC = $(LOCAL_UNZIP)
  49. AF = $(LOC)
  50. CF = -O -I. $(LOC)
  51. LF = -o unzip
  52. LF2 = -s
  53.  
  54. # UnZipSFX flags
  55. SL = -o unzipsfx
  56. SL2 = $(LF2)
  57.  
  58. # fUnZip flags
  59. FL = -o funzip
  60. FL2 = $(LF2)
  61.  
  62. # general-purpose stuff
  63. CP = cp
  64. LN = ln
  65. RM = rm -f
  66. CHMOD = chmod
  67. STRIP = strip
  68. E =
  69. O = .o
  70. M = unix
  71. SHELL = /bin/sh
  72.  
  73. # defaults for crc32 stuff and system dependent headers
  74. CRC32 = crc32
  75. OSDEP_H =
  76.  
  77. # object files
  78. OBJS1 = unzip$O $(CRC32)$O crctab$O crypt$O envargs$O explode$O
  79. OBJS2 = extract$O fileio$O globals$O inflate$O list$O match$O
  80. OBJS3 = process$O ttyio$O unreduce$O unshrink$O zipinfo$O
  81. OBJS = $(OBJS1) $(OBJS2) $(OBJS3) $M$O
  82. LOBJS = $(OBJS)
  83. OBJSDLL = $(OBJS) api$O
  84. OBJX = unzipsfx$O $(CRC32)$O crctab$O crypt$O extract_$O fileio$O globals$O \
  85.     inflate$O match$O process_$O ttyio$O $M_$O
  86. LOBJX = $(OBJX)
  87. OBJF = funzip$O $(CRC32)$O crypt_$O globals_$O inflate_$O ttyio_$O
  88. #OBJS_OS2 = $(OBJS1:.o=.obj) $(OBJS2:.o=.obj) os2.obj
  89. #OBJF_OS2 = $(OBJF:.o=.obj)
  90. UNZIP_H = unzip.h unzpriv.h globals.h $(OSDEP_H)
  91.  
  92. # installation
  93. INSTALL = cp#    probably can change this to 'install' if you have it
  94. # on some systems, manext=l and MANDIR=/usr/man/man$(manext) may be appropriate
  95. manext = 1
  96. prefix = /usr/local
  97. BINDIR = $(prefix)/bin#            where to install executables
  98. MANDIR = $(prefix)/man/man$(manext)#    where to install man pages
  99. INSTALLEDBIN = $(BINDIR)/funzip$E $(BINDIR)/zipinfo$E $(BINDIR)/unzipsfx$E \
  100.     $(BINDIR)/unzip$E
  101. INSTALLEDMAN = $(MANDIR)/unzip.$(manext) $(MANDIR)/funzip.$(manext) \
  102.     $(MANDIR)/unzipsfx.$(manext) $(MANDIR)/zipinfo.$(manext)
  103. #
  104. UNZIPS = unzip$E funzip$E unzipsfx$E
  105. # this is a little ugly...well, no, it's a lot ugly:
  106. MANS = unix/unzip.1 unix/unzipsfx.1 unix/zipinfo.1 unix/funzip.1
  107. DOCS = unzip.doc unzipsfx.doc zipinfo.doc funzip.doc
  108.  
  109. # list of supported systems/targets in this version
  110. SYSTEMS1 = generic generic2 generic3 generic_zlib
  111. SYSTEMS2 = 386i 3Bx 7300 7300_gcc aix aix_rt amdahl amdahl_eft apollo
  112. SYSTEMS3 = aviion bcc_dos bsd bsd386 bull coherent convex cray cray_opt
  113. SYSTEMS4 = cyber_sgi dec djgpp djgpp1 dnix encore eta gcc gcc_dos gould
  114. SYSTEMS5 = hk68 hp hpux isi linux linux_dos linux_shlib linux_shlibz minix
  115. SYSTEMS6 = mips msc_dos next next10 next2x next3x nextfat osf1 pixel ptx
  116. SYSTEMS7 = pyramid realix regulus rs6000 sco sco_dos sco_sl sco_x286 sequent
  117. SYSTEMS8 = sgi solaris stardent stellar sunos sysv sysv_gcc sysv6300 tahoe
  118. SYSTEMS9 = ti_sysv ultrix vax v7 wombat xenix xos
  119.  
  120.  
  121. ####################
  122. # DEFAULT HANDLING #
  123. ####################
  124.  
  125. # By default, print help on which makefile targets to try.  (The SYSTEM
  126. # variable is no longer supported; use "make <target>" instead.)
  127.  
  128. help:
  129.     @echo ""
  130.     @echo\
  131.  "  If you're not sure about the characteristics of your system, try typing"
  132.     @echo\
  133.  '  "make generic".  If the compiler barfs and says something unpleasant about'
  134.     @echo\
  135.  '  "timezone redefined," try typing "make clean" followed by "make generic2".'
  136.     @echo\
  137.  '  If, on the other hand, it complains about an undefined symbol _ftime, try'
  138.     @echo\
  139.  '  typing "make clean" followed by "make generic3".  One of these actions'
  140.     @echo\
  141.  '  should produce a working copy of unzip on most Unix systems.  If you know'
  142.     @echo\
  143.  '  a bit more about the machine on which you work, you might try "make list"'
  144.     @echo\
  145.  '  for a list of the specific systems supported herein.  (Many of them do'
  146.     @echo\
  147.  "  exactly the same thing, so don't agonize too much over which to pick if"
  148.     @echo\
  149.  '  two or more sound equally likely.)  Also check out the INSTALL file for'
  150.     @echo\
  151.  '  notes on compiling various targets.  As a last resort, feel free to read'
  152.     @echo\
  153.  '  the numerous comments within the Makefile itself.  Note that to compile'
  154.     @echo\
  155.  '  the decryption version of UnZip, you must obtain the full versions of'
  156.     @echo\
  157.  '  crypt.c and crypt.h (see the "Where" file for ftp and mail-server sites).'
  158.     @echo\
  159.  '  Have a mostly pretty good day.'
  160.     @echo ""
  161.  
  162. list:
  163.     @echo ""
  164.     @echo\
  165.  'Type "make <system>", where <system> is one of the following:'
  166.     @echo ""
  167.     @echo  "    $(SYSTEMS1)"
  168.     @echo ""
  169.     @echo  "    $(SYSTEMS2)"
  170.     @echo  "    $(SYSTEMS3)"
  171.     @echo  "    $(SYSTEMS4)"
  172.     @echo  "    $(SYSTEMS5)"
  173.     @echo  "    $(SYSTEMS6)"
  174.     @echo  "    $(SYSTEMS7)"
  175.     @echo  "    $(SYSTEMS8)"
  176. #    @echo ""
  177. #    @echo\
  178. # 'Targets for related utilities (ZipInfo and fUnZip) include:'
  179. #    @echo ""
  180. #    @echo  "    $(SYS_UTIL1)"
  181. #    @echo  "    $(SYS_UTIL2)"
  182.     @echo ""
  183.     @echo\
  184.  'For further (very useful) information, please read the comments in Makefile.'
  185.     @echo ""
  186.  
  187. generic_msg:
  188.     @echo ""
  189.     @echo\
  190.  '  Attempting "make generic" now.  If this fails for some reason, type'
  191.     @echo\
  192.  '  "make help" and/or "make list" for suggestions.'
  193.     @echo ""
  194.  
  195.  
  196. ###############################################
  197. # BASIC COMPILE INSTRUCTIONS AND DEPENDENCIES #
  198. ###############################################
  199.  
  200. # this is for GNU make; comment out and notify zip-bugs if it causes errors
  201. .SUFFIXES:    .c .o .obj
  202.  
  203. # yes, we should be able to use the $O macro to combine these two, but it
  204. # fails on some brain-damaged makes (e.g., AIX's)...no big deal
  205. .c.o:
  206.     $(CC) -c $(CF) $*.c
  207.  
  208. .c.obj:
  209.     $(CC) -c $(CF) $*.c
  210.  
  211. # this doesn't work...directories are always a pain with implicit rules
  212. #.1.doc:        unix/$<
  213. #    nroff -Tman -man $< | col -b | uniq | \
  214. #     sed 's/Sun Release ..../Info-ZIP        /' > $@
  215.  
  216.  
  217. # these rules are specific to Suns and are really intended only for the
  218. # authors' use in creating non-Unix documentation files (which are pro-
  219. # vided with both source and binary distributions).  We should probably
  220. # add a ".1.man" rule for more generic systems...
  221.  
  222. unzip.doc:    unix/unzip.1
  223.     nroff -Tman -man unix/unzip.1 | col -b | uniq | \
  224.      sed 's/Sun Release ..../Info-ZIP        /' > $@
  225.  
  226. unzipsfx.doc:    unix/unzipsfx.1
  227.     nroff -Tman -man unix/unzipsfx.1 | col -b | uniq | \
  228.      sed 's/Sun Release ..../Info-ZIP        /' > $@
  229.  
  230. zipinfo.doc:    unix/zipinfo.1
  231.     nroff -Tman -man unix/zipinfo.1 | col -b | uniq | \
  232.      sed 's/Sun Release ..../Info-ZIP        /' > $@
  233.  
  234. funzip.doc:    unix/funzip.1
  235.     nroff -Tman -man unix/funzip.1 | col -b | uniq | \
  236.      sed 's/Sun Release ..../Info-ZIP        /' > $@
  237.  
  238.  
  239. all:        generic_msg generic
  240. unzips:        $(UNZIPS)
  241. objs:        $(OBJS)
  242. objsdll:    $(OBJSDLL)
  243. docs:        $(DOCS)
  244. unzipsman:    unzips docs
  245. unzipsdocs:    unzips docs
  246.  
  247.  
  248. # EDIT HERE FOR PARALLEL MAKES on Sequent (and others?)--screws up MS-DOS
  249. # make utilities if default:  change "unzip$E:" to "unzip$E:&"
  250.  
  251. unzip$E:    $(OBJS)            # add `&' for parallel makes
  252.     $(LD) $(LF) $(LOBJS) $(LF2)
  253.  
  254. unzipsfx$E:    $(OBJX)            # add `&' for parallel makes
  255.     $(LD) $(SL) $(LOBJX) $(SL2)
  256.  
  257. funzip$E:    $(OBJF)            # add `&' for parallel makes
  258.     $(LD) $(FL) $(OBJF) $(FL2)
  259.  
  260. zipinfo$E:    unzip$E            # `&' is pointless here...
  261.     @echo\
  262.  '  This is a Unix-specific target.  ZipInfo is not enabled in some MS-DOS'
  263.     @echo\
  264.  '  versions of UnZip; if it is in yours, copy unzip.exe to zipinfo.exe'
  265.     @echo\
  266.  '  or else invoke as "unzip -Z" (in a batch file, for example).'
  267.     $(LN) unzip$E zipinfo$E
  268.  
  269.  
  270. crc32$O:    crc32.c $(UNZIP_H) zip.h
  271. crctab$O:    crctab.c $(UNZIP_H) zip.h
  272. crypt$O:    crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h
  273. envargs$O:    envargs.c $(UNZIP_H)
  274. explode$O:    explode.c $(UNZIP_H)
  275. extract$O:    extract.c $(UNZIP_H) crypt.h
  276. fileio$O:    fileio.c $(UNZIP_H) crypt.h ttyio.h ebcdic.h
  277. funzip$O:    funzip.c $(UNZIP_H) crypt.h ttyio.h tables.h
  278. globals$O:    globals.c $(UNZIP_H)
  279. inflate$O:    inflate.c inflate.h $(UNZIP_H)
  280. list$O:        list.c $(UNZIP_H)
  281. match$O:    match.c $(UNZIP_H)
  282. process$O:    process.c $(UNZIP_H)
  283. ttyio$O:    ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h
  284. unreduce$O:    unreduce.c $(UNZIP_H)
  285. unshrink$O:    unshrink.c $(UNZIP_H)
  286. unzip$O:    unzip.c $(UNZIP_H) crypt.h version.h consts.h
  287. zipinfo$O:    zipinfo.c $(UNZIP_H)
  288.  
  289. crypt_$O:    crypt.c $(UNZIP_H) zip.h crypt.h ttyio.h    # funzip only
  290.     $(CP) crypt.c crypt_.c
  291.     $(CC) -c $(CF) -DFUNZIP crypt_.c
  292.     $(RM) crypt_.c
  293.  
  294. extract_$O:    extract.c $(UNZIP_H) crypt.h            # unzipsfx only
  295.     $(CP) extract.c extract_.c
  296.     $(CC) -c $(CF) -DSFX extract_.c
  297.     $(RM) extract_.c
  298.  
  299. globals_$O:    globals.c $(UNZIP_H)                # funzip only
  300.     $(CP) globals.c globals_.c
  301.     $(CC) -c $(CF) -DFUNZIP globals_.c
  302.     $(RM) globals_.c
  303.  
  304. inflate_$O:    inflate.c inflate.h $(UNZIP_H) crypt.h        # funzip only
  305.     $(CP) inflate.c inflate_.c
  306.     $(CC) -c $(CF) -DFUNZIP inflate_.c
  307.     $(RM) inflate_.c
  308.  
  309. ttyio_$O:    ttyio.c $(UNZIP_H) zip.h crypt.h ttyio.h    # funzip only
  310.     $(CP) ttyio.c ttyio_.c
  311.     $(CC) -c $(CF) -DFUNZIP ttyio_.c
  312.     $(RM) ttyio_.c
  313.  
  314. # optional assembler replacements
  315. crc_i86$O:    msdos/crc_i86.asm                # 16bit only
  316.     $(AS) $(AF) msdos/crc_i86.asm $(ASEOL)
  317.  
  318. crc_gcc$O:    crc_i386.S                    # 32bit, GNU AS
  319.     $(AS) $(AF) -x assembler-with-cpp -c -o $@ crc_i386.S
  320.  
  321. msdos$O:    msdos/msdos.c $(UNZIP_H) version.h        # DOS only
  322.     $(CC) -c $(CF) msdos/msdos.c
  323.  
  324. # version() not used by unzipsfx, so no version.h dependency
  325. msdos_$O:    msdos/msdos.c $(UNZIP_H)            # DOS unzipsfx
  326.     $(CP) msdos\msdos.c msdos_.c > nul
  327.     $(CC) -c $(CF) -DSFX msdos_.c
  328.     $(RM) msdos_.c
  329.  
  330. #os2$O:        os2/os2.c $(UNZIP_H)                # OS/2 only
  331. #    $(CC) -c $(CF) os2/os2.c
  332.  
  333.  
  334. process_$O:    process.c $(UNZIP_H)                # unzipsfx only
  335.     $(CP) process.c process_.c
  336.     $(CC) -c $(CF) -DSFX process_.c
  337.     $(RM) process_.c
  338.  
  339. unix$O:        unix/unix.c $(UNZIP_H) version.h        # Unix only
  340.     $(CC) -c $(CF) unix/unix.c
  341.  
  342. # version() not used by unzipsfx, so no version.h dependency
  343. unix_$O:    unix/unix.c $(UNZIP_H)                # Unix unzipsfx
  344.     $(CP) unix/unix.c unix_.c
  345.     $(CC) -c $(CF) -DSFX unix_.c
  346.     $(RM) unix_.c
  347.  
  348. unzipsfx$O:    unzip.c $(UNZIP_H) crypt.h version.h consts.h    # unzipsfx only
  349.     $(CP) unzip.c unzipsfx.c
  350.     $(CC) -c $(CF) -DSFX unzipsfx.c
  351.     $(RM) unzipsfx.c
  352.  
  353.  
  354. unix_make:
  355. #    @echo\
  356. # '(Ignore any errors from `make'"' due to the following command; it's harmless.)"
  357.     -@2>&1 $(LN) unix/Makefile . > /dev/null || echo > /dev/null
  358.  
  359. # this really only works for Unix targets, unless E and O specified on cmd line
  360. clean:
  361.     @echo ""
  362.     @echo '         This is a Unix-specific target.  (Just so you know.)'
  363.     @echo ""
  364.     rm -f $(UNZIPS) $(OBJS) $(OBJF) $(OBJX) api$O apihelp$O crc_gcc$O \
  365.       unzipstb$O
  366.  
  367. install:    $(UNZIPS) $(MANS)
  368.     $(INSTALL) $(UNZIPS) $(BINDIR)
  369.     $(RM) $(BINDIR)/zipinfo$E
  370.     $(LN) $(BINDIR)/unzip$E $(BINDIR)/zipinfo$E
  371.     $(INSTALL) unix/unzip.1 $(MANDIR)/unzip.$(manext)
  372.     $(INSTALL) unix/unzipsfx.1 $(MANDIR)/unzipsfx.$(manext)
  373.     $(INSTALL) unix/zipinfo.1 $(MANDIR)/zipinfo.$(manext)
  374.     $(INSTALL) unix/funzip.1 $(MANDIR)/funzip.$(manext)
  375.     $(CHMOD) 755  $(INSTALLEDBIN)
  376.     $(CHMOD) 644  $(INSTALLEDMAN)
  377.  
  378. install_asm:    unix_make
  379.     $(MAKE) install CRC32=crc_gcc
  380.  
  381. # alternatively, could use zip method:  -cd $(BINDIR); rm -f $(UNZIPS)  [etc.]
  382. uninstall:
  383.     rm -f $(INSTALLEDBIN) $(INSTALLEDMAN)
  384.  
  385.  
  386. TESTZIP = testmake.zip    # the test zipfile
  387.  
  388. # test some basic features of the build
  389. test:        check
  390.  
  391. check:    unzips
  392.     @echo '  This is a Unix-specific target.  (Just so you know.)'
  393.     if test ! -f $(TESTZIP); then \
  394.         echo "  error:  can't find test file $(TESTZIP)"; exit 1; fi
  395. #
  396.     echo "  testing extraction"
  397.     ./unzip -b $(TESTZIP) testmake.zipinfo
  398.     if test $? ; then \
  399.         echo "  error:  file extraction from $(TESTZIP) failed"; exit 1; fi
  400. #
  401.     echo '  testing zipinfo (unzip -Z)'
  402.     ./unzip -Z $(TESTZIP) > testmake.unzip-Z
  403.     if diff testmake.unzip-Z testmake.zipinfo; then ;; else \
  404.         echo '  error:  zipinfo output doesn't match stored version'; fi
  405.     $(RM) testmake.unzip-Z testmake.zipinfo
  406. #
  407.     echo '  testing unzip -d exdir option'
  408.     ./unzip -b $(TESTZIP) -d testun
  409.     cat testun/notes
  410. #
  411.     echo '  testing unzip -o and funzip (ignore funzip warning)'
  412.     ./unzip -boq $(TESTZIP) notes -d testun
  413.     ./funzip < $(TESTZIP) > testun/notes2
  414.     if diff testun/notes testun/notes2; then ;; else \
  415.         echo 'error:  funzip output disagrees with unzip'; fi
  416. #
  417.     echo '  testing unzipsfx (self-extractor)'
  418.     cat unzipsfx $(TESTZIP) > testsfx
  419.     $(CHMOD) 0700 testsfx
  420.     ./testsfx -b notes
  421.     if diff notes testun/notes; then ;; else \
  422.         echo '  error:  unzipsfx file disagrees with unzip'; fi
  423.     $(RM) testsfx notes testun/notes testun/notes2
  424.     rmdir testun
  425. #
  426.     echo '  testing complete.'
  427.  
  428.  
  429. ################################
  430. # INDIVIDUAL MACHINE MAKERULES #
  431. ################################
  432.  
  433. #----------------------------------------------------------------------------
  434. #  Generic targets (can't assume make utility groks "$(MAKE)")
  435. #----------------------------------------------------------------------------
  436.  
  437. generic:    unzips       # first try if unknown
  438.  
  439. generic2:    unix_make  # second try if unknown:  hope make is called "make"
  440.     make -f unix/Makefile unzips CF="$(CF) -DBSD"
  441.  
  442. generic3:    unix_make  # third try if unknown:  hope make is called "make"
  443.     make -f unix/Makefile unzips CF="$(CF) -DSYSV"
  444.  
  445. # Generic unzip and funzip target using either shared or static zlib for
  446. # inflate rather than the original UnZip version.  (libz was libgz prior
  447. # to 0.94)  Need to figure out how to force unzipsfx to use static libz.
  448.  
  449. generic_zlib:    unix_make
  450.     @echo\
  451.  "This target assumes zlib (libz.a or libz.so.*) is already installed."
  452.     $(MAKE) unzip funzip CF="$(CF) -DUSE_ZLIB" LF2="-lz $(LF2)"
  453.  
  454. #----------------------------------------------------------------------------
  455. #  "Normal" group (BSD vs. SysV may be set in unzip.h via predefined macros):
  456. #----------------------------------------------------------------------------
  457.  
  458. 386i:        unzips    # sun386i, SunOS 4.0.2
  459. 3Bx:        unzips    # AT&T 3B2/1000-80; should work on any WE32XXX machine
  460. #aix_rt:        unzips    # IBM RT 6150 under AIX 2.2.1
  461. apollo:        unzips    # Apollo Domain/OS machines
  462. bull:        unzips    # Bull DPX/2, BOS 2.00.45 (doesn't require -Xk switch)
  463. convex:        unzips    # Convex C-120 and C-210 (-O is enough; -ext is default)
  464. cray:        unzips    # Cray-2 and Y-MP, using default (possibly old) compiler
  465. dec:        unzips    # DEC 5820 (MIPS RISC), test version of Ultrix v4.0
  466. encore:        unzips    # Multimax
  467. eta:        unzips    # ETA-10P*, hybrid SysV with BSD 4.3 enhancements
  468. gould:        unzips    # Gould PN9000 running UTX/32 2.1Bu01
  469. hp:        unzips    # HP 9000 series (68020), 4.3BSD or HP-UX A.B3.10 Ver D
  470. hpux:        unzips    # (to match zip's makefile entry)
  471. mips:        unzips    # MIPS M120-5(?), SysV.3 [error in sys/param.h file?]
  472. next10:        unzips    # NeXT (generic; use next2x or next3x for better opt.)
  473. osf1:        unzips    # DECstation, including Alpha-based; DEC OSF/1 v1.x
  474. pyr_:        unzips    # [failsafe target for pyramid target below]
  475. pyr_ucb:    unzips    # Pyramids running BSD universe by default (see below)
  476. realix:        unzips    # Modcomp Real/IX (SysV.3); note "gcc" = GLS C, not GNU
  477. sco:        unzips    # Xenix/386 (tested on 2.3.1); SCO Unix 3.2.0.
  478. sgi:        unzips    # Silicon Graphics; Irix 3.3.2, 4.0.x, 5.2, etc.
  479. stellar:    unzips    # gs-2000
  480. sun:        unzips    # old target; no good with solaris...use "sunos" now
  481. sunos:        unzips    # Sun 3, 4; SunOS 4.x (SOME SYSTEMS ARE SYSTEM V!)
  482. tahoe:        unzips    # tahoe (CCI Power6/32), 4.3BSD
  483. ultrix:        unzips    # VAXen, DEC 58x0 (MIPS guts), DECstation 2100; v4.x
  484. vax:        unzips    # general-purpose VAX target (not counting VMS)
  485.  
  486. #----------------------------------------------------------------------------
  487. #  BSD group (for timezone structs [struct timeb]):
  488. #----------------------------------------------------------------------------
  489.  
  490. bsd:        _bsd    # generic BSD (BSD 4.2 & Ultrix handled in unzip.h)
  491. bsd386:        _bsd    # BSDI BSD/386 version 1.0
  492.  
  493. _bsd:        unix_make
  494.     $(MAKE) unzips CF="$(CF) -DBSD"
  495.  
  496. #----------------------------------------------------------------------------
  497. #  SysV group (for extern long timezone and ioctl.h instead of sgtty.h):
  498. #----------------------------------------------------------------------------
  499.  
  500. aix_rt:        _sysv    # IBM RT 6150 under AIX 2.2.1
  501. amdahl:        _sysv    # Amdahl (IBM) mainframe, UTS (SysV) 1.2.4 and 2.0.1
  502. aviion:        _sysv    # Data General AViiONs, DG/UX 4.3x
  503. pyr_att:    _sysv    # Pyramids running AT&T (SysV) universe by default
  504. solaris:    _sysv    # Sun SPARC & x86, Solaris 2.x
  505. stardent:    _sysv    # Stardent ...
  506. sysv:        _sysv    # generic System V Unix (Xenix handled in unzip.h)
  507. xos:        _sysv    # Olivetti LSX-3005..3045, X/OS 2.3 and 2.4
  508.  
  509. _sysv:        unix_make
  510.     $(MAKE) unzips CF="$(CF) -DSYSV"
  511.  
  512. #----------------------------------------------------------------------------
  513. #  Version 7 group (old/obsolescent):
  514. #----------------------------------------------------------------------------
  515.  
  516. pixel:        _v7    # Pixel 80, 100 (68000-based, V7/mostly BSD4.1 compat.)
  517. v7:        _v7    # generic Unix Version 7 box (prob. only Pixel...)
  518.  
  519. _v7:
  520.     make -f unix/Makefile unzips \
  521.      CF="$(CF) -DV7 -DNO_PARAM_H -DSHORT_NAMES -DBSD -DZMEM"
  522.  
  523. #----------------------------------------------------------------------------
  524. #  "Unique" group (require non-standard options):
  525. #----------------------------------------------------------------------------
  526.  
  527. # AT&T 7300 (M68000/SysV.3) (add -DSYSV? -DNO_LIMITS?)
  528. 7300:        unix_make
  529.     $(MAKE) unzips CF="$(CF) -DNO_DIR -DNO_MKDIR -DNO_STRNICMP"
  530.  
  531. 7300_gcc:    unix_make
  532.     $(MAKE) unzips CC=gcc LD=gcc LF2="" \
  533.      CF="-O2 -I. -DNO_DIR -DNO_MKDIR -DNO_STDLIB_H -DNO_STRNICMP $(LOC)"
  534.     $(STRIP) $(UNZIPS)
  535.  
  536. # IBM AIX 3.x on an RS/6000:  see rs6000 target below
  537. aix:        rs6000
  538.  
  539. # Amdahl UTS 2.1.4 with "extended file types" filesystem (aarrrggghhhh...)
  540. amdahl_eft:    unix_make
  541.     $(MAKE) unzips CF="$(CF) -eft -DSYSV"
  542.  
  543. # MS-DOS:  Borland C++ 3.0 (can change UnZip memory model to small for more
  544. # speed but no ZipInfo support [-ml -> -ms in _bcc_dos], but may run out of
  545. # memory when inflating--should not be true anymore in 5.11)
  546. bcc_dos:    _bcc_dos fu_bcc sfx_bcc
  547.  
  548. _bcc_dos:    bcc_rsp        #  v-- change to -ml for large model
  549.     $(MAKE) unzip.exe CF="-w -ms -O2 -I. $(LOC)" CC=bcc LD=bcc E=.exe\
  550.      O=.obj M=msdos LOBJS="" LF="@bcc_rsp" LF2=""
  551.     del bcc_rsp
  552.  
  553. bcc_rsp:
  554.     echo $(OBJS1:.o=.obj) > bcc_rsp
  555.     echo $(OBJS2:.o=.obj) >> bcc_rsp
  556.     echo $(OBJS3:.o=.obj) msdos.obj >> bcc_rsp
  557.  
  558. fu_bcc:
  559.     $(MAKE) funzip.exe CF="-w -ms -O2 -I. $(LOC)" CC=bcc LD=bcc E=.exe\
  560.      O=.obj FL="" FL2="" CP=copy RM=del
  561.  
  562. sfx_bcc:
  563.     $(MAKE) unzipsfx.exe CF="-w -ms -O2 -I. $(LOC)" CC=bcc LD=bcc E=.exe\
  564.      O=.obj SL="" SL2="" CP=copy RM=del
  565.  
  566. # Coherent 3.x/4.x, Mark Williams C.  ``For Coherent's CC, it needs either
  567. # -T0 or -T150000 (or bigger) added to the CFLAGS, otherwise the compiler
  568. # runs out of memory and dies in zipinfo.c.'' [Fred "Fredex" Smith, 940719]
  569. coherent:    unix_make
  570.     $(MAKE) unzips CF="$(CF) -T0"
  571.  
  572. # Cray-2, Y-MP or C90, running Unicos 5.x to 8.x (SysV + BSD enhancements)
  573. # and Standard (ANSI) C compiler 3.0 or later.
  574. cray_opt:    unix_make
  575.     $(MAKE) unzips CF="$(CF) -h scalar3 -h vector3"
  576.  
  577. # The unzip41 build on a Cyber 910/SGI running Irix v3.3.3 was successful
  578. # with the following change to Makefile:
  579. cyber_sgi:    unix_make
  580.     $(MAKE) unzips CF="$(CF) -I/usr/include/bsd"\
  581.      LF="-lbsd $(LF)" SL="-lbsd $(SL)"
  582.  
  583. # 680x0, DIAB dnix 5.2/5.3 (a Swedish System V clone)
  584. #
  585. # Options for the dnix cc:
  586. #  -X7 = cc is strict ANSI C
  587. #  -X9 = warnings if a function is used without a declaration
  588. #
  589. dnix:        unix_make
  590.     $(MAKE) unzips CF="$(CF) -X7 -X9 -DDNIX"
  591.  
  592. # Generic BSDish Unix gcc.  ``The -O2 only works with the latest version of
  593. # gcc; you may have to use -O only for earlier versions.  I have no idea why
  594. # -s causes this bug in gcc.''  [Bug:  "nm: unzip: no name list", "collect:
  595. # /usr/bin/nm returned 1 exit status".]  If you don't have strip, don't
  596. # worry about it (it just makes the executable smaller and can be replaced
  597. # with "echo" instead).
  598. #
  599. gcc:        unix_make
  600.     $(MAKE) unzips CC=gcc LD=gcc CF="-O2 -I. $(LOC)" LF2=""
  601.     $(STRIP) $(UNZIPS)
  602.  
  603. # MS-DOS with D.J. Delorie's djgpp 1.12.  Note that earlier versions of go32
  604. # (< 1.11) don't support DOS function 0x38 (necessary for "unzip -v foobar").
  605. # Note also that this set of targets has work-arounds for three bugs in the
  606. # older version (3.69) of GNU make formerly distributed with djgpp:  (1) it
  607. # sets the MAKE variable incorrectly for spawning with COMMAND.COM (forward
  608. # slashes instead of backslashes--fixed in 3.71 by not spawning COMMAND.COM),
  609. # so the usual $(MAKE) has been replaced by "make"; (2) it doesn't handle
  610. # makefile continuation lines correctly, most likely because of the MS-DOS
  611. # CR-LF line-endings (seems to be fixed in 3.71?), so long lines are used;
  612. # and (3) it doesn't handle quotes as in CF="-O2 -Wall etc." correctly, so
  613. # these macros have been changed to "CF=-O2 -Wall etc." where necessary.
  614. # The newer GNU make (version 3.71) does not handle quotes correctly, but
  615. # prepending "command /c" to each make line is reported by E-Yen Tan
  616. # <e-yen.tan@brasenose.oxford.ac.uk> to be a successful work-around.  The
  617. # emx version of GNU make 3.71 which is maintained by Kai Uwe Rommel has
  618. # other fatal bugs involving the shell (necessary for recursive targets
  619. # like this one).  GRR 940430, 940723, 940814, 951230
  620. #
  621. djgpp1:        _gcc_dos1 fu_gcc1 sfx_gcc1    # djgpp v1.x with GO32 extender
  622. gcc_dos1:    _gcc_dos1 fu_gcc1 sfx_gcc1    # djgpp v1.x with GO32 extender
  623.  
  624. _gcc_dos1: gcc_rsp
  625. # this line works with GNU make 3.69:
  626. #    make unzip CC=gcc LD=gcc M=msdos "CF=-O2 -Wall -I. $(LOC)" LOBJS="" "LF=-o unzip @gcc_rsp" LF2=""
  627. #
  628. # this line should work with GNU make 3.71:
  629.     command /c make unzip CC=gcc LD=gcc M=msdos "CF=-O2 -Wall -I. $(LOC)" LOBJS="" "LF=-o unzip @gcc_rsp" LF2=""
  630. #
  631. # these lines don't work at all, to our knowledge:
  632. #    $(MAKE) unzip CC=gcc LD=gcc M=msdos "CF=-O2 -Wall -I. $(LOC)"\
  633. #     LOBJS="" LF="-o unzip @gcc_rsp" LF2=""
  634. #
  635.     $(STRIP) unzip
  636.     coff2exe unzip
  637. #    use this instead if you want to create a stand-alone executable (bigger;
  638. #    may require full path to go32.exe):
  639. #    coff2exe -s go32.exe unzip
  640.     stubedit unzip.exe globbing=no
  641.     del gcc_rsp
  642.     del unzip
  643. #
  644.     coff2exe -g zipinfo
  645.     stubedit zipinfo.exe runfile=unzip.exe globbing=no
  646.     del zipinfo
  647.  
  648. fu_gcc1:
  649. # this line works with GNU make 3.69:
  650. #    make funzip CC=gcc LD=gcc "CF=-Wall -O2 -I. $(LOC)" FL2="" CP=copy RM=del
  651. #
  652. # this line should work with GNU make 3.71:
  653.     command /c make funzip CC=gcc LD=gcc "CF=-Wall -O2 -I. $(LOC)" FL2="" CP=copy RM=del
  654. #
  655. # these lines don't work at all, to our knowledge:
  656. #    $(MAKE) funzip CC=gcc LD=gcc "CF=-Wall -O2 -I. $(LOC)" FL2=""\
  657. #     CP=copy RM=del
  658. #
  659.     $(STRIP) funzip
  660.     coff2exe funzip
  661. #    use this instead if you want to create a stand-alone executable (bigger;
  662. #    may require full path to go32.exe):
  663. #    coff2exe -s go32.exe funzip
  664.     del funzip
  665.  
  666. sfx_gcc1:
  667. # this line works with GNU make 3.69:
  668. #    make unzipsfx CC=gcc LD=gcc M=msdos "CF=-Wall -O2 -I. $(LOC)" SL2="" CP=copy RM=del
  669. #
  670. # this line should work with GNU make 3.71:
  671.     command /c make unzipsfx CC=gcc LD=gcc M=msdos "CF=-Wall -O2 -I. $(LOC)" SL2="" CP=copy RM=del
  672. #
  673. # these lines don't work at all, to our knowledge:
  674. #    $(MAKE) unzipsfx CC=gcc LD=gcc M=msdos "CF=-Wall -O2 -I. $(LOC)"\
  675. #     SL2="" CP=copy RM=del
  676. #
  677.     $(STRIP) unzipsfx
  678.     coff2exe unzipsfx
  679. #    use this instead if you want to create a stand-alone executable (bigger;
  680. #    may require full path to go32.exe):
  681. #    coff2exe -s go32.exe unzipsfx
  682.     stubedit unzipsfx.exe globbing=no
  683.     del unzipsfx
  684.  
  685. # We don't need this with djgpp 2.x.
  686. gcc_rsp:
  687.     echo $(OBJS1) > gcc_rsp
  688.     echo $(OBJS2) >> gcc_rsp
  689.     echo $(OBJS3) msdos.o >> gcc_rsp
  690.  
  691. # MS-DOS with D.J. Delorie's djgpp 2.0.  See above for comments about make
  692. # utilities (may or may not still be relevant).  All executables are now
  693. # stand-alone, but can provide Charles W. Sandmann's (alternate?) DPMI server
  694. # if needed via "stubedit unzip.exe dpmi=cwsdpmi.exe" (for example).  950816
  695.  
  696. djgpp:        dj_make _gcc_dos fu_gcc sfx_gcc        # djgpp v2.x
  697. djgpp2:        dj_make _gcc_dos fu_gcc sfx_gcc        # djgpp v2.x
  698. gcc_dos:    dj_make _gcc_dos fu_gcc sfx_gcc        # djgpp v2.x
  699.  
  700. dj_make: unix/Makefile
  701.     @copy unix\Makefile >nul
  702.  
  703. _gcc_dos:
  704.     make unzip CC=gcc LD=gcc AS=gcc M=msdos "CF=-O2 -Wall -I. -DASM_CRC $(LOC)" CRC32=crc_gcc "LF=-o unzip" LF2=""
  705. #    $(MAKE) unzip CC=gcc LD=gcc M=msdos "CF=-O2 -Wall -I. $(LOC)"\
  706. #     LOBJS="" LF="-o unzip @gcc_rsp" LF2=""
  707.     $(STRIP) unzip
  708.     stubify unzip
  709.     del gcc_rsp
  710.     del unzip
  711.     stubify -g zipinfo.exe
  712.     stubedit zipinfo.exe runfile=unzip argv0=zipinfo
  713.     @echo 'Make sure to use the install_asm target rather than the install target'
  714.  
  715. fu_gcc:
  716.     make funzip CC=gcc LD=gcc AS=gcc "CF=-Wall -O2 -I. -DASM_CRC $(LOC)" CRC32=crc_gcc FL2="" CP=copy RM=del
  717. #    $(MAKE) funzip CC=gcc LD=gcc "CF=-Wall -O2 -I. $(LOC)" FL2=""\
  718. #     CP=copy RM=del
  719.     $(STRIP) funzip
  720.     stubify funzip
  721.     del funzip
  722.     @echo 'Make sure to use the install_asm target rather than the install target'
  723.  
  724. sfx_gcc:
  725.     make unzipsfx CC=gcc LD=gcc AS=gcc M=msdos "CF=-Wall -O2 -I. -DASM_CRC $(LOC)" CRC32=crc_gcc SL2="" CP=copy RM=del
  726. #    $(MAKE) unzipsfx CC=gcc LD=gcc M=msdos "CF=-Wall -O2 -I. $(LOC)"\
  727. #     SL2="" CP=copy RM=del
  728.     $(STRIP) unzipsfx
  729.     stubify unzipsfx
  730.     del unzipsfx
  731.     @echo 'Make sure to use the install_asm target rather than the install target'
  732.  
  733. # Heurikon HK68 (68010), UniPlus+ System V 5.0, Green Hills C-68000
  734. hk68:        unix_make
  735.     $(MAKE) unzips CC="gcc" LD="gcc"\
  736.      LF="-n $(LF)" SL="-n $(SL)" FL="-n $(FL)"\
  737.      CF="-ga -X138 -I. $(LOC) -Dlocaltime=localti -Dtimezone=timezon"
  738.  
  739. # "ISI machine (68025 CPU)" (based on e-mail from Rob White <rsw@TFS.COM>;
  740. # no further information).  May also need DIRENT defined.
  741. isi:        unix_make
  742.     $(MAKE) unzips CF="$(CF) -DDECLARE_ERRNO"
  743.  
  744. # Linux (Posix, approximately SysV):  virtually any version since before 0.96.
  745. linux:        unix_make
  746.     $(MAKE) unzips CC=gcc LD=gcc CF="-O3 -I. $(LOC)"
  747. #    $(MAKE) unzips CC=gcc LD=gcc
  748.  
  749. # Linux on 386 platform, using the assembler replacement for crc32.c:
  750. linux_asm:    unix_make
  751.     $(MAKE) unzips CC=gcc LD=gcc AS=gcc CF="-O3 -I. -DASM_CRC $(LOC)"\
  752.      AF="-Di386 $(AF)" CRC32=crc_gcc
  753.     @echo 'Be sure to use the install_asm target rather than the install target'
  754.  
  755. # Linux host with go32 (djgpp) cross-compiler (go32crs.tgz) for 32-bit DOS.
  756. # Change msdos_$O target (near line 303 above) from msdos\msdos to msdos/msdos.
  757. linux_dos:    unix_make
  758.     $(MAKE) unzips CC=go32gcc LD=go32gcc M=msdos CF="-Wall -O2 -I. $(LOC)"
  759. #    go32-strip unzip
  760. #    Due to limitations of the cross-compiling package, this has to be
  761. #    done manually:
  762.     @echo Copy $(UNZIPS) to your DOS partition and use coff2exe.
  763.  
  764. # Linux ELF shared library (ooo, it's so easy).  This is a test target for
  765. # now, and it only makes the UnZip/ZipInfo stuff (not fUnZip or UnZipSFX).
  766. # Do "make clean" before using this target the first time, eh?  The version
  767. # number may change to match the UnZip version.  Or not.  Whatever.  Also
  768. # do "setenv LD_LIBRARY_PATH `pwd`" or similar to test the DLL in place
  769. # (with unzip, which is now the version linked with the shared library).
  770. #
  771. linux_shlib:    unix_make
  772.     $(MAKE) objsdll CC=gcc CF="$(CF) -DDLL -fPIC"
  773.     gcc -shared -Wl,-soname,libunzip.so.0 -o libunzip.so.0.2 $(OBJSDLL)
  774.     ln -sf libunzip.so.0.2 libunzip.so.0
  775.     gcc -c -O unzipstb.c
  776.     gcc -o unzip unzipstb.o -L. -lunzip
  777.  
  778. # Linux ELF shared library, as above, but using inflate() from zlib (libz.so)
  779. # instead of the original UnZip version.  (libz was libgz prior to 0.94)
  780. linux_shlibz:    unix_make
  781.     $(MAKE) objsdll CC=gcc CF="$(CF) -DDLL -DUSE_ZLIB -fPIC"
  782.     gcc -shared -Wl,-soname,libunzip.so.0 -o libunzip.so.0.2 $(OBJSDLL)
  783.     ln -sf libunzip.so.0.2 libunzip.so.0
  784.     gcc -c -O unzipstb.c
  785.     gcc -o unzip unzipstb.o -L. -lunzip -lz
  786.  
  787. # Minix 1.5 PC for the 386.  Invoke as is to use default cc, or as "make
  788. # minix CC=gcc" to use gcc.  Try "make linux" if you have a working termios.h.
  789. minix:        unix_make
  790.     $(MAKE) unzips CF="$(CF) -DMINIX -DSHORT_NAMES" CC=$(CC) LD=$(CC)
  791.  
  792. # MS-DOS:  Microsoft C 6.0 and NMAKE.  "nmake msc_dos" works fine, aside
  793. # from an irrelevant message (possibly) about the creation of a temporary
  794. # file.  Environment variable LOCAL_UNZIP (or CL) should be set via "SET
  795. # LOCAL_UNZIP=-FPi87" if you use the 80x87 library; also add -G2 or -G3 if
  796. # using a 286/386/486.  Note that setting too many things via LOCAL_UNZIP
  797. # may make the command line too long for the default COMMAND.COM shell, so
  798. # use CL instead in that case.  With VC++ Pro, -O2 instead of -Oait seems to
  799. # work OK and makes the executables slightly faster.  Use at your own risk.
  800. #
  801. msc_dos:    _msc_dos fu_msc sfx_msc
  802.  
  803. # can change UnZip memory model (-AS) to large (-AL) if necessary, but should
  804. # no longer be necessary in UnZip 5.11 and later
  805. _msc_dos:    msc_rsp
  806.     $(MAKE) unzip.exe CF="-AS -W3 -Oait -Gs -nologo -I. $(LOC)" CC=cl\
  807.      LD=link E=.exe O=.obj M=msdos LOBJS="" LF="@msc_rsp" LF2=""
  808.     del msc_rsp
  809.  
  810. msc_rsp:
  811.     echo $(OBJS1:.o=.obj) + > msc_rsp
  812.     echo $(OBJS2:.o=.obj) + >> msc_rsp
  813.     echo $(OBJS3:.o=.obj) msdos.obj/noi/e/st:0x0c00; >> msc_rsp
  814.  
  815. fu_msc:
  816.     set CL=-AS -Oait -Gs -nologo -I.
  817.     $(MAKE) funzip.exe CF="$(LOC)" CC=cl LD=link E=.exe O=.obj\
  818.      FL="/noi/nol/e" FL2=",funzip;" RM=del CP=copy
  819.  
  820. sfx_msc:
  821.     set CL=-AS -Oait -Gs -nologo -I.
  822.     $(MAKE) unzipsfx.exe CF="$(LOC)" CC=cl LD=link E=.exe O=.obj M=msdos\
  823.      SL="/noi/nol/e" SL2=",unzipsfx;" RM=del CP=copy
  824.  
  825. # $(NOD):  intended to be used as   SET NOD=-link /nod:slibcep   to allow the
  826. #          use of default library names (slibce.lib) instead of protected-mode
  827. #          names (slibcep.lib), but it fails:  MSC adds its own /nod qualifier,
  828. #          and there seems to be no way to override this.  Typical...
  829. #
  830. #    THIS TARGET RETAINED AS AN EXAMPLE ONLY.  USE MAKEFILE.OS2.
  831. #
  832. #msc_os2:        # 16-bit OS/2 (1.x) with MSC 6.00 (use makefile.os2)
  833. #    $(MAKE) -nologo unzips CC=cl LD=cl E=.exe O=.obj\
  834. #     OBJS="$(OBJS_OS2)" OBJZ="$(OBJZ_OS2)"\
  835. #     CF="-nologo -AC -Ocegit -G2s -DOS2 -DMSC $(LOC)"\
  836. #     LF="-nologo -AC $(LOC) -Lp -F 2000"\
  837. #     LF2="unzip.def -o unzip.exe $(NOD)" CP=copy RM=del\
  838. #     ZL="-nologo -AC $(LOC) -Lp -Fb" ZL2="zipinfo.def -o zipinfo.exe"
  839.  
  840. # NeXT info.
  841. next:
  842.     @echo
  843.     @echo\
  844.  '  Please pick a specific NeXT target:  "make next10" will create a generic'
  845.     @echo\
  846.  '  NeXT executable; "make next2x" will create a smaller executable (for'
  847.     @echo\
  848.  '  NeXTstep 2.0 and higher); "make next3x" will create a small executable'
  849.     @echo\
  850.  '  with significantly better optimization (NeXTstep 3.0 and higher only);'
  851.     @echo\
  852.  '  "make nextfat" will create a fat, multi-architecture (NeXT plus Intel)'
  853.     @echo\
  854.  '  executable (NeXTstep 3.1 and higher only).'
  855.     @echo
  856.  
  857. # 68030 BSD 4.3+Mach.  NeXT 2.x: make the executable smaller.
  858. next2x:        unix_make
  859.     $(MAKE) unzips LF2="-object -s"
  860.  
  861. # NeXT 3.x: as above, plus better optimization.
  862. next3x:        unix_make
  863.     $(MAKE) unzips CF="-O2 -I. $(LOC)" LF2="-object -s"
  864.  
  865. # NeXT 3.1+: make the executable fat (multi-architecture binary [MAB],
  866. # for "black" [NeXT] and "white" [x86] hardware, so far).
  867. nextfat:    unix_make
  868.     $(MAKE) unzips CF="-O2 -I. $(LOC) -arch i386 -arch m68k" \
  869.      LF2="-arch i386 -arch m68k -object -s"
  870.  
  871. # Sequent Symmetry running Dynix/ptx (sort of SysV.3):  needs to link
  872. # with libseq to get symlink().
  873. ptx:        unix_make
  874.     $(MAKE) unzips CF="$(CF) -DSYSV -DTERMIO -DPTX" LF2="$(LF2) -lseq"
  875.  
  876. # Pyramid 90X (probably all) under >= OSx4.1, either universe.  (This is an
  877. # experimental target!  If it fails, use either pyr_ucb or pyr_att instead.)
  878. # The make in the BSD half is too stupid to understand $(MAKE), sigh...
  879. pyramid:    unix_make
  880.     -make -f unix/Makefile pyr_`universe`
  881.  
  882. # REGULUS:  68040-based, "real-time" SysV.3 mutant; uses gcc, with "REGULUS"
  883. # predefined.
  884. regulus:    unix_make
  885.     $(MAKE) unzips CF="$(CF) -traditional -DSYSV -DNO_MKDIR"
  886.  
  887. # IBM RS/6000 under AIX 3.2
  888. rs6000:        unix_make
  889.     $(MAKE) unzips CF="$(CF) -DBSD -D_BSD -DUNIX" LF2="-lbsd"
  890.  
  891. # SCO cross compile from Unix to DOS. Tested with Xenix/386 and OpenDeskTop.
  892. # Should work with Xenix/286 as well. (davidsen)  Note that you *must* remove
  893. # the Unix objects and executable before doing this!  (Piet Plomp:  gcc won't
  894. # recognize the -M0 flag which forces 8086 code.)  (GRR:  may need to reduce
  895. # stack to 0c00h if using 286/small-model code...?)
  896. sco_dos:    unix_make
  897.     $(MAKE) unzips CF="-O -I. $(LOC) -dos -M0" M=msdos\
  898.      LF="-dos -F 2000" LF2="-o unzip.exe"\
  899.      FL="-dos" FL2="-o funzip.exe" SL="-dos" SL2="-o unzipsfx.exe"
  900.  
  901. # SCO UNIX with shared libraries and no international support.  If you are
  902. # not using a USA-style keyboard and display, you may want to remove -nointl
  903. # to get support.  It adds quite a bit to the size of the executable.
  904. sco_sl:        unix_make
  905.     $(MAKE) unzips LF="$(LF) -nointl" LF2="$(LF2) -lc_s"\
  906.      SL="$(SL) -nointl" FL="$(FL) -nointl"
  907.  
  908. # SCO Xenix/286 2.3.3 with 2.2.1 development system
  909. sco_x286:    unix_make
  910.     $(MAKE) unzips CF="$(CF) -Mel2 -LARGE -DTERMIO" LF="$(LF) -Mel2 -LARGE"
  911.  
  912. # Sequent Symmetry with Dynix.  (386, but needs -DZMEM)
  913. # This should also work on Balance but I can't test it just yet.
  914. sequent:    unix_make
  915.     $(MAKE) unzips CF="$(CF) -DBSD -DZMEM"
  916.  
  917. # Generic System V + GNU C
  918. sysv_gcc:    unix_make
  919.     $(MAKE) unzips CC=gcc LD=gcc CF="-O2 -I. -DSYSV $(LOC)" LF2=""
  920.     $(STRIP) $(UNZIPS)
  921.  
  922. # AT&T 6300+, System V.2 Unix:  run-time out-of-memory error if don't use -Ml;
  923. # also compile-time error if work arrays dimensioned at HSIZE+2 (>32K)
  924. sysv6300:    unix_make
  925.     $(MAKE) unzips CF="$(CF) -Ml -DSYSV" LF="$(LF) -Ml"\
  926.      SL="$(SL) -Ml" FL="$(FL) -Ml"
  927.  
  928. # Texas Instruments System V.3 (running on HP 9000-1500)
  929. ti_sysv:    unix_make
  930.     $(MAKE) unzips CF="$(CF) -DSYSV -DNO_UID_GID -DUID_USHORT"
  931.  
  932. # SCO Xenix (Joe Foster 950508:  "unzip needs to be linked with -lx [for the
  933. # opendir(), readdir(), telldir(), rewinddir(), and closedir() calls]")
  934. xenix:         unix_make
  935.     $(MAKE) unzips LF2="$(LF2) -lx"
  936.  
  937. # Wombat 68000 (or whatever).
  938. # I didn't do this.  I swear.  No, really.
  939. wombat:        unix_make
  940.     @echo
  941.     @echo  '    Ha ha!  Just kidding.'
  942.     @echo
  943.