Make a basic Makefile for a small OCaml program
authorSiraaj Khandkar <siraaj@khandkar.net>
Mon, 16 Apr 2018 17:19:11 +0000 (13:19 -0400)
committerSiraaj Khandkar <siraaj@khandkar.net>
Mon, 16 Apr 2018 17:19:11 +0000 (13:19 -0400)
exercises/ch01/Makefile [new file with mode: 0644]
exercises/ch01/straight_line_program_interpreter.ml [new file with mode: 0644]
exercises/ch01/straight_line_program_interpreter.mli [new file with mode: 0644]

diff --git a/exercises/ch01/Makefile b/exercises/ch01/Makefile
new file mode 100644 (file)
index 0000000..65c4991
--- /dev/null
@@ -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 (file)
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 (file)
index 0000000..e69de29
This page took 0.03535 seconds and 4 git commands to generate.