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