diff --git a/.merlin b/.merlin index b8ebba63..41fcbc10 100644 --- a/.merlin +++ b/.merlin @@ -4,3 +4,5 @@ B _build B _build/tests PKG oUnit PKG bench +PKG threads +PKG threads.posix diff --git a/Makefile b/Makefile index a1a667d8..9135e4f4 100644 --- a/Makefile +++ b/Makefile @@ -3,13 +3,22 @@ INTERFACE_FILES = $(shell find -name '*.mli') IMPLEMENTATION_FILES = $(shell find -name '*.ml') TARGETS_LIB = containers.cmxa containers.cma +TARGET_THREAD_LIB = thread_containers.cmxa thread_containers.cma OPTIONS = -use-ocamlfind -all: +all: lib + +# like lib, but with thread-specific modules +all_thread: lib lib_thread + +lib: ocamlbuild $(OPTIONS) $(TARGETS_LIB) +lib_thread: + ocamlbuild $(OPTIONS) $(TARGETS_LIB) $(TARGET_THREAD_LIB) + tests: - ocamlbuild $(OPTIONS) -package oUnit -I . tests/run_tests.native + ocamlbuild $(OPTIONS) -thread -package oUnit -I . tests/run_tests.native bench: ocamlbuild $(OPTIONS) -package bench -package unix -I . tests/benchs.native @@ -20,5 +29,5 @@ clean: tags: otags *.ml *.mli -.PHONY: all clean tests tags +.PHONY: all all_thread clean tests tags diff --git a/_tags b/_tags index e69de29b..8db6492b 100644 --- a/_tags +++ b/_tags @@ -0,0 +1 @@ +: thread diff --git a/thread_containers.mllib b/thread_containers.mllib new file mode 100644 index 00000000..12ece353 --- /dev/null +++ b/thread_containers.mllib @@ -0,0 +1 @@ +Futures