summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2023-03-27 17:57:19 +0200
committerxengineering <me@xengineering.eu>2023-03-27 17:57:19 +0200
commitd7ce7860bf47ad1f51a44a9705eb0dbf1825eb66 (patch)
tree49f36a991a4777aa3e6cee4b43e8d83668e4e7dd /Makefile
parent5d1d9e09e3fd26228230bb325ca3d5ddf2576070 (diff)
downloadwebiot-d7ce7860bf47ad1f51a44a9705eb0dbf1825eb66.tar
webiot-d7ce7860bf47ad1f51a44a9705eb0dbf1825eb66.tar.zst
webiot-d7ce7860bf47ad1f51a44a9705eb0dbf1825eb66.zip
Pass appdata directory by argument
Passing this as part of the configuration file is not flexible. With args it can be easily tweaked for the debug use case while the default path for production is included in the argument parsing.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 4 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index e258995..c8d409a 100644
--- a/Makefile
+++ b/Makefile
@@ -10,7 +10,7 @@ all:
# some recommended options for Go building:
# https://wiki.archlinux.org/title/Go_package_guidelines
mkdir -p build
- go build -o build/$(PROGRAM) main.go hs100.go
+ go build -o build/$(PROGRAM) *.go
clean:
rm -rf build
@@ -18,11 +18,11 @@ clean:
install: all
install -Dm 755 build/$(PROGRAM) $(DESTDIR)$(PREFIX)/bin/$(PROGRAM)
install -Dm 644 config.json $(DESTDIR)/etc/$(PROGRAM)/config.json
- install -Dm 644 index.html.tmpl $(DESTDIR)$(PREFIX)/share/$(PROGRAM)/index.html.tmpl
- install -Dm 644 libweb/libweb.css $(DESTDIR)$(PREFIX)/share/$(PROGRAM)/webiot.css
+ install -Dm 644 appdata/index.html.tmpl $(DESTDIR)$(PREFIX)/share/$(PROGRAM)/index.html.tmpl
+ install -Dm 644 appdata/webiot.css $(DESTDIR)$(PREFIX)/share/$(PROGRAM)/webiot.css
install -Dm 644 systemd/$(PROGRAM).service $(DESTDIR)$(PREFIX)/lib/systemd/system/$(PROGRAM).service
install -Dm 644 systemd/$(PROGRAM).sysusers $(DESTDIR)$(PREFIX)/lib/sysusers.d/$(PROGRAM).conf
debug:
- go run main.go hs100.go -c private/config.json
+ go run *.go -c config.json -a appdata