12 SRCS=Errors.ml Cabs.ml Cabshelper.ml Parse_aux.ml Parser.ml Lexer.ml \
14 Env.ml Cprint.ml Cutil.ml Ceval.ml \
15 Builtins.ml GCC.ml CBuiltins.ml \
16 Cleanup.ml Elab.ml Rename.ml \
18 Unblock.ml SimplExpr.ml AddCasts.ml StructByValue.ml StructAssign.ml \
23 BOBJS=$(SRCS:.ml=.cmo)
24 NOBJS=$(SRCS:.ml=.cmx)
25 IOBJS=$(INTFS:.mli=.cmi)
26 NATIVETARGETS=$(shell if `which ocamlopt`; \
27 then echo "cparser.cmxa cparser cparser.a libcparser.a dllcparser.so"; fi)
29 all: $(NATIVETARGETS) cparser.cma cparser.byte
33 cp -p Cparser.cmi cparser.cma $(NATIVETARGETS) $(LIBDIR)
35 cparser: $(COBJS) $(NOBJS) Main.cmx
36 $(OCAMLOPT) -o cparser $(COBJS) $(NOBJS) Main.cmx
38 cparser.byte: $(COBJS) $(BOBJS) Main.cmo
39 $(OCAMLC) -custom -o cparser.byte $(COBJS) $(BOBJS) Main.cmo
41 cparser.cma libcparser.a: uint64.o Cparser.cmo
42 $(OCAMLMKLIB) -o cparser uint64.o Cparser.cmo
44 cparser.cmxa: uint64.o Cparser.cmx
45 $(OCAMLMKLIB) -o cparser uint64.o Cparser.cmx
47 Cparser.cmo Cparser.cmi: $(IOBJS) $(BOBJS)
48 $(OCAMLC) -pack -o Cparser.cmo $(IOBJS) $(BOBJS)
50 Cparser.cmx: $(IOBJS) $(NOBJS)
51 $(OCAMLOPT) -pack -o Cparser.cmx $(IOBJS) $(NOBJS)
53 Parser.ml Parser.mli: Parser.mly
54 $(OCAMLYACC) Parser.mly
57 rm -f Parser.ml Parser.mli Parser.output
59 beforedepend:: Parser.ml Parser.mli
67 beforedepend:: Lexer.ml
69 .SUFFIXES: .ml .mli .cmi .cmo .cmx
76 $(OCAMLOPT) -c -for-pack Cparser $*.ml
81 rm -f *.cm? *.o *.so *.a *.cmxa *.byte cparser
84 $(OCAMLDEP) *.mli *.ml > .depend