-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
64 lines (47 loc) · 1.23 KB
/
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
SHELL := /bin/sh
include config.mk
.PHONY: all mash core c dotnet java dotnet-bindings java-bindings rust-examples c-examples dotnet-examples java-examples lint clean
.DEFAULT: all
all: core c dotnet java
mash: clean core c dotnet java
core:
@echo ""
@echo Building Mothra core
cargo build $(BUILD_MODE) --target-dir=$(OUT_DIR)
ln -sf $(OUT_DIR)/$(TARGET_NAME)/libmothra.$(EXT) $(OUT_DIR)/
ln -sf $(OUT_DIR)/$(TARGET_NAME)/rust-example $(OUT_DIR)/
c: c-examples
dotnet: dotnet-examples
java: java-examples
dotnet-bindings: core
@echo ""
@echo Building .Net bindings
cd $(DBIND_DIR) && make $@
java-bindings: core
@echo ""
@echo Building Java bindings
cd $(JBIND_DIR) && make $@
rust-examples:
@echo ""
@echo Building Rust examples
cd $(REXAMPLES_DIR) && cargo build $(BUILD_MODE) --target-dir=$(OUT_DIR)
c-examples: core
@echo ""
@echo Building C examples
cd $(CEXAMPLES_DIR) && make $@
dotnet-examples: dotnet-bindings
@echo ""
@echo Building .Net examples
cd $(DEXAMPLES_DIR) && make $@
java-examples: java-bindings
@echo ""
@echo Building Java examples
cd $(JEXAMPLES_DIR) && make $@
lint:
cargo fmt
cargo clippy
clean:
rm -rf $(COUT_DIR)
rm -rf $(DOUT_DIR)
rm -rf $(JOUT_DIR)
rm -rf $(OUT_DIR)/$(TARGET_NAME)