16 UseCamlp4(pa_openin pa_oo)
19 OCAMLINCLUDES += $(ROOT)/base
20 OCAML_LIBS += $(ROOT)/base/base
22 OCAMLOPT = ocamlopt -for-pack $(capitalize $(basename $(PROGRAM)))
23 OCAMLOPTLINK= ocamlopt
25 OCamlProgram(gen_inst,gen_inst)
26 OCamlProgram(gen_typemap,gen_typemap)
29 OUnitTest(label , label)
30 OUnitTest(bytes , bytes label)
31 OUnitTest(lowInst , lowInst bytes)
32 OUnitTest(asm , asm label bytes)
33 #OUnitTest(revList , revList)
34 #OUnitTest(cpool , cpool revList)
35 #OUnitTest(asm , bytes asm cpool revList)
39 .DEFAULT: $(MyOCamlPackage $(PROGRAM), $(FILES))
41 write.h: gen_inst$(EXE) instruction.txt
42 ./gen_inst$(EXE) -writer < instruction.txt > $@
44 type.h: gen_inst$(EXE) instruction.txt
45 ./gen_inst$(EXE) -type < instruction.txt > $@
47 low_type.h: gen_typemap$(EXE)
48 ./gen_typemap$(EXE) -low > $@
50 high_type.h: gen_typemap$(EXE)
51 ./gen_typemap$(EXE) -high > $@
53 .SCANNER: %.ml : %.mlp
54 grep "#include \"" $< | sed 's/.*"\(.*\)".*/'$@': \1/'
57 ocaml-clean *.h lowInst.ml gen_inst$(EXE) gen_typemap$(EXE)