blob: 9d894864cc57836dabd02d0bca2d706f5af6bc04 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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
|