The Android Open Source Project | b80e287 | 2009-03-03 19:29:30 -0800 | [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 | lib/xmlparse.c \ |
| 8 | lib/xmlrole.c \ |
| 9 | lib/xmltok.c |
| 10 | |
Elliott Hughes | 35e432d | 2012-09-09 14:23:38 -0700 | [diff] [blame] | 11 | common_CFLAGS := \ |
| 12 | -Wall \ |
| 13 | -Wmissing-prototypes -Wstrict-prototypes \ |
| 14 | -Wno-unused-parameter -Wno-missing-field-initializers \ |
| 15 | -fexceptions \ |
| 16 | -DHAVE_EXPAT_CONFIG_H |
The Android Open Source Project | b80e287 | 2009-03-03 19:29:30 -0800 | [diff] [blame] | 17 | |
| 18 | common_C_INCLUDES += \ |
| 19 | $(LOCAL_PATH)/lib |
| 20 | |
| 21 | common_COPY_HEADERS_TO := libexpat |
| 22 | common_COPY_HEADERS := \ |
| 23 | lib/expat.h \ |
| 24 | lib/expat_external.h |
| 25 | |
| 26 | # For the host |
| 27 | # ===================================================== |
| 28 | |
| 29 | include $(CLEAR_VARS) |
| 30 | |
| 31 | LOCAL_SRC_FILES := $(common_SRC_FILES) |
| 32 | LOCAL_CFLAGS += $(common_CFLAGS) |
| 33 | LOCAL_C_INCLUDES += $(common_C_INCLUDES) |
| 34 | |
| 35 | ifeq ($(HOST_OS),darwin) |
| 36 | LOCAL_CFLAGS += -fno-common |
| 37 | endif |
| 38 | |
| 39 | LOCAL_MODULE:= libexpat |
Elliott Hughes | 35e432d | 2012-09-09 14:23:38 -0700 | [diff] [blame] | 40 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
Jesse Wilson | 204e2ef | 2010-09-16 15:47:50 -0700 | [diff] [blame] | 41 | LOCAL_MODULE_TAGS := optional |
The Android Open Source Project | b80e287 | 2009-03-03 19:29:30 -0800 | [diff] [blame] | 42 | |
Ying Wang | e5aa0a2 | 2014-07-31 14:44:23 -0700 | [diff] [blame] | 43 | LOCAL_MULTILIB := both |
| 44 | |
The Android Open Source Project | b80e287 | 2009-03-03 19:29:30 -0800 | [diff] [blame] | 45 | include $(BUILD_HOST_STATIC_LIBRARY) |
| 46 | |
| 47 | |
Elliott Hughes | 85d7cec | 2011-07-13 17:40:06 -0700 | [diff] [blame] | 48 | include $(CLEAR_VARS) |
| 49 | |
| 50 | LOCAL_SRC_FILES := $(common_SRC_FILES) |
| 51 | LOCAL_CFLAGS += $(common_CFLAGS) |
| 52 | LOCAL_C_INCLUDES += $(common_C_INCLUDES) |
| 53 | |
| 54 | ifeq ($(HOST_OS),darwin) |
| 55 | LOCAL_CFLAGS += -fno-common |
| 56 | endif |
| 57 | |
Brian Carlstrom | eb72beb | 2013-05-02 18:42:59 +0000 | [diff] [blame] | 58 | LOCAL_MODULE:= libexpat-host |
Elliott Hughes | 35e432d | 2012-09-09 14:23:38 -0700 | [diff] [blame] | 59 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
Elliott Hughes | 85d7cec | 2011-07-13 17:40:06 -0700 | [diff] [blame] | 60 | LOCAL_MODULE_TAGS := optional |
| 61 | LOCAL_COPY_HEADERS_TO := $(common_COPY_HEADERS_TO) |
| 62 | LOCAL_COPY_HEADERS := $(common_COPY_HEADERS) |
Ian Rogers | 280be67 | 2014-06-17 01:41:52 -0700 | [diff] [blame] | 63 | LOCAL_MULTILIB := both |
Elliott Hughes | 85d7cec | 2011-07-13 17:40:06 -0700 | [diff] [blame] | 64 | |
| 65 | include $(BUILD_HOST_SHARED_LIBRARY) |
| 66 | |
| 67 | |
The Android Open Source Project | b80e287 | 2009-03-03 19:29:30 -0800 | [diff] [blame] | 68 | # For the device |
| 69 | # ===================================================== |
| 70 | |
Mike Dodd | 6df1342 | 2011-02-24 15:40:10 -0800 | [diff] [blame] | 71 | # Device static library |
The Android Open Source Project | b80e287 | 2009-03-03 19:29:30 -0800 | [diff] [blame] | 72 | include $(CLEAR_VARS) |
| 73 | |
Bhanu Chetlapalli | 9b83edb | 2012-01-31 12:02:02 -0800 | [diff] [blame] | 74 | ifeq ($(TARGET_ARCH),arm) |
Arunesh Mishra | ee26fc1 | 2012-11-13 11:11:01 -0800 | [diff] [blame] | 75 | LOCAL_SDK_VERSION := 8 |
| 76 | else |
| 77 | LOCAL_SDK_VERSION := 9 |
Mike Dodd | 6df1342 | 2011-02-24 15:40:10 -0800 | [diff] [blame] | 78 | endif |
| 79 | |
| 80 | LOCAL_SRC_FILES := $(common_SRC_FILES) |
| 81 | LOCAL_CFLAGS += $(common_CFLAGS) |
| 82 | LOCAL_C_INCLUDES += $(common_C_INCLUDES) |
| 83 | |
| 84 | LOCAL_MODULE:= libexpat_static |
Elliott Hughes | 35e432d | 2012-09-09 14:23:38 -0700 | [diff] [blame] | 85 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
Mike Dodd | 6df1342 | 2011-02-24 15:40:10 -0800 | [diff] [blame] | 86 | LOCAL_MODULE_TAGS := optional |
| 87 | |
| 88 | include $(BUILD_STATIC_LIBRARY) |
| 89 | |
| 90 | # Device shared library |
| 91 | include $(CLEAR_VARS) |
| 92 | |
Bhanu Chetlapalli | 9b83edb | 2012-01-31 12:02:02 -0800 | [diff] [blame] | 93 | ifeq ($(TARGET_ARCH),arm) |
Arunesh Mishra | ee26fc1 | 2012-11-13 11:11:01 -0800 | [diff] [blame] | 94 | LOCAL_SDK_VERSION := 8 |
| 95 | else |
| 96 | LOCAL_SDK_VERSION := 9 |
Mike Dodd | 6df1342 | 2011-02-24 15:40:10 -0800 | [diff] [blame] | 97 | endif |
| 98 | |
Colin Cross | 3e19b71 | 2014-02-03 18:39:27 -0800 | [diff] [blame] | 99 | LOCAL_SYSTEM_SHARED_LIBRARIES := libc |
The Android Open Source Project | b80e287 | 2009-03-03 19:29:30 -0800 | [diff] [blame] | 100 | LOCAL_SRC_FILES := $(common_SRC_FILES) |
| 101 | LOCAL_CFLAGS += $(common_CFLAGS) |
| 102 | LOCAL_C_INCLUDES += $(common_C_INCLUDES) |
| 103 | |
| 104 | LOCAL_MODULE:= libexpat |
Elliott Hughes | 35e432d | 2012-09-09 14:23:38 -0700 | [diff] [blame] | 105 | LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk |
Jesse Wilson | 204e2ef | 2010-09-16 15:47:50 -0700 | [diff] [blame] | 106 | LOCAL_MODULE_TAGS := optional |
The Android Open Source Project | b80e287 | 2009-03-03 19:29:30 -0800 | [diff] [blame] | 107 | LOCAL_COPY_HEADERS_TO := $(common_COPY_HEADERS_TO) |
| 108 | LOCAL_COPY_HEADERS := $(common_COPY_HEADERS) |
| 109 | |
| 110 | include $(BUILD_SHARED_LIBRARY) |