From e6273b7a7190179063077be80b6616992d557ad2 Mon Sep 17 00:00:00 2001 From: Siraaj Khandkar Date: Mon, 16 Apr 2018 13:19:11 -0400 Subject: [PATCH] Make a basic Makefile for a small OCaml program --- exercises/ch01/Makefile | 20 +++++++++++++++++++ .../ch01/straight_line_program_interpreter.ml | 0 .../straight_line_program_interpreter.mli | 0 3 files changed, 20 insertions(+) create mode 100644 exercises/ch01/Makefile create mode 100644 exercises/ch01/straight_line_program_interpreter.ml create mode 100644 exercises/ch01/straight_line_program_interpreter.mli 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 -- 2.20.1