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
>
blob: 9387c5fa9e98b55a88b9226074f8307ecff4ba45 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
(executable
(name tengwar)
(libraries
brr
brr.note
application
translator
sounds
)
(modes js)
(preprocess (pps js_of_ocaml-ppx))
(link_flags (:standard -no-check-prims))
)
(rule
(targets tengwar.js)
(deps tengwar.bc.js)
(action (copy %{deps} %{targets})))
|