summaryrefslogtreecommitdiff
path: root/service/things-manager/sampleapp/linux/groupsyncaction/makefile
blob: 0ee1e5ccbe04e1e49a62023fd3861a613bcaa72c (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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65

TGMROOT=../../../
IOT_BASE=${TGMROOT}../../resource
RST_NAME=.
TARGET1=group
TARGET2=phone
TARGET3=musicplayer
TARGET4=speaker
BUILD:=release

# C++ type Compile Flag define.
CXX=g++
CXX_FLAGS=-std=c++0x -Wall -pthread -DLINUX -ldl

CXX_INC	:= -I../../ -I../../inc/ -I../../../sdk/inc/ -I../../../sdk/src/
CXX_INC	+= -I${IOT_BASE}/include/
CXX_INC += -I${IOT_BASE}/oc_logger/include
CXX_INC	+= -I${IOT_BASE}/csdk/stack/include
CXX_INC	+= -I${IOT_BASE}/csdk/ocsocket/include
CXX_INC	+= -I${IOT_BASE}/csdk/ocrandom/include
CXX_INC	+= -I${IOT_BASE}/csdk/logger/include
CXX_INC	+= -I${IOT_BASE}/dependencies/cereal/include

CXX_LIB=-L""

CXX_SRCPATH=${wildcard ../../src/*.cpp}
CXX_SRCLIST=${notdir ${CXX_SRCPATH}}
CXX_USESRCS=${filter-out ${EXCLUDE_LIST}, ${CXX_SRCLIST}}
CXX_OBJLIST=${CXX_USESRCS:.cpp=.o}


TGM = ../../
SDK = ${TGMROOT}sdk
TGM_INC = -I${TGMROOT}sdk/inc
SDK_LIB = ${TGMROOT}sdk/build/linux/libTGMSDKLibrary.a

LIB_OC_LOGGER := $(IOT_BASE)/oc_logger/lib/oc_logger.a

LD_LIB := $(IOT_BASE)/$(BUILD)/obj/liboc.a
LD_LIB += $(IOT_BASE)/csdk/linux/$(BUILD)/liboctbstack.a
LD_LIB += $(LIB_OC_LOGGER)


# Force metatargets to build:
.PHONY: all clean

all: ${TARGET1} ${TARGET2} ${TARGET3} ${TARGET4}

${TARGET1}: ./group.cpp
	$(CXX) $(CXX_FLAGS) -o ${TARGET1} ./group.cpp   $(CXX_INC)  ${LD_LIB} $(TGM_INC) $(SDK_LIB)

${TARGET2}: ./phone.cpp
	$(CXX) $(CXX_FLAGS) -o ${TARGET2} ./phone.cpp   $(CXX_INC)  ${LD_LIB} $(TGM_INC) $(SDK_LIB)

${TARGET3}: ./musicplayer.cpp
	$(CXX) $(CXX_FLAGS) -o ${TARGET3} ./musicplayer.cpp   $(CXX_INC)  ${LD_LIB} $(TGM_INC) $(SDK_LIB)

${TARGET4}: ./speaker.cpp
	$(CXX) $(CXX_FLAGS) -o ${TARGET4} ./speaker.cpp   $(CXX_INC)  ${LD_LIB} $(TGM_INC) $(SDK_LIB)

clean:
	rm -f -v *.o ${TARGET1}
	rm -f -v *.o ${TARGET2}
	rm -f -v *.o ${TARGET3}
	rm -f -v *.o ${TARGET4}