diff options
author | tomsmeding <hallo@tomsmeding.nl> | 2015-05-25 15:09:17 +0200 |
---|---|---|
committer | tomsmeding <hallo@tomsmeding.nl> | 2015-05-25 15:09:17 +0200 |
commit | e10b409ef3ca36d6fa0006b29b6ddd922db9bd21 (patch) | |
tree | ca1f8fc27754dc447695caf1c89616b87c08be27 | |
parent | 30ca746887a0f7e089ee515e68e80caae1237cd5 (diff) |
Add a nice makefile
-rw-r--r-- | Makefile | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..9d89486 --- /dev/null +++ b/Makefile @@ -0,0 +1,35 @@ +ifneq ($(wildcard ~/bin/.),) + INSTALL_TARGET_DIR = ~/bin +else + INSTALL_TARGET_DIR = /usr/local/bin +endif + +OUTPUTS = timerserver timerwp timerwaypoint timerstatus timerstop + +.PHONY: all install + +all: $(OUTPUTS) + +install: all + @echo Installing to $(INSTALL_TARGET_DIR)... + @for f in $(OUTPUTS); do \ + cmd="cp $$f $(INSTALL_TARGET_DIR)/$$f"; \ + echo $$cmd; \ + eval $$cmd; \ + done + + +timerserver: timerserver.cpp + g++ -std=c++11 -Wall -O2 -o $@ $^ + +timerwp: timerserver + ln -sf timerserver timerwp + +timerwaypoint: timerserver + ln -sf timerserver timerwaypoint + +timerstatus: timerserver + ln -sf timerserver timerstatus + +timerstop: timerserver + ln -sf timerserver timerstop |