diff options
-rw-r--r-- | bindings/ocaml/Makefile.ocaml | 9 | ||||
-rw-r--r-- | examples/OCaml-Kaleidoscope/Chapter6/Makefile | 9 | ||||
-rw-r--r-- | examples/OCaml-Kaleidoscope/Chapter7/Makefile | 9 |
3 files changed, 25 insertions, 2 deletions
diff --git a/bindings/ocaml/Makefile.ocaml b/bindings/ocaml/Makefile.ocaml index 1cff422c28..40ecc9c08e 100644 --- a/bindings/ocaml/Makefile.ocaml +++ b/bindings/ocaml/Makefile.ocaml @@ -73,8 +73,13 @@ Archive.EXE := $(strip $(OCAMLC) -cc $(CXX) $(OCAMLCFLAGS) $(OCAMLDEBUGFLAG:%=%. endif # Source files +ifndef OcamlSources1 OcamlSources1 := $(sort $(wildcard $(PROJ_SRC_DIR)/*.ml)) +endif + +ifndef OcamlHeaders1 OcamlHeaders1 := $(sort $(wildcard $(PROJ_SRC_DIR)/*.mli)) +endif OcamlSources2 := $(filter-out $(ExcludeSources),$(OcamlSources1)) OcamlHeaders2 := $(filter-out $(ExcludeHeaders),$(OcamlHeaders1)) @@ -352,11 +357,11 @@ $(OutputEXE): $(ToolEXE) $(OcamlDir)/.dir ifndef OCAMLOPT $(ToolEXE): $(ObjectsCMO) $(OcamlDir)/.dir $(Echo) "Archiving $(notdir $@) for $(BuildMode) build" - $(Verb) $(Archive.EXE) $@ $< + $(Verb) $(Archive.EXE) $@ $(ObjectsCMO) else $(ToolEXE): $(ObjectsCMX) $(OcamlDir)/.dir $(Echo) "Archiving $(notdir $@) for $(BuildMode) build" - $(Verb) $(Archive.EXE) $@ $< + $(Verb) $(Archive.EXE) $@ $(ObjectsCMX) endif endif diff --git a/examples/OCaml-Kaleidoscope/Chapter6/Makefile b/examples/OCaml-Kaleidoscope/Chapter6/Makefile index 831213863a..21f0c53df4 100644 --- a/examples/OCaml-Kaleidoscope/Chapter6/Makefile +++ b/examples/OCaml-Kaleidoscope/Chapter6/Makefile @@ -20,6 +20,15 @@ UsedOcamLibs := llvm llvm_analysis llvm_executionengine llvm_target \ OCAMLCFLAGS += -pp camlp4of +OcamlSources1 = \ + $(PROJ_SRC_DIR)/ast.ml \ + $(PROJ_SRC_DIR)/parser.ml \ + $(PROJ_SRC_DIR)/codegen.ml \ + $(PROJ_SRC_DIR)/lexer.ml \ + $(PROJ_SRC_DIR)/token.ml \ + $(PROJ_SRC_DIR)/toplevel.ml \ + $(PROJ_SRC_DIR)/toy.ml + ExcludeSources = $(PROJ_SRC_DIR)/myocamlbuild.ml include $(LEVEL)/bindings/ocaml/Makefile.ocaml diff --git a/examples/OCaml-Kaleidoscope/Chapter7/Makefile b/examples/OCaml-Kaleidoscope/Chapter7/Makefile index ddf667b0e1..99686e17ea 100644 --- a/examples/OCaml-Kaleidoscope/Chapter7/Makefile +++ b/examples/OCaml-Kaleidoscope/Chapter7/Makefile @@ -20,6 +20,15 @@ UsedOcamLibs := llvm llvm_analysis llvm_executionengine llvm_target \ OCAMLCFLAGS += -pp camlp4of +OcamlSources1 = \ + $(PROJ_SRC_DIR)/ast.ml \ + $(PROJ_SRC_DIR)/parser.ml \ + $(PROJ_SRC_DIR)/codegen.ml \ + $(PROJ_SRC_DIR)/lexer.ml \ + $(PROJ_SRC_DIR)/token.ml \ + $(PROJ_SRC_DIR)/toplevel.ml \ + $(PROJ_SRC_DIR)/toy.ml + ExcludeSources = $(PROJ_SRC_DIR)/myocamlbuild.ml include $(LEVEL)/bindings/ocaml/Makefile.ocaml |