X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=bindings%2Focaml%2FMakefile.ocaml;h=6008c3a083121a1b232aad13c865bc4ebd26f4e9;hp=b7f4fdec29fcdfdbfb2e08ebfbea5911583f5bf8;hb=2e855e68d861224c9b61e2bc9cecad1536b1534b;hpb=efbcebc95dc8a7936dda8ec5733b6f6d4bd62343 diff --git a/bindings/ocaml/Makefile.ocaml b/bindings/ocaml/Makefile.ocaml index b7f4fdec29f..6008c3a0831 100644 --- a/bindings/ocaml/Makefile.ocaml +++ b/bindings/ocaml/Makefile.ocaml @@ -41,13 +41,18 @@ OCAMLAFLAGS += $(patsubst %,-cclib %, \ $(filter-out -L$(LibDir),-l$(LIBRARYNAME) \ $(shell $(LLVM_CONFIG) --ldflags)) \ $(UsedLibs)) + +ifneq ($(ENABLE_OPTIMIZED),1) + OCAMLDEBUGFLAG := -g +endif -Compile.CMI := $(strip $(OCAMLC) -c $(OCAMLCFLAGS) -o) -Compile.CMO := $(strip $(OCAMLC) -c $(OCAMLCFLAGS) -o) -Archive.CMA := $(strip $(OCAMLC) -a -custom $(OCAMLAFLAGS) -o) +Compile.CMI := $(strip $(OCAMLC) -c $(OCAMLCFLAGS) $(OCAMLDEBUGFLAG) -o) +Compile.CMO := $(strip $(OCAMLC) -c $(OCAMLCFLAGS) $(OCAMLDEBUGFLAG) -o) +Archive.CMA := $(strip $(OCAMLC) -a -custom $(OCAMLAFLAGS) $(OCAMLDEBUGFLAG) \ + -o) -Compile.CMX := $(strip $(OCAMLOPT) -c $(OCAMLCFLAGS) -o) -Archive.CMXA := $(strip $(OCAMLOPT) -a $(OCAMLAFLAGS) -o) +Compile.CMX := $(strip $(OCAMLOPT) -c $(OCAMLCFLAGS) $(OCAMLDEBUGFLAG) -o) +Archive.CMXA := $(strip $(OCAMLOPT) -a $(OCAMLAFLAGS) $(OCAMLDEBUGFLAG) -o) # Source files OcamlSources1 := $(sort $(wildcard $(PROJ_SRC_DIR)/*.ml)) @@ -137,6 +142,9 @@ build-deplibs: $(OutputLibs) $(OcamlDir)/%.a: $(LibDir)/%.a $(Verb) ln -sf $< $@ +$(OcamlDir)/%.o: $(LibDir)/%.o + $(Verb) ln -sf $< $@ + clean-deplibs: $(Verb) rm -f $(OutputLibs)