ocaml-standard-library/lib/makefile

26 lines
1012 B
Makefile
Raw Normal View History

2022-01-05 06:51:48 +00:00
STANDARD_FLAGS = -S -O3
STANDARD_COMPILE = ocamlopt $(STANDARD_FLAGS) -nopervasives -c
# compiles the entire custom standard library
compile:
2021-12-16 10:01:08 +00:00
# fromStdlib manages things that need to be exposed from the standard library
2022-01-05 06:51:48 +00:00
ocamlopt $(STANDARD_FLAGS) -c fromStdlib.mli fromStdlib.ml
2021-12-16 10:01:08 +00:00
2021-12-18 21:08:10 +00:00
# exposed types and functions, that can be opened module wide
2022-01-05 06:51:48 +00:00
ocamlopt $(STANDARD_FLAGS) -nopervasives -c exposed.mli exposed.ml
2021-12-16 10:01:08 +00:00
# the following files make up the core custom standard library code
2022-01-05 06:51:48 +00:00
$(STANDARD_COMPILE) int.mli int.ml
$(STANDARD_COMPILE) float.mli float.ml
$(STANDARD_COMPILE) option.mli option.ml
$(STANDARD_COMPILE) stack.mli stack.ml
$(STANDARD_COMPILE) list.mli list.ml
$(STANDARD_COMPILE) map.mli map.ml
$(STANDARD_COMPILE) queue.mli queue.ml
$(STANDARD_COMPILE) set.mli set.ml
$(STANDARD_COMPILE) tree.mli tree.ml
$(STANDARD_COMPILE) string.mli string.ml
2021-12-16 10:01:08 +00:00
# clean removes all except source files. autogenerated mli files are also removed.
clean:
2022-01-05 06:51:48 +00:00
rm -f *.o *.a *.s *.cmi *.cmx *.cmxa *.cmo *.cma