# $Rev: 912 $ $LastChangedDate: 2002-09-08 01:34:10 +0200 (Sun, 08 Sep 2002) $

GONTC = ../compiler/gontc
GFLAGS = -C -B ../stage0/ -g $(OPT)

all: test

.SECONDARY: test.xgi

test.g:
	cp template/test.g .

test.gi:
	cp template/test.gi .

%.xgi: %.gi $(GONTC)
	$(GONTC) $(GFLAGS) -c $<

%.xgo %.o: %.g %.xgi $(GONTC)
	$(GONTC) $(GFLAGS) -c $<

test: test.xgo
	$(GONTC) $(GFLAGS) -o $@ $^

clean:
	rm -f *.o *.xgo *.xgi *.ksi test core test.s

nuke: clean
	rm -f test.g test.gi
