blob: 32251dd639eb56a447ab4b252827bc94a3dfbc35 (
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
66
67
68
69
|
TGMROOT=../../../
IOT_BASE=${TGMROOT}../../resource
RST_NAME=.
TARGET1=con-server
TARGET2=con-client
TARGET3=bootstrapserver
OBJS = ConfigurationCollection.o DiagnosticsCollection.o FactorySetCollection.o con-server.o
SRCS = $(OBJS:.o=.c)
# 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/ocrandom/include
CXX_INC += -I${IOT_BASE}/csdk/logger/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)/release/obj/liboc.a
LD_LIB += $(IOT_BASE)/csdk/linux/release/liboctbstack.a
LD_LIB += $(LIB_OC_LOGGER)
# Force metatargets to build:
.PHONY: all clean
all: ${TARGET1} ${TARGET2} ${TARGET3}
.cpp.o:
$(CXX) $(CXX_FLAGS) -c -o $@ $< $(CXX_INC) $(TGM_INC)
$(TARGET1): $(OBJS)
$(CXX) $(CXX_FLAGS) -o $@ ${OBJS} $(CXX_INC) ${LD_LIB} $(TGM_INC) $(SDK_LIB)
${TARGET2}: con-client.cpp
$(CXX) $(CXX_FLAGS) -o ${TARGET2} $< $(CXX_INC) ${LD_LIB} $(TGM_INC) $(SDK_LIB)
${TARGET3}: bootstrapserver.cpp
$(CXX) $(CXX_FLAGS) -o ${TARGET3} $< $(CXX_INC) ${LD_LIB} $(TGM_INC) $(SDK_LIB)
dep:
gccmakedep $(SRCS)
clean:
rm -f -v *.o con-client
rm -f -v *.o con-server
rm -f -v *.o bootstrapserver
#dep:
# gccmakedep $(SRCS)
|