-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
36 lines (28 loc) · 866 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# configure shared library options and native binary names
# defaults for Linux
SOEXT=so
OS := $(strip $(shell uname -s | tr '[:upper:]' '[:lower:]'))
# Default value of $OS on Windows is Windows_NT
ifneq ($(findstring cygwin, $(OS)),)
SOEXT=dll
endif
ifeq ($(OS), Windows_NT)
SOEXT=dll
endif
ifeq ($(OS), darwin)
SOEXT=dylib
endif
default: ext/librheaffi.$(SOEXT)
ext/librheaffi.$(SOEXT): src/rhea_ffi.cpp
mkdir -p ext
git subtree pull -P rhea https://github.com/Nocte-/rhea.git master || test -d rhea/rhea
cp $^ rhea/rhea/
mkdir -p rhea/build && cd rhea/build && cmake .. && make rhea
cp -L rhea/build/rhea/librhea.$(SOEXT) ext/librhea.$(SOEXT)
clean:
rm -f rhea/rhea/rhea_ffi.cpp
rm -rf rhea/build
rm -rf ext
update_rhea:
rm -f rhea/rhea/rhea_ffi.cpp
git subtree pull -P rhea https://github.com/Nocte-/rhea.git master || test -d rhea/rhea