From e10b409ef3ca36d6fa0006b29b6ddd922db9bd21 Mon Sep 17 00:00:00 2001 From: tomsmeding Date: Mon, 25 May 2015 15:09:17 +0200 Subject: Add a nice makefile --- Makefile | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 Makefile 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 -- cgit v1.2.3