neater build system
This commit is contained in:
14
lib/makefile
14
lib/makefile
@ -1,8 +1,8 @@
|
||||
STANDARD_FLAGS = -S -O3
|
||||
STANDARD_FLAGS = -O3
|
||||
STANDARD_COMPILE = ocamlopt $(STANDARD_FLAGS) -nopervasives -c
|
||||
LIB_NAME = library
|
||||
|
||||
# compiles the entire custom standard library
|
||||
compile:
|
||||
build:
|
||||
# fromStdlib manages things that need to be exposed from the standard library
|
||||
ocamlopt $(STANDARD_FLAGS) -c fromStdlib.mli fromStdlib.ml
|
||||
|
||||
@ -20,7 +20,11 @@ compile:
|
||||
$(STANDARD_COMPILE) set.mli set.ml
|
||||
$(STANDARD_COMPILE) tree.mli tree.ml
|
||||
$(STANDARD_COMPILE) string.mli string.ml
|
||||
$(STANDARD_COMPILE) char.mli char.ml
|
||||
$(STANDARD_COMPILE) bool.mli bool.ml
|
||||
|
||||
ocamlopt -a fromStdlib.cmx exposed.cmx int.cmx float.cmx option.cmx stack.cmx list.cmx map.cmx queue.cmx set.cmx tree.cmx string.cmx -o $(LIB_NAME).cmxa
|
||||
|
||||
# clean removes all except source files. autogenerated mli files are also removed.
|
||||
clean:
|
||||
rm -f *.o *.a *.s *.cmi *.cmx *.cmxa *.cmo *.cma
|
||||
rm -f *.o *.a *.s *.cmi *.cmx *.cmxa *.cmo *.cma
|
||||
|
Reference in New Issue
Block a user