-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathmakefile
57 lines (45 loc) · 1.13 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
VERSION:= $(shell python -c "from src import version; print(version.VERSION) ")
.PHONY: build
build: dist/chess-$(VERSION).exe dist/chess.exe
-
# FLAGS+= -F
# FLAGS+= -w
FLAGS+= --name chess-$(VERSION)
dist/chess-$(VERSION).exe: src/main.py
pyinstaller $< -i src/images/favicon.ico \
--add-data 'src/images;images' \
--add-data 'src/engines;engines' \
--add-data 'src/audios;audios' \
$(FLAGS)
python -c "from src import version; version.increase();"
dist/chess.exe: dist/chess-$(VERSION).exe
# cp $< $@
-
.PHONY: debug
debug: dist/chess-$(VERSION)-debug.exe
-
dist/chess-$(VERSION)-debug.exe: src/main.py
pyinstaller $< -i src/images/favicon.ico \
--add-data 'src/images;images' \
--add-data 'src/engines;engines' \
--add-data 'src/audios;audios' \
-F --name chess-$(VERSION)-debug
cp $@ dist/chess.exe
.PHONY: main
main: ui
python src/main.py
src/ui/%.py: src/ui/%.ui
PySide6-uic $< -o $@
UI+= src/ui/settings.py
UI+= src/ui/method.py
.PHONY:ui
ui: $(UI)
.PHONY: clean
clean:
rm -rf build/*/*
rm -rf build/*
rm -rf build
rm -rf *.spec
rm -rf .qt_for_python/*/*
rm -rf .qt_for_python/*
rm -rf .qt_for_python