1 #//******************************************************************
3 #// Copyright 2014 Intel Corporation.
5 #//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
7 #// Licensed under the Apache License, Version 2.0 (the "License");
8 #// you may not use this file except in compliance with the License.
9 #// You may obtain a copy of the License at
11 #// http://www.apache.org/licenses/LICENSE-2.0
13 #// Unless required by applicable law or agreed to in writing, software
14 #// distributed under the License is distributed on an "AS IS" BASIS,
15 #// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 #// See the License for the specific language governing permissions and
17 #// limitations under the License.
19 #//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
21 # override with `make BUILD=release`
22 # default to release build
29 OIC_RES := $(OIC)/resource
30 OIC_LIB := $(OIC)/out/linux/x86_64/release
38 CXX_FLAGS.debug := -O0 -g3 -std=c++0x -Wall -pthread
40 CXX_FLAGS.release := -O3 -std=c++0x -Wall -pthread
42 CXX_INC := -I$(OIC_RES)/include/
43 CXX_INC += -I$(OIC_RES)/oc_logger/include
44 CXX_INC += -I$(OIC_RES)/csdk/stack/include
45 CXX_INC += -I$(OIC_RES)/csdk/ocrandom/include
46 CXX_INC += -I$(OIC_RES)/csdk/logger/include
47 CXX_INC += -I$(OIC_RES)/csdk/connectivity/lib/libcoap-4.1.1
49 CXX_LIBS := -L${OIC_LIB}
51 CXX_LIBS += -loctbstack
52 CXX_LIBS += -loc_logger
53 #CXX_LIBS += -loc_logger_core
54 CXX_LIBS += -lconnectivity_abstraction
57 all: prep_dirs OICMiddle
63 $(CXX) $(CXX_FLAGS.$(BUILD)) -o $(OUT_DIR)/$@ $(OBJS) $(CXX_LIBS)
65 OICMiddle.o: OICMiddle.cpp OICMiddle.h
66 $(CXX) -c $(CXX_FLAGS.$(BUILD)) OICMiddle.cpp $(CXX_INC)
68 Client.o: Client.cpp Client.h OICMiddle.h
69 $(CXX) -c $(CXX_FLAGS.$(BUILD)) Client.cpp $(CXX_INC)
71 Server.o: Server.cpp Server.h OICMiddle.h
72 $(CXX) -c $(CXX_FLAGS.$(BUILD)) Server.cpp $(CXX_INC)
74 WrapResource.o: WrapResource.cpp WrapResource.h OICMiddle.h
75 $(CXX) -c $(CXX_FLAGS.$(BUILD)) WrapResource.cpp $(CXX_INC)
77 LineInput.o: LineInput.cpp LineInput.h OICMiddle.h
78 $(CXX) -c $(CXX_FLAGS.$(BUILD)) LineInput.cpp $(CXX_INC)
80 RestInput.o: RestInput.cpp RestInput.h OICMiddle.h
81 $(CXX) -c $(CXX_FLAGS.$(BUILD)) RestInput.cpp $(CXX_INC)