#
#       Makefile for Hack-attack 1.3
#       VAX 11/780 BSD4.2 "ARC" utility
#
# Originals from Dan Lanciani, James Turner, and others...
#
# Modified to support squashing, also added targets for the time routine
# library.  -- Howard Chu, hyc@umix.cc.umich.edu, 4-11-88
#
# Modified again by John Gilmore & Howard Chu, July 1988.
#
# I put SRCDIR on a real disk on the ST, but copy the makefile to a
# RAMdisk and compile from there. Makes things go a bit quicker...
# This has to be done in the shell, to get the trailing backslash
# specified correctly. e.g., setenv SRCDIR='d:\src\arc\'
SRCDIR = 

HEADER = $(SRCDIR)arc.h $(SRCDIR)arcs.h

# Add a ".TTP" suffix to the executable files on an ST.
#PROG = .ttp
PROG =

# TWSLIB is only needed on Unix systems. Likewise for TWHEAD.
#TWSLIB =
#TWHEAD =
TWSLIB = libtws.a
TWHEAD = tws.h

# For MWC 3.0 on the Atari ST, use:
#CFLAGS = -VCOMPAC -VPEEP
CFLAGS = -O

OBJS = arc.o arcadd.o arccode.o arccvt.o arcdata.o arcdel.o arcdos.o \
arcext.o arcio.o arclst.o arclzw.o arcmatch.o arcpack.o arcrun.o \
arcsq.o arcsqs.o arcsvc.o arctst.o arcunp.o arcusq.o arcmisc.o

MOBJ = marc.o arcdata.o arcdos.o arcio.o arcmatch.o arcmisc.o

arc$(PROG):	$(OBJS) $(TWSLIB)
	$(CC) -o arc$(PROG) $(OBJS) $(TWSLIB)

marc$(PROG):	$(MOBJ) $(TWSLIB)
	$(CC) -o marc$(PROG) $(MOBJ) $(TWSLIB)

clean:
	-rm *.o arc$(PROG) marc$(PROG) $(TWSLIB)

arc.o:	$(SRCDIR)arc.c	$(HEADER)
	$(CC) $(CFLAGS) -c $(SRCDIR)arc.c
marc.o:	$(SRCDIR)marc.c	$(HEADER)
	$(CC) $(CFLAGS) -c $(SRCDIR)marc.c
arcadd.o:	$(SRCDIR)arcadd.c	$(HEADER)
	$(CC) $(CFLAGS) -c $(SRCDIR)arcadd.c
arccode.o:	$(SRCDIR)arccode.c	$(HEADER)
	$(CC) $(CFLAGS) -c $(SRCDIR)arccode.c
arccvt.o:	$(SRCDIR)arccvt.c	$(HEADER)
	$(CC) $(CFLAGS) -c $(SRCDIR)arccvt.c
arcdata.o:	$(SRCDIR)arcdata.c	$(HEADER)
	$(CC) $(CFLAGS) -c $(SRCDIR)arcdata.c
arcdel.o:	$(SRCDIR)arcdel.c	$(HEADER)
	$(CC) $(CFLAGS) -c $(SRCDIR)arcdel.c
arcdir.o:	$(SRCDIR)arcdir.c	$(HEADER)
	$(CC) $(CFLAGS) -c $(SRCDIR)arcdir.c
arcdos.o:	$(SRCDIR)arcdos.c	$(HEADER) $(TWHEAD)
	$(CC) $(CFLAGS) -c $(SRCDIR)arcdos.c
arcext.o:	$(SRCDIR)arcext.c	$(HEADER)
	$(CC) $(CFLAGS) -c $(SRCDIR)arcext.c
arcio.o:	$(SRCDIR)arcio.c	$(HEADER)
	$(CC) $(CFLAGS) -c $(SRCDIR)arcio.c
arclst.o:	$(SRCDIR)arclst.c	$(HEADER)
	$(CC) $(CFLAGS) -c $(SRCDIR)arclst.c
arclzw.o:	$(SRCDIR)arclzw.c	$(HEADER)
	$(CC) $(CFLAGS) -c $(SRCDIR)arclzw.c
arcmatch.o:	$(SRCDIR)arcmatch.c	$(HEADER)
	$(CC) $(CFLAGS) -c $(SRCDIR)arcmatch.c
arcmisc.o:	$(SRCDIR)arcmisc.c	$(HEADER)
	$(CC) $(CFLAGS) -c $(SRCDIR)arcmisc.c
arcpack.o:	$(SRCDIR)arcpack.c	$(HEADER)
	$(CC) $(CFLAGS) -c $(SRCDIR)arcpack.c
arcrun.o:	$(SRCDIR)arcrun.c	$(HEADER)
	$(CC) $(CFLAGS) -c $(SRCDIR)arcrun.c
arcsq.o:	$(SRCDIR)arcsq.c	$(HEADER)
	$(CC) $(CFLAGS) -c $(SRCDIR)arcsq.c
arcsqs.o:	$(SRCDIR)arcsqs.c	$(HEADER)
	$(CC) $(CFLAGS) -c $(SRCDIR)arcsqs.c
arcsvc.o:	$(SRCDIR)arcsvc.c	$(HEADER)
	$(CC) $(CFLAGS) -c $(SRCDIR)arcsvc.c
arctst.o:	$(SRCDIR)arctst.c	$(HEADER)
	$(CC) $(CFLAGS) -c $(SRCDIR)arctst.c
arcunp.o:	$(SRCDIR)arcunp.c	$(HEADER)
	$(CC) $(CFLAGS) -c $(SRCDIR)arcunp.c
arcusq.o:	$(SRCDIR)arcusq.c	$(HEADER)
	$(CC) $(CFLAGS) -c $(SRCDIR)arcusq.c

libtws.a:
	make -f Make.tws libtws.a
