# MAKE FILE FOR BASIC.SYSTEM and Basic.Launcher
#
# THIS MAKEFILE BUILDS:
#	BASIC.SYSTEM from Equates, Globals, Loader & Main Source Code
#		and/or
#	Basic.Launcher from BLaunch.aii & BLaunch.macros
#
# Dependency rules for BASIC.System...
#
#
# Compare BASIC.System for more recent build of Object files
# if Object files are later than BASIC than link objs together
#
BASIC.SYSTEM 	 	Loader.obj 
			Main.obj 
			Globals.obj
	LinkIIGS Loader.obj -org $2000 Main.obj Globals.obj -o BASIC.SYSTEM
	MakeBinIIGS BASIC.SYSTEM -org $2000
	Set Exit 0; Echo "FOO" | Rez -o BASIC.SYSTEM -m -c pdos -t $70FF2000  DEV:NULL; Set Exit 1
	SetFile -m . Basic.System
	if {AutoDuplicate} == 1
		DuplicateIIGS BASIC.SYSTEM -Mac -Y BASIC.SYSTEM
	End

#	
# Compare for most recent assemblies of obj files for Loader, Main and Globals
# if source is later than obj build new obj.
#
Loader.obj 	 	Loader 
			Equates
	ASMIIGS Loader -o Loader.obj
Main.obj 	 	Main 
			Equates
	ASMIIGS Main -o Main.obj
Globals.obj 	 	Globals 
			Equates
	ASMIIGS Globals -o Globals.obj

#
# These are the dependency rules for Basic.Launcher
#

Basic.Launcher		BLaunch.omf
	MakeBinIIGS BLaunch.omf -o Basic.Launcher
	# the following line sets up the filetype and auxtype correctly
	SET EXIT 0; ECHO "FOO" | rez -o Basic.Launcher -c pdos -t $70FF2000  DEV:NULL; SET EXIT 1
	SetFile -c 'pdos' -m . Basic.Launcher

BLaunch.omf		BLaunch.aii.obj
	LinkIIGS BLaunch.aii.obj -o BLaunch.omf

BLaunch.aii.obj		BLaunch.aii BLaunch.macros
	AsmIIGS BLaunch.aii -o BLaunch.aii.obj
