1 # //******************************************************************
3 # // Copyright 2014 Intel Mobile Communications GmbH All Rights Reserved.
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 # //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
24 include $(ROOT_DIR)/local.properties
26 OCSOCK_DIR = $(ROOT_DIR)/ocsocket
27 LOGGER_DIR = $(ROOT_DIR)/logger
28 BIN_DIR = $(OCSOCK_DIR)/bin/linux/
29 OBJ_DIR = $(OCSOCK_DIR)/obj/linux/
30 INC_DIRS = -I$(OCSOCK_DIR)/include/ -I$(LOGGER_DIR)/include
35 CFLAGS += -Os -Wall -Wno-write-strings -ffunction-sections -fdata-sections -fno-exceptions -DTB_LOG
36 DEP_LIBS = $(GTEST_LINUX_DIR)/lib/.libs/libgtest_main.a $(GTEST_LINUX_DIR)/lib/.libs/libgtest.a
37 VPATH = $(OCSOCK_DIR)/src:$(LOGGER_DIR)/src
39 TEST_APP = ocsocket_gtest
40 COBJ = logger.o ocsocket.o
44 cp $(TEST_APP) $(BIN_DIR)
49 $(CC) -c $(CFLAGS) $(INC_DIRS) $< -o $@
51 $(TEST_APP).o: $(TEST_APP).cpp
52 $(CXX) -c $(CFLAGS) -pthread $(INC_DIRS) -I$(GTEST_LINUX_DIR)/include -o $@ $<
54 $(TEST_APP): $(TEST_APP).o $(DEP_LIBS) $(COBJ)
55 $(CXX) -Os -Wl,--gc-sections $^ -lpthread -o $@