-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
45 lines (37 loc) · 784 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
BDEST := CSViewer
DIST := ./dist
BIN := ./build
BSPEC := CSViewer.spec
BFLAGS := \
--clean \
--noconfirm \
--onefile \
--windowed \
--name $(BDEST) \
--distpath $(DIST) \
--workpath $(BIN)
VENV := ./venv
PYTHON := $(VENV)/bin/python3
MAIN := CSViewer.py
.PHONY: clean run build exec gen init
default: run
init:
# refrences global python3.X installation
python3 -m venv $(VENV); \
source "$(VENV)/bin/activate"; \
$(VENV)/bin/pip install --upgrade pip; \
$(VENV)/bin/pip install -r requirements.txt;
clean:
rm -rf $(BIN) \
rm -rf $(DIST)
build:
source "$(VENV)/bin/activate"; \
pyinstaller $(BFLAGS) $(BSPEC)
exec:
$(DIST)/$(BDEST)
run:
source "$(VENV)/bin/activate"; \
$(PYTHON) $(MAIN)
gen:
source "$(VENV)/bin/activate"; \
pip freeze > requirements.txt