1 #==============================================================================
2 # Makefile for UnZip, UnZipSFX and fUnZip: Unix and MS-DOS ("real" makes only)
3 # Version: 5.4 19 November 1998
4 #==============================================================================
7 # INSTRUCTIONS (such as they are):
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
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).
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:
26 # (That never works--makes that are too stupid to define MAKE are also too
27 # stupid to look in the environment--but try it anyway for kicks. :-) )
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.
33 # Be sure to test your new UnZip (and UnZipSFX and fUnZip); successful compila-
34 # tion does not always imply a working program.
41 # Defaults most systems use (use LOCAL_UNZIP in environment to add flags,
45 CC = cc# try using "gcc" target rather than changing this (CC and LD
46 LD = $(CC)# must match, else "unresolved symbol: ___main" is possible)
50 CF = -O -I. -I.. -I../inczip $(LOC)
54 # general-purpose stuff
68 # defaults for crc32 stuff and system dependent headers
72 OBJS1 = unzip$O $(CRC32)$O crctab$O crypt$O envargs$O explode$O
73 OBJS2 = extract$O fileio$O globals$O inflate$O list$O match$O
74 OBJS3 = process$O ttyio$O unreduce$O unshrink$O zipinfo$O
75 OBJS = $(OBJS1) $(OBJS2) $(OBJS3) $M$O packinst$O
76 #OBJS = $(OBJS1) $(OBJS2) $(OBJS3) $M$O install$O wxmain$O instsup$O
77 UNZIP_H = ../inczip/unzip.h ../inczip/unzpriv.h ../inczip/globals.h
80 # (probably can change next two to `install' and `install -d' if you have it)
84 ###############################################
85 # BASIC COMPILE INSTRUCTIONS AND DEPENDENCIES #
86 ###############################################
88 # this is for GNU make; comment out and notify zip-bugs if it causes errors
89 .SUFFIXES: .c .o .obj .pic.o
91 # yes, we should be able to use the $O macro to combine these two, but it
92 # fails on some brain-damaged makes (e.g., AIX's)...no big deal
100 $(CC) -c $(CF) -o $@ $*.c
105 # EDIT HERE FOR PARALLEL MAKES on Sequent (and others?)--screws up MS-DOS
106 # make utilities if default: change "unzip$E:" to "unzip$E:&"
108 sfx$E: $(OBJS) # add `&' for parallel makes
111 crc32$O: crc32.c $(UNZIP_H) ../inczip/zip.h
112 crctab$O: crctab.c $(UNZIP_H) ../inczip/zip.h
113 crypt$O: crypt.c $(UNZIP_H) ../inczip/zip.h ../inczip/crypt.h ../inczip/ttyio.h
114 envargs$O: envargs.c $(UNZIP_H)
115 explode$O: explode.c $(UNZIP_H)
116 extract$O: extract.c $(UNZIP_H) ../inczip/crypt.h
117 fileio$O: fileio.c $(UNZIP_H) ../inczip/crypt.h ../inczip/ttyio.h ../inczip/ebcdic.h
118 funzip$O: funzip.c $(UNZIP_H) ../inczip/crypt.h ../inczip/ttyio.h ../inczip/tables.h
119 globals$O: globals.c $(UNZIP_H)
120 inflate$O: inflate.c ../inczip/inflate.h $(UNZIP_H)
121 list$O: list.c $(UNZIP_H)
122 match$O: match.c $(UNZIP_H)
123 process$O: process.c $(UNZIP_H)
124 ttyio$O: ttyio.c $(UNZIP_H) ../inczip/zip.h ../inczip/crypt.h ../inczip/ttyio.h
125 unreduce$O: unreduce.c $(UNZIP_H)
126 unshrink$O: unshrink.c $(UNZIP_H)
127 unzip$O: unzip.c $(UNZIP_H) ../inczip/crypt.h ../inczip/version.h ../inczip/consts.h
128 zipinfo$O: zipinfo.c $(UNZIP_H)
130 unix$O: unix.c $(UNZIP_H) ../inczip/version.h # Unix only
131 $(CC) -c $(CF) unix.c
133 packinst$O: ../packinst/packinst.c
134 $(CC) -c $(CF) ../packinst/packinst.c
136 #install$O: ../install.c
137 # $(CC) -c $(CF) ../install.c
139 #unix$O: ../wxmain.cpp
140 # $(CC) -c $(CF) ../wxmain.cpp
142 #unix$O: ../instsup.cpp
143 # $(CC) -c $(CF) ../instsup.cpp