Initial merge-commit of the OIC code. Should successfully do discovery for single...
[platform/upstream/iotivity.git] / csdk / android / OCSocket / jni / Android.mk
1 #         LOGGER           #
2 LOCAL_PATH := $(call my-dir)
3
4 ifeq ($(CCFL_CORE), )
5 CCFL_CORE       := $(HOME)/peg_ccfl-core
6 endif
7
8 ifeq ($(LOGGER_OBJ), )
9 LOGGER_OBJ      := $(CCFL_CORE)/logger
10 endif
11
12 ifeq ($(SOCKET_OBJ), )
13 SOCKET_OBJ      := $(CCFL_CORE)/ocsocket
14 endif
15
16 ifeq ($(ANDROID_OBJ), )
17 ANDROID_OBJ     := $(CCFL_CORE)/android
18 endif
19
20 #
21 # OCLogger
22 #
23 include $(CLEAR_VARS)
24 TARGET_PLATFORM := android-16
25 LOCAL_MODULE    := oclogger
26 LOCAL_SRC_FILES := $(ANDROID_OBJ)/OCLogger/obj/local/$(TARGET_ARCH_ABI)/libOCLogger.a
27 include $(PREBUILT_STATIC_LIBRARY)
28
29 # ==============================================================
30 # OCLogger - Android
31 # ==============================================================
32 include $(CLEAR_VARS)
33
34 TARGET_PLATFORM := android-16
35
36 LOCAL_CPPFLAGS  += -D_GLIBCXX__PTHREADS
37 LOCAL_CPPFLAGS  += -D_THREAD_SAFE
38 LOCAL_CPPFLAGS  += -D_REENTRANT
39 LOCAL_CPPFLAGS  += -std=gnu++11
40 LOCAL_CPPFLAGS  += -s
41 LOCAL_CPPFLAGS  += -DHAVE_SOCKET_ERRNO
42
43 ifneq ($(TARGET_ARCH), $(X86_ARCH))
44         LOCAL_CPPFLAGS          += -D__arm__
45 endif
46
47 X86_ARCH := x86
48
49 LOCAL_MODULE    := OCSocket
50
51 LOCAL_SRC_FILES := $(SOCKET_OBJ)/src/ocsocket.c
52
53 LOCAL_C_INCLUDES := $(SOCKET_OBJ)/include
54 LOCAL_C_INCLUDES += $(LOGGER_OBJ)/include
55
56 LOCAL_STATIC_LIBRARIES := oclogger
57
58 include $(BUILD_STATIC_LIBRARY)