Updated Makefiles and CMakeLists.txt to point to resource, not oic-resource
[platform/upstream/iotivity.git] / resource / oc_logger / c / Makefile
1 # //******************************************************************
2 # //
3 # // Copyright 2014 Intel Mobile Communications GmbH All Rights Reserved.
4 # //
5 # //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
6 # //
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
10 # //
11 # //      http://www.apache.org/licenses/LICENSE-2.0
12 # //
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.
18 # //
19 # //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
20 #
21
22 BUILD := release
23
24 CC_FLAGS.debug=-Wall -std=c99 -Werror -O0 -g
25 CC_FLAGS.release=-Wall -std=c99 -Werror -O2
26
27 INC=-I../include/
28 CC:=gcc
29
30 BIN_DIR=../bin
31 LIB_DIR=../lib
32 TEST_DIR=../test
33
34 LIB=$(LIB_DIR)/oc_logger.a
35
36 CCX=$(CC) $(CC_FLAGS.$(BUILD))
37
38 all: setup c_lib c_targets
39
40 setup:
41         mkdir -p $(BIN_DIR) $(LIB_DIR)
42         mkdir -p $(BIN_DIR)/targets
43         mkdir -p $(TEST_DIR)
44
45 c_lib:
46         $(CCX) $(INC) -c -o $(BIN_DIR)/oc_logger.o oc_logger.c
47
48 c_targets:
49         $(CCX) $(INC) -c -o $(BIN_DIR)/targets/oc_console_logger.o oc_console_logger.c
50
51 clean:
52         rm -rf -v \*\.o test_logging $(BIN_DIR)/* $(LIB_DIR)/*