#$Id: smakefile,v 1.5 1993/10/01 22:32:43 Vic rel $
#$Log: smakefile,v $
# Revision 1.5  1993/10/01  22:32:43  Vic
# Added   - dependency for munglist (munge.o) which I'd forgotten
#
# Revision 1.4  1993/10/01  22:17:46  Vic
# Changed - flags for the linker and compiler (to try to make them 'common')
#         - mungwall production method to NOT require (nor generate) a
#           mungwall.par.c file.
#         - dependency lists to make them a more 'secure'
# Added   - mungwall.debug file (if you're making mungwall) that has debug line
#           number and source information (the time penalty is small)
#         - mungwalltest and munglist as targets
#         - and 'all' dummy target to make mungwall, mungwalltest, and munglist
#
# Revision 1.3  1993/09/30  20:36:53  Vic
# Changed - a bunch of leading ' ' to '\t'
#         - the comment character (used the RCS command)
# Moved   - the smakefile dependency to the .o files (where it belongs)
#
# Revision 1.2  1993/09/30  20:15:06  Vic
# Changed - name of file to smakefile
#         - options from 5.x to 6.x for compiler and linker
# Deleted - requirement for existence of a mungwall.par.c file
# Added   - smakefile to the dependency lists of the source files
#         - RCS information to beginning of file
#
HDRS=

MYLIBS= LIB:debug.lib LIB:ddebug.lib

LOCAL = h:srcc/mungwall
#REMOTE = AUGC:src/mungwall

CC = sc
ASM = hx68

OFILES  =	mstartup.o mungwall.o hunkomatic.o
OFILESP =	mstartup.o mungwall.par.o hunkomatic.o
CFILES	=	mungwall.c
AFILES  =	mstartup.asm


LFLAGSD = SMALLCODE SMALLDATA BATCH NOICONS
LFLAGS  = $(LFLAGSD) NODEBUG

CFLAGC  = NMINC STRMERGE STREQ NOSTKCHK
CFLAGS  = DATA=FAR $(CFLAGC) DEBUG=S OPTSIZE OPTIMIZE DEFINE=AMIGA DEFINE=amiga uchar
AFLAGS = -i INCLUDE:

.SUFFIXES:
.SUFFIXES:	.o .c .h .asm .i

mungwall:	$(OFILES)

	echo "making serial version"
	slink FROM $(OFILES) \
	LIB lib:amiga.lib lib:scnb.lib $(MYLIBS) \
	VERBOSE \
	TO mungwall.debug ${LFLAGSD} ADDSYM
	slink FROM mungwall.debug to mungwall ${LFLAGS}

	echo "making parallel version"
	$(CC) $(CFLAGS) DEFINE=PARALLEL OBJECTNAME=mungwall.par.o mungwall.c
	slink FROM $(OFILESP) \
	LIB lib:amiga.lib lib:scnb.lib $(MYLIBS) \
	VERBOSE \
	TO mungwall.par ${LFLAGS}

mungwalltest: mungwalltest.o
	slink FROM LIB:c.o,mungwalltest.o BATCH NOICONS TO mungwalltest NOICONS LIBRARY LIB:SC.lib,LIB:Amiga.lib

mungwalltest.o: mungwalltest.c smakefile
	$(CC) $(CFLAGC) $(CCFLAGS) DATA=FAR SAVEDS IGNORE=73 mungwalltest.c

munglist: munglist.c munge.o smakefile
	$(CC) $(CFLAGC) $(CCFLAGS) DATA=NEAR IGNORE=73 munglist.c
	slink FROM LIB:c.o,munglist.o,munge.o BATCH NOICONS TO munglist LIBRARY LIB:SC.lib,LIB:Amiga.lib,LIB:debug.lib

all: mungwall mungwalltest munglist

.c.o:
	$(CC) $(CFLAGS) $*.c
.asm.o:
	$(ASM) -a $*.asm $(AFLAGS) -o$*.o -cRQ

mungwall.o:   	mungwall.c mungwall_rev.h smakefile
mstartup.o: 	mstartup.asm  smakefile
hunkomatic.o:	hunkomatic.asm smakefile

version:
	@bumprev 37 mungwall_rev

