# Makefile to build the CRISP compiled macros.
#
# This makefile installs the macros into the ../../macros directory.
#
SHELL	=/bin/sh
CRUNCH 	= ../../crunch/crunch
ROOT	= ../../macros
M	= $(ROOT)
MKBD	= $(M)/kbd
MTTY	= $(M)/tty

all:	$(M) $(MKBD) $(MTTY) macros

$(M):
	-mkdir ../../macros 2>/dev/null
$(M)/kbd:
	-mkdir ../../macros/kbd 2>/dev/null
$(M)/tty:
	-mkdir ../../macros/tty 2>/dev/null
dos:
	$(MAKE) SHELL=cmd ROOT=/fox/crisp/macros macros

macros:
	$(CRUNCH) -m -o $(ROOT) *.cr
	$(CRUNCH) -I../.. -m -o $(ROOT) kbd/*.cr
	$(CRUNCH) -m -o $(ROOT) tty/*.cr

clean:
	-rm -f core mon.out crisp.log
	-rm -f *.cm 
	-rm -f *.m 
