# Copyright:	Public domain.
# Filename:	Makefile
# Purpose:	Makefile for Artemis build 072.
#		(The source code for the Command Module's (CM)
#		Apollo Guidance Computer (AGC), for Apollo 15-17
# Contact:	Ron Burkey <info@sandroid.org>.
# Mod history:	2005-07-06 RSB.	Began.

PROJECT:=Artemis072

ifndef PREFIX
PREFIX=/usr/local
endif

SOURCE:=$(wildcard *.s)
TARGETS=${PROJECT}.bin ${PROJECT}.lst

default: $(TARGETS)

clean:
	-rm *.lst *~ *.bin
	
install: default
	cp ${PROJECT}.bin ${PREFIX}/bin
	chmod ugo+r ${PREFIX}/bin/${PROJECT}.bin
	
# Implicit rules.

%.bin: %.binsource
	@echo ========================================================================
	@echo Artemis072 is under development, and all errors in it should be ignored.
	../Luminary131/Oct2Bin <$^
	mv Oct2Bin.bin $@

%.lst: %.bin ${SOURCE}
	../yaYUL/yaYUL MAIN.s >$@
	diff -s MAIN.s.bin $^
		

