Alexandre Lision | 950e9d6 | 2013-12-02 15:09:01 -0500 | [diff] [blame] | 1 | |
| 2 | include $(CLEAR_VARS) |
| 3 | |
| 4 | MY_LIBEXPAT := libexpat/sources |
Emeric Vigier | 2f62582 | 2012-08-06 11:09:52 -0400 | [diff] [blame] | 5 | |
| 6 | # We need to build this for both the device (as a shared library) |
| 7 | # and the host (as a static library for tools to use). |
| 8 | |
Alexandre Lision | 950e9d6 | 2013-12-02 15:09:01 -0500 | [diff] [blame] | 9 | common_SRC_FILES := $(MY_LIBEXPAT)/xmlparse.c \ |
| 10 | $(MY_LIBEXPAT)/xmlrole.c \ |
| 11 | $(MY_LIBEXPAT)/xmltok.c |
Emeric Vigier | 2f62582 | 2012-08-06 11:09:52 -0400 | [diff] [blame] | 12 | |
| 13 | common_CFLAGS := -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions -DHAVE_EXPAT_CONFIG_H |
| 14 | |
Alexandre Lision | 950e9d6 | 2013-12-02 15:09:01 -0500 | [diff] [blame] | 15 | common_C_INCLUDES += $(MY_LIBEXPAT) |
Emeric Vigier | 2f62582 | 2012-08-06 11:09:52 -0400 | [diff] [blame] | 16 | |
| 17 | common_COPY_HEADERS_TO := libexpat |
Alexandre Lision | 950e9d6 | 2013-12-02 15:09:01 -0500 | [diff] [blame] | 18 | |
Emeric Vigier | 2f62582 | 2012-08-06 11:09:52 -0400 | [diff] [blame] | 19 | common_COPY_HEADERS := \ |
| 20 | lib/expat.h \ |
| 21 | lib/expat_external.h |
| 22 | |
| 23 | # For the device |
| 24 | # ===================================================== |
| 25 | |
| 26 | # Device static library |
| 27 | include $(CLEAR_VARS) |
| 28 | |
| 29 | ifeq ($(TARGET_ARCH),arm) |
| 30 | LOCAL_NDK_VERSION := 4 |
| 31 | LOCAL_SDK_VERSION := 8 |
| 32 | endif |
| 33 | |
| 34 | LOCAL_SRC_FILES := $(common_SRC_FILES) |
| 35 | LOCAL_CFLAGS += $(common_CFLAGS) |
| 36 | LOCAL_C_INCLUDES += $(common_C_INCLUDES) |
| 37 | |
| 38 | LOCAL_MODULE:= libexpat_static |
| 39 | LOCAL_MODULE_FILENAME := libexpat |
| 40 | LOCAL_MODULE_TAGS := optional |
| 41 | |
| 42 | include $(BUILD_STATIC_LIBRARY) |
| 43 | |
| 44 | # Device shared library |
| 45 | include $(CLEAR_VARS) |
| 46 | |
| 47 | ifeq ($(TARGET_ARCH),arm) |
| 48 | LOCAL_NDK_VERSION := 4 |
| 49 | LOCAL_SDK_VERSION := 8 |
| 50 | endif |
| 51 | |
| 52 | LOCAL_SRC_FILES := $(common_SRC_FILES) |
| 53 | LOCAL_CFLAGS += $(common_CFLAGS) |
| 54 | LOCAL_C_INCLUDES += $(common_C_INCLUDES) |
| 55 | |
| 56 | LOCAL_MODULE:= libexpat_shared |
| 57 | LOCAL_MODULE_FILENAME := libexpat |
| 58 | LOCAL_MODULE_TAGS := optional |
| 59 | LOCAL_COPY_HEADERS_TO := $(common_COPY_HEADERS_TO) |
| 60 | LOCAL_COPY_HEADERS := $(common_COPY_HEADERS) |
| 61 | |
Alexandre Lision | 48ae6af | 2013-12-03 11:21:52 -0500 | [diff] [blame] | 62 | include $(BUILD_STATIC_LIBRARY) |