OBJS = ast.cmo parser.cmo scanner.cmo analyzer.cmo codegen.cmo dspjockey.cmo

TESTS = 

TARFILES = Makefile testall.sh scanner.mll parser.mly \
	ast.ml analyzer.ml codegen.ml dspjockey.ml \
	$(TESTS:%=tests/test-%.mc) \
	$(TESTS:%=tests/test-%.out)

dspjockey : $(OBJS)
	ocamlc -o dspjockey $(OBJS)

.PHONY : test
test : dspjockey testall.sh
	./testall.sh

scanner.ml : scanner.mll
	ocamllex scanner.mll

parser.ml parser.mli : parser.mly
	ocamlyacc parser.mly

%.cmo : %.ml
	ocamlc -w A -c $<

%.cmi : %.mli
	ocamlc -w A -c $<

dspjockey.tar.gz : $(TARFILES)
	cd .. && tar czf dsp_jockey.tar.gz $(TARFILES:%=microc/%)

.PHONY : clean
clean :
	rm -f dspjockey parser.ml parser.mli scanner.ml testall.log output \
	*.cmo *.cmi *.out *.diff *.cpp

# Generated by ocamldep *.ml *.mli
ast.cmo: 
ast.cmx: 
parser.cmo: ast.cmo parser.cmi 
parser.cmx: ast.cmx parser.cmi 
scanner.cmo: parser.cmi 
scanner.cmx: parser.cmx 
parser.cmi: ast.cmo
codegen.cmo: ast.cmo
codegen.cmx: ast.cmx	
analyzer.cmo: ast.cmo sast.cmo
analyzer.cmx: ast.cmx sast.cmx
