# Makefile generated by imake - do not edit!
# $XConsortium: imake.c,v 1.51 89/12/12 12:37:30 jim Exp $

SHELL=/bin/sh
MAKESHELL=/bin/sh

TOP = .
CWD = .
CONFIGSRC = /source/config
DESTDIR=

IRULESRC = $(CONFIGSRC)

IMAKE= imake
IFLAGS= -I$(IRULESRC) $(OTHER_IFLAGS) -DTOPDIR=/source
XIFLAGS= -I$(ATHXLIBDIR)/X11/config -DUseInstalled

ICONFIGFILE = ${IRULESRC}/Imake.tmpl ${IRULESRC}/Imake.rules \
	${IRULESRC}/site.def Imakefile
MKDIRHIER= sh $(IRULESRC)/mkdirhier.sh

ATHVERS = ${IRULESRC}/update.conf

ATHBASEDIR=/usr/athena

ATHLIBDIR=$(ATHBASEDIR)/lib
ATHBINDIR=$(ATHBASEDIR)/bin
ATHINCDIR=$(ATHBASEDIR)/include
ATHETCDIR=$(ATHBASEDIR)/etc
ATHCONFDIR=/etc/athena
ATHMANDIR=$(ATHBASEDIR)/man
ATHRBINDIR=/bin/athena
ATHRETCDIR=/etc/athena

ATHNEWDIR=$(ATHBINDIR)

ATHXAPPDIR=/usr/athena/lib/X11/app-defaults
ATHXBITDIR=/usr/athena/lib/X11/bitmaps
ATHXINCDIR=/usr/athena/include
ATHXLIBDIR=/usr/athena/lib

AFSDIR=/mit/afsuser/@sys

LINTCFLAG=-o
LINTFLAGS=$(DEFINES) -I/usr/athena/include

INSTALL=install -c
RANLIB=ranlib
CC=cc
LD=cc
AS=as
RM=rm -f

ETCMD=compile_et
SSCMD=mk_cmds

CDEBUG=-O

CFLAGS=$(CDEBUG) -DPOSIX $(DEFINES) -I/usr/athena/include
LDFLAGS= $(LDDEFS)
LDPATH=-L$(ATHLIBDIR)
LDLIBS=

all::
install:: install_dirs
install_dirs::
install::
install.man::

clean::
depend::

FRC::

###########################################################################
# start of Imakefile
###########################################################################

CRYPTF = -DCRYPT
CRYPTO = crypt$O

CC = 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) $(CRYPTF)
CF = -O $(LOC)
LF = -o unzip

ZC = -DZIPINFO
ZL = -o zipinfo

FC = # not used
FL = -o funzip

LN = rm -f misc_.c; ln
RM = rm -f
E =
O = .o
SHELL = /bin/sh
INSTALL = install -c -s
BINDIR = /mit/sipb/bin#   target directory - where to install executables

OBJS1 = unzip$O $(CRYPTO) envargs$O explode$O extract$O file_io$O inflate$O
OBJS2 = mapname$O match$O misc$O unreduce$O unshrink$O
OBJS = $(OBJS1) $(OBJS2)
LOBJS = $(OBJS)
OS2_OBJS = $(OBJS:.o=.obj) os2unzip.obj
OBJZ = zipinfo$O envargs$O match$O misc_$O
OS2_OBJZ = $(OBJZ:.o=.obj) os2zinfo.obj
OBJF = funzip$O $(CRYPTO) inflate$O
OS2_OBJF = # not yet supported
UNZIPS = unzip$E # zipinfo$E funzip$E	# zipinfo, funzip not fully supported

all:: 1

SYSTEMS1 = 386i 3Bx 7300 amdahl apollo aviion bsd bull c120 c210 coherent
SYSTEMS2 = convex cray cray_cc cray_v3 cyber_sgi dec dnix encore eta
SYSTEMS3 = gcc gcc_dos generic generic2 gould hk68 hp indigo linux
SYSTEMS4 = minix 1 msc_dos next osf1 p_iris pyramid rs6000 rtaix
SYSTEMS5 = sco sco_dos sco_x286 sequent sgi stellar sun sysv sysv6300
SYSTEMS6 = tahoe 1 vax wombat xos

SYS_UTIL1 = zi_dos zi_gcc zi_indigo zipinfo fu_gcc funzip

default::
	@if test -z "$(MAKE)"; then\
		if test -z "$(SYSTEM)";\
		then make help;\
		else make $(SYSTEM) MAKE="make";\
		fi;\
	else\
		if test -z "$(SYSTEM)";\
		then $(MAKE) help;\
		else $(MAKE) $(SYSTEM) goober;\
		fi;\
	fi

goober::

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\
 '  One of these actions should produce a working copy of unzip on most Unix'
	@echo\
 '  systems.  If you know a bit more about the machine on which you work, you'
	@echo\
 '  might try "make list" for a list of the specific systems supported herein.'
	@echo\
 '  And as a last resort, feel free to read the numerous comments within the'
	@echo\
 '  Makefile itself.  Note that to compile the decryption version of UnZip,'
	@echo\
 '  you must obtain crypt.c separately, in addition to uncommenting two lines'
	@echo\
 '  in Makefile (see the main Contents file for ftp and mail-server sites).'
	@echo\
 '  Have an excruciatingly pleasant 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
	@echo\
 'Otherwise set the shell variable SYSTEM to one of these and just type "make".'
	@echo\
 'Targets for related utilities (ZipInfo) include::'
	@echo
	@echo  "	$(SYS_UTIL1)"

	@echo
	@echo\
 'For further (very useful) information, please read the comments in Makefile.'
	@echo

CFLAGS = $(CF)

unzips::		$(UNZIPS)

unzip$E::	$(OBJS)
	$(LD) $(LF) $(LOBJS) $(LF2)

crypt$O::        crypt.c unzip.h zip.h	# may or may not be in distribution
envargs$O::      envargs.c unzip.h
explode$O::      explode.c unzip.h
extract$O::      extract.c unzip.h
file_io$O::      file_io.c unzip.h
funzip$O::       funzip.c unzip.h
inflate$O::      inflate.c unzip.h
mapname$O::      mapname.c unzip.h
match$O::        match.c unzip.h
misc$O::         misc.c unzip.h
os2unzip$O::     os2unzip.c unzip.h	# for OS/2 only
os2zinfo$O::     os2unzip.c unzip.h	# for OS/2 only
unreduce$O::     unreduce.c unzip.h
unshrink$O::     unshrink.c unzip.h
unzip$O::        unzip.c unzip.h

generic_msg::
	@echo
	@echo\
 '  Attempting "make generic" and "make zipinfo" now.  If this fails for some'
	@echo\
 '  reason, type "make help" and/or "make list" for suggestions.'
	@echo

install::	$(UNZIPS)
	$(INSTALL) $(UNZIPS) $(DESTDIR)$(BINDIR)

clean::
	rm -f $(OBJS) unzip$E $(OBJZ) zipinfo$E

generic::	unzip	# first try if unknown

generic2::		# second try if unknown:  hope make is called "make"...
	make unzip CF="$(CF) -DBSD"

386i::		unzip	# sun386i, SunOS 4.0.2
3Bx::		unzip	# AT&T 3B2/1000-80; should work on any WE32XXX machine
7300::		unzip	# AT&T 7300 (M68000/SysV)
apollo::		unzip	# Apollo Domain/OS machines
bull::		unzip	# Bull DPX/2, BOS 2.00.45 (doesn't require -Xk switch)
coherent::	unzip	# Coherent 3.10, Mark Williams C
cray_cc::	unzip	# Cray-2 and Y-MP, using default (possibly old) compiler
dec::		unzip	# DEC 5820 (MIPS RISC), test version of Ultrix v4.0
encore::		unzip	# Multimax
eta::		unzip	# ETA-10P*, hybrid SysV with BSD 4.3 enhancements
gould::		unzip	# Gould PN9000 running UTX/32 2.1Bu01
hp::		unzip	# HP 9000 series (68020), 4.3BSD or HP-UX A.B3.10 Ver D
hp_ux::		unzip	# (to match zip's makefile entry)
1::		unzip	# MIPS M120-5(?), SysV.3 [error in sys/param.h file?]
pyramid::	unzip	# Pyramid 90X, prob. all, under >= OSx4.1, BSD universe
rtaix::		unzip	# IBM RT 6150 under AIX 2.2.1
sco::		unzip	# Xenix/386 (tested on 2.3.1); SCO Unix 3.2.0.
stellar::	unzip	# gs-2000
sun::		unzip	# Sun 3, 4; SunOS 4.x (SOME SYSTEMS ARE SYSTEM V!)
tahoe::		unzip	# tahoe (CCI Power6/32), 4.3BSD
1::		unzip	# VAXen, DEC 58x0 (MIPS guts), DECstation 2100; v4.x
vax::		unzip	# general-purpose VAX target (not counting VMS)

bsd::		_bsd	# generic BSD (BSD 4.2 & Ultrix handled in unzip.h)

_bsd::
	$(MAKE) unzip CF="$(CF) -DBSD"

aos::
	$(MAKE) unzip CF="$(CF) -DBSD -U__STDC__"

amdahl::		_sysv	# Amdahl (IBM) mainframe, UTS (SysV) 1.2.4 and 2.0.1
aviion::         _sysv	# Data General AViiONs, DG/UX 4.3x
sgi::		_sysv	# Silicon Graphics Iris 4D, Irix SysV rel. 3.3.2
sysv::		_sysv	# generic System V Unix
xos::		_sysv	# Olivetti LSX-3005..3045, X/OS 2.3 and 2.4

_sysv::
	$(MAKE) unzip CF="$(CF) -DSYSV -DTERMIO"

c120::			# Convex C-120, OS 9.0, with non-vectorizing cc 4.0
	$(MAKE) unzip CF="-O1 $(LOC) -Dunix -DBSD"

c210::			# Convex C-210, OS 9.0, cc 4.0
	$(MAKE) unzip CF="-O2 $(LOC) -Dunix -DBSD"

convex::			# previous target was tested on C200/C400
	$(MAKE) unzip CF="$(CF) -Dunix -DCONVEX -ext" LF="$(LF) -ext"

cray::
	$(MAKE) unzip CC="scc" LD="scc"

cray_v3::
	$(MAKE) unzip CC="scc" LD="scc" CF="$(CF) -h scalar3 -h vector3"

cyber_sgi::
	$(MAKE) unzip CF="$(CF) -I/usr/include/bsd"\
	 LF="-lbsd $(LF)"

dnix::		# 680X0, DIAB dnix 5.2/5.3 (a Swedish System V clone)
	$(MAKE) unzip CF="$(CF) -DPROTO -DMODERN"

gcc::
	$(MAKE) unzip CC=gcc LD=gcc CF="-O2 $(LOC)" LF2=""
	strip unzip

gcc_dos::	# may need to add -Uunix to CF
	$(MAKE) unzip CC=gcc LD=gcc CF="-O2 -Wall $(LOC)"\
	 LF="-s" LF2="-o unzip"
	aout2exe unzip

hk68::
	$(MAKE) unzip CC="gcc" LD="gcc" LF="-n $(LF)" \
	CF="-ga -X138 $(LOC) -Dlocaltime=localti -Dtimezone=timezon"

indigo::
	$(MAKE) unzip CF="-cckr $(CF) -DTERMIO"

linux::                # Linux pre-0.96 with gcc 2.1
	$(MAKE) unzip CF="$(CF) -DTERMIO -DLINUX" CC=gcc LD=gcc

minix::
	$(MAKE) unzip CC=gcc CF="$(CF) -DMINIX"

msc_dos::	rsp
	$(MAKE) unzip.exe CF="-Oait -Gs $(LOC) -nologo" CC=cl LD=link E=.exe\
	 O=.obj LOBJS="" LF="@rsp" LF2=""
	del rsp

rsp::
	echo $(OBJS1::.o=.obj)+ > rsp
	echo $(OBJS2::.o=.obj)/noi/e/st:0x1000; >> rsp

msc_os2::		# 16-bit OS/2 (1.x) with MSC 6.00 (use makefile.os2)
	$(MAKE) -nologo unzip.exe zipinfo.exe CC=cl LD=cl E=.exe O=.obj\
	 OBJS="$(OS2_OBJS)" OBJZ="$(OS2_OBJZ)"\
	 CF="-nologo -AC -Ocegit -G2s -DOS2 -DMSC $(LOC)"\
	 LF="-nologo -AC $(LOC) -Lp -F 2000"\
	 LF2="unzip.def -o unzip.exe $(NOD)" LN="copy" RM="del"\
	 ZL="-nologo -AC $(LOC) -Lp -Fb" ZL2="zipinfo.def -o zipinfo.exe"

next::			# 68030 BSD 4.3+Mach
	$(MAKE) unzip LF2="-object -s"

osf1::
	$(MAKE) unzip LF2="-lbsd"

p_iris::
	$(MAKE) unzip CF="$(CF) -I/usr/include/bsd -DBSD"\
	 LF="-lbsd $(LF)"

rs6000::
	$(MAKE) unzip CF="$(CF) -DBSD -D_BSD -DUNIX" LF="-lbsd $(LF)"

sco_dos::	# uncomment zipinfo in UNZIPS if desired
	$(MAKE) unzips CF="-O $(LOC) -DNO_ERRNO -dos -M0" LF="-dos -F 2000"\
	 LF2="-o unzip.exe" ZL="-dos" ZL2="-o zipinfo.exe"

sco_x286::
	$(MAKE) unzip CF="$(CF) -Ml2" LF="$(LF) -Ml2"

sequent::	# Sequent w/Dynix
	$(MAKE) unzip CF="$(CF) -DBSD -DZMEM"

sysv6300::
	$(MAKE) unzip CF="$(CF) -Ml -DTERMIO" LF="$(LF) -Ml"

wombat::		# Wombat 68000 (or whatever)
	@echo
	@echo  '	Ha ha!  Just kidding.'
	@echo

zipinfo$O::	zipinfo.c unzip.h
	$(CC) -c $(CF) zipinfo.c

misc_$O::	misc.c unzip.h
	$(LN) misc.c misc_.c
	$(CC) -c $(CF) $(ZC) misc_.c
	$(RM) misc_.c

os2zinfo$O::	os2unzip.c unzip.h
	$(LN) os2unzip.c os2zinfo.c
	$(CC) -c $(CF) $(ZC) os2zinfo.c
	$(RM) os2zinfo.c

zipinfo$E::	$(OBJZ)
	$(LD) $(ZL) $(OBJZ) $(ZL2)

zi_gcc::			# GNU gcc under Unix (if no strip, don't worry)
	$(MAKE) zipinfo CC=gcc LD=gcc ZL2=""
	strip zipinfo

zi_indigo::		# SGI Iris Indigo
	$(MAKE) zipinfo CF="-cckr -O -DUNIX $(LOC)"

zi_dos::			# MSC 6.0 + nmake, MS-DOS
	$(MAKE) zipinfo.exe CF="-Oait -Gs -nologo $(LOC)" CC=cl\
	 LD=link E=.exe O=.obj ZL="/noi /nol" ZL2=",zipinfo;"\
	 LN="copy" RM="DEL"

funzip$E::	$(OBJF)
	$(LD) $(FL) $(OBJF) $(FL2)

fu_gcc::			# GNU gcc under Unix (if no strip, don't worry)
	$(MAKE) funzip CC=gcc LD=gcc FL2=""
	strip funzip

Makefile:: Imakefile
	-rm -f Makefile.bak
	-mv Makefile Makefile.bak
	imake -I. -TImakefile -f /dev/null

Makefile:: $(ICONFIGFILE)
	-@if [ -f Makefile ]; then \
        	echo "  $(RM) Makefile.bak; mv Makefile Makefile.bak"; \
		$(RM) Makefile.bak; mv Makefile Makefile.bak; \
        else exit 0; fi
	$(IMAKE) $(IPROJ) $(IFLAGS) -DNEWTOP=$(TOP) -DNEWCWD=$(CWD)

XMakefile::
	-@if [ -f Makefile ]; then \
        	echo "  $(RM) Makefile.bak; mv Makefile Makefile.bak"; \
		$(RM) Makefile.bak; mv Makefile Makefile.bak; \
        else exit 0; fi
	$(IMAKE) $(XIFLAGS)

clean::
	rm -f *~ *.o *.a core a.out

Makefiles::

###########################################################################
# dependencies generated by makedepend

