From ef312564ca84a2b49fc291434d8fb2f8501bb618 Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Tue, 15 Nov 2016 13:00:01 +0100 Subject: Initial commit --- stub/Makefile | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 stub/Makefile (limited to 'stub/Makefile') diff --git a/stub/Makefile b/stub/Makefile new file mode 100755 index 0000000..462ba73 --- /dev/null +++ b/stub/Makefile @@ -0,0 +1,22 @@ +LIB_STUB = $(LIB)_stub + +C_FILES = $(wildcard *.c) +OBJ_FILES = $(patsubst %.c,%.o,$(C_FILES)) + +#LINK_FLAG = $(shell pkg-config --libs $(LIB)) +LINK_FLAG= + +all: dll$(LIB_STUB).so + +%.o: %.c + ocamlc -o $@ $< + +dll$(LIB_STUB).so: $(OBJ_FILES) + ocamlmklib -I ../_build -oc $(LIB_STUB) $(LINK_FLAG) $^ + test -d ../_build || mkdir ../_build + ln -sf ../stub/dll$(LIB_STUB).so ../_build/ + ln -sf ../stub/lib$(LIB_STUB).a ../_build/ + +clean: + rm $(OBJ_FILES) *.so *.a + -- cgit v1.2.3