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(bytes , bytes label)
30 OUnitTest(abc , bytes abc label)
31 OUnitTest(revList , revList)
32 OUnitTest(cpool , cpool revList)
33 OUnitTest(asm , bytes asm cpool revList)
37 .DEFAULT: $(MyOCamlPackage $(PROGRAM), $(FILES))
38 write.h: gen_inst$(EXE) instruction.txt
39 ./gen_inst$(EXE) -writer < instruction.txt > $@
41 type.h: gen_inst$(EXE) instruction.txt
42 ./gen_inst$(EXE) -type < instruction.txt > $@
44 write_type.h: gen_typemap$(EXE)
45 ./gen_typemap$(EXE) -writer > $@
47 .SCANNER: instruction.ml : instruction.mlp
48 grep "#include \"" $< | sed 's/.*"\(.*\)".*/'$@': \1/'
51 ocaml-clean opcode.h match_body.h instruction.ml gen_inst$(EXE) gen_typemap$(EXE)