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