ads1_2021/code/python/Makefile

27 lines
826 B
Makefile
Raw Normal View History

2021-11-06 10:55:44 +01:00
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# LOCAL ARGUMENTS
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PATH_TO_CONFIG:=../config.yml
2021-11-06 11:02:53 +01:00
COLOUR:=true# <- auf false stellen, falls es Probleme gibt
2021-11-06 10:55:44 +01:00
ifeq ($(OS),Windows_NT)
2021-11-06 11:02:53 +01:00
PYTHON:=py -3
PIP:=py -3 -m pip
2021-11-06 10:55:44 +01:00
else
2021-11-06 11:02:53 +01:00
PYTHON:=python3
PIP:=python3 -m pip
2021-11-06 10:55:44 +01:00
endif
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# TARGETS
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2021-11-06 11:02:53 +01:00
setup: # TODO: Variant mit venv
${PIP} install -r requirements;
2021-11-06 10:55:44 +01:00
run: # non-interactive mode mit config-datei
2021-11-06 11:02:53 +01:00
${PYTHON} src/main.py run --debug --colour ${COLOUR} --config "${PATH_TO_CONFIG}"
2021-11-06 10:55:44 +01:00
run-it: # interactive mode
2021-11-06 11:02:53 +01:00
${PYTHON} src/main.py run --it --debug --colour ${COLOUR}
2021-11-06 10:55:44 +01:00
# Do everything:
all: setup run
all-it: setup run-it