-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (29 loc) · 918 Bytes
/
Makefile
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
36
# TODO better way to find firmatacpp
firmatadir?=$(HOME)/firmatacpp
bluedir?=${firmatadir}/libblepp-prefix
# on Ubuntu 14.04 set this to c++1y
CPPSTD?=gnu++14
CPPFLAGS+= -I$(firmatadir)/include
CPPFLAGS+= -I$(firmatadir)
CPPFLAGS+= -I$(firmatadir)/vendor/serial/include
CPPFLAGS+= $(if $(NO_BLUETOOTH),,-I$(bluedir)/include)
CPPFLAGS+= -g3 -std=$(CPPSTD)
CPPFLAGS+= $(if $(NO_BLUETOOTH),-DNO_BLUETOOTH)
LDFLAGS+= -L$(firmatadir)
LDFLAGS+= -L$(firmatadir)/vendor/serial
LDFLAGS+= -rdynamic
LDFLAGS+= -g3 -std=$(CPPSTD)
ifeq ($(NO_BLUETOOTH),)
LDFLAGS+= -L$(bluedir)/lib
LDFLAGS+= -Wl,-rpath,$(bluedir)
vpath %.so $(bluedir)/lib
endif
daemon:=scratchdaemon
$(daemon): $(daemon).o
$(daemon): $(firmatadir)/libfirmatacpp.a
$(daemon): $(firmatadir)/vendor/serial/libserial.a
$(daemon): $(if $(NO_BLUETOOTH),,-lble++) -lpthread -lrt
$(daemon): CC=$(CXX)
$(daemon).o: $(daemon).cpp
clean:
rm -f $(daemon) $(daemon).o