-
Notifications
You must be signed in to change notification settings - Fork 30
/
Makefile
67 lines (62 loc) · 1.66 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
65
66
67
ifeq ($(OS),Windows_NT)
PLATFORM="windows"
else ifeq ($(shell uname),Darwin)
PLATFORM="macos"
else ifeq ($(shell uname),Linux)
PLATFORM="linux"
else
PLATFORM="unkonwn"
endif
build:
ifeq ($(OS),Windows_NT)
make build-windows
else
ifeq ($(shell uname),Darwin)
echo "not supported: Darwin"
exit 1
else
make build-linux
endif
endif
FLUTTER_DIR=mywords-flutter
GO_DIR=mywords-go
bin:
@mkdir -p bin
clean:
cd $(FLUTTER_DIR) && make clean
cd $(GO_DIR) && make clean
rm -rf bin/*
@echo "clean done"
build-linux:
cd $(GO_DIR) && make build-so-linux
cd $(FLUTTER_DIR) && make build-linux
mv $(FLUTTER_DIR)/bin/* ./bin/
@echo "PLATFORM: $(PLATFORM) all done, look at the directory bin/"
@echo "--------$$ ls -lha bin --------"
@ls -lha bin
build-windows:bin
cd $(GO_DIR) && make build-so-windows
cd $(FLUTTER_DIR) && make build-windows
mv $(FLUTTER_DIR)/bin/* ./bin/
@echo "PLATFORM: $(PLATFORM) all done, look at the directory bin/"
@echo "--------$$ ls -lha bin --------"
@ls -lha bin
build-android:bin
cd $(GO_DIR) && make build-so-android
cd $(FLUTTER_DIR) && make build-apk
mv $(FLUTTER_DIR)/bin/* ./bin/
@echo "PLATFORM: $(PLATFORM) all done, look at the directory bin/"
@echo "--------$$ ls -lha bin --------"
@ls -lha bin
build-web-termux: bin
cd $(GO_DIR) && make build-web-termux
@mv $(GO_DIR)/bin/* ./bin/
@echo "--------$$ ls -lha bin --------"
@ls -lha bin
build-all: build-android build-linux build-web-platform build-web-termux
@echo "PLATFORM: $(PLATFORM) all done, look at the directory bin/"
@echo "--------$$ ls -lha bin --------"
@ls -lha bin
build-web-platform:bin
cd $(GO_DIR) && make build-web-platform
@mv $(GO_DIR)/bin/* ./bin/