From: Siraaj Khandkar Date: Mon, 16 Apr 2018 17:19:11 +0000 (-0400) Subject: Make a basic Makefile for a small OCaml program X-Git-Url: https://git.xandkar.net/?a=commitdiff_plain;h=e6273b7a7190179063077be80b6616992d557ad2;p=tiger.ml.git Make a basic Makefile for a small OCaml program --- diff --git a/exercises/ch01/Makefile b/exercises/ch01/Makefile new file mode 100644 index 0000000..65c4991 --- /dev/null +++ b/exercises/ch01/Makefile @@ -0,0 +1,20 @@ +MAKEFLAGS := --no-builtin-rules + +OCAMLC_OPTIONS := -w A -warn-error A +OCAMLC_BYTE := ocamlc.opt $(OCAMLC_OPTIONS) + +.PHONY: build clean + +build : straight_line_program_interpreter + +%: %.ml %.cmo %.cmi + $(OCAMLC_BYTE) -o $@ $*.cmo + +%.cmi: %.mli + $(OCAMLC_BYTE) -o $@ -c $< + +%.cmo: %.ml %.cmi + $(OCAMLC_BYTE) -c $< + +clean: + rm -f straight_line_program_interpreter diff --git a/exercises/ch01/straight_line_program_interpreter.ml b/exercises/ch01/straight_line_program_interpreter.ml new file mode 100644 index 0000000..e69de29 diff --git a/exercises/ch01/straight_line_program_interpreter.mli b/exercises/ch01/straight_line_program_interpreter.mli new file mode 100644 index 0000000..e69de29