-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
42 lines (33 loc) · 852 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
ifeq ($(OS),Windows_NT)
CC=python
else
CC=python3
endif
PFLAGS=-3.8-64
TARGET?=src/main
SERVER?=src/server
CHECK?=src/test
SOURCES = $(shell find src/ -type f -name '*.py')
.PHONY: all check docker dockerclean clean server
all:
$(CC) $(TARGET).py
server:
$(CC) $(SERVER).py
check:
python -m py_compile $(SOURCES)
python $(CHECK).py
docker:
docker build -t desmali:latest .
docker run -ti -p 6969:6969/tcp desmali
dockerclean:
docker system prune -a
clean:
ifeq ($(OS),Windows_NT)
@powershell "(Get-ChildItem * -Include *.pyc -Recurse | Remove-Item)"
@echo Cleaned up .pyc, .cap files and .cache files
else
@echo "Cleaning up [.pyc, __pycache__, .tmp/, junk apk] files..."
@find . -type d -name "__pycache__" -exec rm -rf {} +
@find . -type f -name "*.pyc" -delete
@find ./.tmp/* -type f,d -not -name 'placeholder' -delete
endif