#
#  Use "make -r" to make this file, or alias as in: 
#					set in .cmd mk=(make -r $*)
#
.SUFFIXES: .o .s .c
.s.o:
	mac $(MACFLAGS) $*.s
.c.o:
	@echo c68 -c $*.c
	@c:\compiler.dsk\cp68.prg $(CFLAGS) $*.c m:$*.i
	@c:\compiler.dsk\c068.prg m:$*.i m:$*.1 m:$*.2 m:$*.3 -f
	@rm m:$*.i
	@c:\compiler.dsk\c168.prg m:$*.1 m:$*.2 m:$*.s
	@c:\bin\mac.prg -6 -o $*.o m:$*.s
	@rm m:$*.1 m:$*.2 m:$*.s

TEMP = m:tmp
LIBS = vdibind aesbind gemlib libf

OBJS =	gemstart.o osbind.o bootstop.o ahdi.o blktst.o mymalloc.o reboot.o\
	addr.o bsl.o dsmark.o epart.o error.o fmt.o getln.o getstart.o hdx.o\
	markbad.o mediach.o part.o sect.o ship.o st.o string.o toascii.o\
	wincap.o zero.o

hdx.prg : $(OBJS)
	echo $(OBJS) $(LIBS) >$(TEMP)
	aln -s -o hdx.prg -c $(TEMP)


#
#  assembly-language files
#
ahdi.o : ahdi.s
blktst.o : blktst.s
bootstop.o : bootstop.s
gemstart.o : gemstart.s
mymalloc.o : mymalloc.s
osbind.o : osbind.s
ship.o : ship.s
reboot.o : reboot.s

#
#  C sources
#
addr.o : addr.c
bsl.o : bsl.c
toascii.o : toascii.c
dsmark.o : dsmark.c
epart.o : epart.c
error.o : error.c
fmt.o : fmt.c
getln.o : getln.c
getstart.o : getstart.c
hdx.o : hdx.c
markbad.o : markbad.c
part.o : part.c
sect.o : sect.c
st.o : st.c
string.o : string.c
wincap.o : wincap.c
zero.o : zero.c

