Skip to content
Snippets Groups Projects
Commit 1a2e1fdf authored by Lorenzo Pivetta's avatar Lorenzo Pivetta
Browse files

Update Makefile

parent c39ee290
No related branches found
No related tags found
No related merge requests found
...@@ -2,11 +2,12 @@ NAME = sl-monitor-gui ...@@ -2,11 +2,12 @@ NAME = sl-monitor-gui
MAIN = sl-monitor.py MAIN = sl-monitor.py
DIRNAME = $(NAME:-gui=) DIRNAME = $(NAME:-gui=)
MODNAME = $(MAIN:.py=)
PY_FILES += $(wildcard src/*.py) PY_FILES += $(wildcard src/*.py)
default: bin ${PY_FILES} default: bin ${PY_FILES}
@cp ${PY_FILES} bin/${DIRNAME} @cp ${PY_FILES} bin/${DIRNAME}
@echo "#!/bin/bash\nexec /runtime/bin/${DIRNAME}/${MAIN}" > bin/${NAME} @echo "#!/usr/bin/env python\nimport sys\nsys.path.append(sys.path[0]+'/${DIRNAME}')\nfrom ${MODNAME} import main\nif __name__ == '__main__':\n main()\n" > bin/${NAME}
@chmod +x bin/${NAME} bin/${DIRNAME}/${MAIN} @chmod +x bin/${NAME} bin/${DIRNAME}/${MAIN}
bin: bin:
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment