-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
50 lines (38 loc) · 1.44 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
EXAMPLE_BUILD_TOOL = wasmserve
.PHONY: setup example build_test test_backend test1
setup:
@echo
@echo " ----------------------------------------------------"
@echo "| Setting up... |"
@echo " ----------------------------------------------------"
@echo
go install github.com/hajimehoshi/wasmserve@latest
example:
@echo
@echo " ----------------------------------------------------"
@echo "| Running Example... |"
@echo " ----------------------------------------------------"
@echo
$(EXAMPLE_BUILD_TOOL) ./example/
build_test:
@echo
@echo " ----------------------------------------------------"
@echo "| Building $(NAME)... |"
@echo " ----------------------------------------------------"
@echo
GOOS=js GOARCH=wasm go build -o build/main.wasm tests/backend/backend.go
GOOS=js GOARCH=wasm go build -o build/main.wasm tests/test1/test1.go
test_backend:
@echo
@echo " ----------------------------------------------------"
@echo "| Building $(NAME)... |"
@echo " ----------------------------------------------------"
@echo
$(EXAMPLE_BUILD_TOOL) ./tests/backend/backend.go
test1:
@echo
@echo " ----------------------------------------------------"
@echo "| Running Test 1... |"
@echo " ----------------------------------------------------"
@echo
$(EXAMPLE_BUILD_TOOL) ./tests/test1/test1.go