ocaml-standard-library/lib/makefile

42 lines
1.4 KiB
Makefile
Raw Normal View History

COMPILER = ocamlopt
EXT = .cmx
AEXT = .cmxa
STANDARD_FLAGS = -nopervasives -O3
STANDARD_COMPILE = $(COMPILER) $(STANDARD_FLAGS) -c
STANDARD_COMPILE_WITH_C = $(COMPILER) -ccopt -fPIC -c
2022-01-20 09:07:42 +00:00
LIB_NAME = library
2022-01-05 06:51:48 +00:00
COMPILED_FILES = general$(EXT) fatal$(EXT) int$(EXT) float$(EXT) option$(EXT) stack$(EXT) list$(EXT) map$(EXT) queue$(EXT) set$(EXT) tree$(EXT) string$(EXT) char$(EXT) bool$(EXT) console$(EXT) file$(EXT)
C_LIBS_FOR_LINKING = -cclib -lconsole_external -cclib -lfile_external
2022-01-20 09:07:42 +00:00
build:
make clean
2021-12-16 10:01:08 +00:00
$(COMPILER) $(STANDARD_FLAGS) -c general.mli general.ml
2021-12-16 10:01:08 +00:00
$(STANDARD_COMPILE) fatal.mli fatal.ml
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
2022-01-20 09:07:42 +00:00
$(STANDARD_COMPILE) char.mli char.ml
$(STANDARD_COMPILE) bool.mli bool.ml
$(STANDARD_COMPILE_WITH_C) console_external.c console.mli console.ml
ocamlmklib console_external.o -o console_external
$(STANDARD_COMPILE_WITH_C) file_external.c file.mli file.ml
ocamlmklib file_external.o -o file_external
$(STANDARD_COMPILE) array.mli array.ml
2022-01-20 09:07:42 +00:00
$(COMPILER) -a $(C_LIBS_FOR_LINKING) $(COMPILED_FILES) -o library.cmxa
2021-12-16 10:01:08 +00:00
clean:
rm -f *.o *.a *.s *.so *.cmi *.cmx *.cmxa *.cmo *.cma