diff options
Diffstat (limited to '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  | 
