# Makefile for global data tools and demos


TOOLS = /sys/gd/gdrw.00 /sys/gd/gdconst.00 /sys/gd/cleanup.00 /sys/gd/makename.00 /sys/gd/gdfree.00

DEMO = /demo/gd/constdata.00 /demo/gd/rwdata.00 /demo/gd/test.00 /demo/gd/update.00 /demo/gd/test.scr

GDINC = /lang/asm/include/gd.inc

DOCS = /sys/gd/api.html /lang/asm/include/gd.html

default: gdinc tools demo docs

gdinc: gd.inc
	cp gd.inc $(GDINC)

tools: gd.asm
	asm gd.asm
	dfa -zpwq $(TOOLS)

demo: test.asm
	asm test.asm
	cp test.scr /demo/gd/test.scr

docs: gd.html api.html
	cp api.html /sys/gd/api.html
	cp gd.html /lang/asm/include/gd.html

check: $(TOOLS) $(DEMO)
	cd / ; dfa -d $(TOOLS) $(DEMO)

clean:
	-rm -f $(TOOLS)
	-rm -f $(DEMO)

cleanall: clean
	-rm -f $(GDINC)
	-rm -f $(DOCS)
	-rmdir /demo/gd/
	-rmdir /sys/gd/
