• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1LOCAL_PATH:= $(call my-dir)
2
3# We need to build this for both the device (as a shared library)
4# and the host (as a static library for tools to use).
5
6common_SRC_FILES := \
7	lib/xmlparse.c \
8	lib/xmlrole.c \
9	lib/xmltok.c
10
11common_CFLAGS := \
12    -Wall \
13    -Wmissing-prototypes -Wstrict-prototypes \
14    -Wno-unused-parameter -Wno-missing-field-initializers \
15    -fexceptions \
16    -DHAVE_EXPAT_CONFIG_H
17
18common_C_INCLUDES += \
19	$(LOCAL_PATH)/lib
20
21common_COPY_HEADERS_TO := libexpat
22common_COPY_HEADERS := \
23	lib/expat.h \
24	lib/expat_external.h
25
26# For the host
27# =====================================================
28
29include $(CLEAR_VARS)
30
31LOCAL_SRC_FILES := $(common_SRC_FILES)
32LOCAL_CFLAGS += $(common_CFLAGS)
33LOCAL_C_INCLUDES += $(common_C_INCLUDES)
34
35ifeq ($(HOST_OS),darwin)
36	LOCAL_CFLAGS += -fno-common
37endif
38
39LOCAL_MODULE:= libexpat
40LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
41LOCAL_MODULE_TAGS := optional
42
43include $(BUILD_HOST_STATIC_LIBRARY)
44
45
46include $(CLEAR_VARS)
47
48LOCAL_SRC_FILES := $(common_SRC_FILES)
49LOCAL_CFLAGS += $(common_CFLAGS)
50LOCAL_C_INCLUDES += $(common_C_INCLUDES)
51
52ifeq ($(HOST_OS),darwin)
53	LOCAL_CFLAGS += -fno-common
54endif
55
56LOCAL_MODULE:= libexpat
57LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
58LOCAL_MODULE_TAGS := optional
59LOCAL_COPY_HEADERS_TO := $(common_COPY_HEADERS_TO)
60LOCAL_COPY_HEADERS := $(common_COPY_HEADERS)
61
62include $(BUILD_HOST_SHARED_LIBRARY)
63
64
65# For the device
66# =====================================================
67
68# Device static library
69include $(CLEAR_VARS)
70
71ifeq ($(TARGET_ARCH),arm)
72LOCAL_SDK_VERSION := 8
73endif
74
75LOCAL_SRC_FILES := $(common_SRC_FILES)
76LOCAL_CFLAGS += $(common_CFLAGS)
77LOCAL_C_INCLUDES += $(common_C_INCLUDES)
78
79LOCAL_MODULE:= libexpat_static
80LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
81LOCAL_MODULE_TAGS := optional
82
83include $(BUILD_STATIC_LIBRARY)
84
85# Device shared library
86include $(CLEAR_VARS)
87
88ifeq ($(TARGET_ARCH),arm)
89LOCAL_SDK_VERSION := 8
90endif
91
92LOCAL_SRC_FILES := $(common_SRC_FILES)
93LOCAL_CFLAGS += $(common_CFLAGS)
94LOCAL_C_INCLUDES += $(common_C_INCLUDES)
95
96LOCAL_MODULE:= libexpat
97LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
98LOCAL_MODULE_TAGS := optional
99LOCAL_COPY_HEADERS_TO := $(common_COPY_HEADERS_TO)
100LOCAL_COPY_HEADERS := $(common_COPY_HEADERS)
101
102include $(BUILD_SHARED_LIBRARY)
103