blob: 0693ae2c2f2b382dbe94f91e1dd7f8cd305689bf [file] [log] [blame]
Emeric Vigier2f625822012-08-06 11:09:52 -04001LOCAL_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 xmlparse.c \
8 xmlrole.c \
9 xmltok.c
10
11common_CFLAGS := -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions -DHAVE_EXPAT_CONFIG_H
12
13#common_C_INCLUDES += $(LOCAL_PATH)/../lib \
14# $(LOCAL_PATH)/..
15
16common_COPY_HEADERS_TO := libexpat
17common_COPY_HEADERS := \
18 lib/expat.h \
19 lib/expat_external.h
20
21# For the device
22# =====================================================
23
24# Device static library
25include $(CLEAR_VARS)
26
27ifeq ($(TARGET_ARCH),arm)
28LOCAL_NDK_VERSION := 4
29LOCAL_SDK_VERSION := 8
30endif
31
32LOCAL_SRC_FILES := $(common_SRC_FILES)
33LOCAL_CFLAGS += $(common_CFLAGS)
34LOCAL_C_INCLUDES += $(common_C_INCLUDES)
35
36LOCAL_MODULE:= libexpat_static
37LOCAL_MODULE_FILENAME := libexpat
38LOCAL_MODULE_TAGS := optional
39
40include $(BUILD_STATIC_LIBRARY)
41
42# Device shared library
43include $(CLEAR_VARS)
44
45ifeq ($(TARGET_ARCH),arm)
46LOCAL_NDK_VERSION := 4
47LOCAL_SDK_VERSION := 8
48endif
49
50LOCAL_SRC_FILES := $(common_SRC_FILES)
51LOCAL_CFLAGS += $(common_CFLAGS)
52LOCAL_C_INCLUDES += $(common_C_INCLUDES)
53
54LOCAL_MODULE:= libexpat_shared
55LOCAL_MODULE_FILENAME := libexpat
56LOCAL_MODULE_TAGS := optional
57LOCAL_COPY_HEADERS_TO := $(common_COPY_HEADERS_TO)
58LOCAL_COPY_HEADERS := $(common_COPY_HEADERS)
59
60include $(BUILD_SHARED_LIBRARY)