aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 24 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..8fd2535
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,24 @@
+PY?=python3
+SERVERMODULE=http.server
+
+ifeq ($(PY), tauthon)
+ SERVERMODULE = SimpleHTTPServer
+else ifeq ($(PY), python2)
+ SERVERMODULE = SimpleHTTPServer
+else ifeq ($(PY), python3)
+ SERVERMODULE = http.server
+endif
+
+help:
+ @echo 'Makefile for Web-Base '
+ @echo ' '
+ @echo 'Usage: '
+ @echo ' make serve [PY=python] [PORT=8000] serve site at http://localhost:8000 '
+ @echo ' '
+
+serve:
+ifdef PORT
+ $(PY) -m $(SERVERMODULE) $(PORT)
+else
+ $(PY) -m $(SERVERMODULE)
+endif