-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
40 lines (32 loc) · 976 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
ifeq ($(OS),Windows_NT)
CC=python
else
CC=sudo python3
endif
PFLAGS=-3.8-64
TARGET?=src/main
SOURCES:=$(wildcard src/*.py)
.PHONY: all check clean
all:
$(CC) $(TARGET).py
check:
python -m py_compile $(SOURCES)
docker:
docker build -t threat_needle:latest .
docker run --network host -ti threat_needle
dockerclean:
docker system prune -a
clean:
ifeq ($(OS),Windows_NT)
@powershell "(Get-ChildItem * -Include *.pyc -Recurse | Remove-Item)"
@powershell "(Get-ChildItem * -Include *.cap -Recurse | Remove-Item)"
@powershell "(Get-Item ./.cache/* -exclude placeholder | Remove-Item -Recurse)"
@echo Cleaned up .pyc, .cap files and .cache files
else
@echo "Cleaning up [.pyc, .cap, .cache, carved] files..."
@sudo find . -type f -name "*.pyc" -delete
@sudo find . -type f -name "*.cap" -delete
@sudo find ./.cache/* -type f,d -not -name 'placeholder' -delete
@sudo find ./carved/* -type f,d -not -name 'placeholder' -delete
@echo "Cleaning complete!"
endif