blob: d7e7b4e2acb68108cf0c01a0ce5f949611858e48 (
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
|
CXX = g++
CXX_FLAGS = -std=c++0x -Wall -pthread
TOP_DIR = ../../../../../..
LIB_DIR = ../../../../../../resource
SRC_DIR = ../../src
DEPEND_DIR:= $(LIB_DIR)/dependencies
CXX_INC := -I$(LIB_DIR)/include/
CXX_INC += -I$(LIB_DIR)/oc_logger/include/
CXX_INC += -I$(LIB_DIR)/csdk/stack/include/
CXX_INC += -I$(LIB_DIR)/csdk/ocsocket/include/
CXX_INC += -I$(LIB_DIR)/csdk/ocrandom/include/
CXX_INC += -I$(LIB_DIR)/csdk/logger/include/
CXX_INC += -I$(BOOST_DIR)
CXX_INC += -I../../lib
CXX_INC += -I../../../../lib/cpluff/libcpluff
CXX_INC += -I../csdk/libcoap
LIB_OC_LOGGER := $(LIB_DIR)/oc_logger/lib/oc_logger.a
CXX_LIBS := ../../../../lib/cpluff/libcpluff/.libs/libcpluff.a
.PHONY: lib release_build ./release/lightserver_mqtt_plugin.so
all: .PHONY
lib:
cd ../../lib && $(MAKE)
release_build:
-mkdir release
-mkdir release/obj
cp plugin.xml release
./release/lightserver_mqtt_plugin.so: ./release/obj/lightserver_mqtt_plugin.o ./release/obj/lightserver.o
$(CXX) -shared -o ./release/lightserver_mqtt_plugin.so ./release/obj/lightserver_mqtt_plugin.o ./release/obj/lightserver.o $(CXX_LIBS) -L../../lib -L$(TOP_DIR)/out/linux/x86/release -lmosquitto -lssl -lrt -loc -loctbstack -loc_logger -lcoap
./release/obj/lightserver_mqtt_plugin.o: $(SRC_DIR)/lightserver_mqtt_plugin.cpp
$(CXX) $(CXX_INC) -fPIC -o ./release/obj/lightserver_mqtt_plugin.o -c $(SRC_DIR)/lightserver_mqtt_plugin.cpp
./release/obj/lightserver.o: $(SRC_DIR)/lightserver.cpp
$(CXX) $(CXX_FLAGS) -fPIC -o ./release/obj/lightserver.o -c $(SRC_DIR)/lightserver.cpp $(CXX_INC)
clean:
cd ../../lib && $(MAKE) clean
rm -rf ./release/obj
cd ./release && rm -f *.so
|