# makefile for CVL library and VCODE interpreter

# The targets for the make are serial, cray and cm.  These will first make
# a version of the cvl library.  Then the vcode interpreter will be made.
# The vcode interpreter (vinterp) will be in the file vinterp/vinterp.
# After making the interpreter, make test will run the interpreter on
# test VCODE program that tests most of the language's functionality.

# define your favorite C compiler
SERIAL_CC = cc
CRAY_CC = cc
CM_CC = cc

serial:	
	cd cvl/serial && make
	cd vinterp && make CC=$(SERIAL_CC) CVLLIB=../cvl/serial CVLINCLUDE=../cvl/serial

cray:
	cd cvl/cray && make
	cd vinterp && make CC=$(CRAY_CC) CVLLIB=../cvl/cray CVLINCLUDE=../cvl/cray

cm:	
	cd cvl/cm && make
	cd vinterp && make CC=$(CM_CC) CVLLIB=../cvl/cm CVLINCLUDE=../cvl/cm CVLDEFS=-DCM2 CVLEXTRA=-lparis

test:	vinterp/vinterp vinterp/Test.v
	@echo -n This should produce a list of functions and the value (0)
	vinterp/vinterp vinterp/Test.v

clean:
	cd vinterp && make clean
	cd cvl/serial && make clean
	cd cvl/cm && make clean
	cd cvl/cray && make clean
	rm vcode.tar.Z

tar:	clean
	tar cvhf vcode.tar Makefile vinterp cvl doc
	compress -v vcode.tar
