-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
56 lines (45 loc) · 961 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
DENO_DIR := $(shell deno info | grep DENO_DIR | cut -d " " -f 3)
ifeq ($(VERSION),)
URL := ""
else
URL := "--release=https://github.com/skanehira/deno-silicon/releases/download/$(VERSION)/"
endif
ifeq ($(DENO_OS),)
DENO_OS := $(shell deno eval "console.log(Deno.build.os)")
endif
ifeq ($(DENO_OS),windows)
LIB_EXT := dll
endif
ifeq ($(DENO_OS),linux)
LIB_EXT := so
endif
ifeq ($(DENO_OS),darwin)
LIB_EXT := dylib
endif
.PHONY: clean
clean:
@rm -f $(DENO_DIR)/plug/file/*.$(LIB_EXT)
.PHONY: build
build: clean
@deno_bindgen $(URL)
.PHONY: deno-test
deno-test: clean build
@deno test -A --unstable
.PHONY: ffi-test
ffi-test:
@cargo test -- --nocapture
.PHONY: test
test:
@echo "######## deno testing... ########"
@make deno-test
@echo "######## ffi testing... ########"
@make ffi-test
.PHONY: deps
deps:
@deno run -A https://deno.land/x/[email protected]/main.ts deps.ts
.PHONY: check
check:
@cargo check
.PHONY: lint
lint:
@cargo clippy