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 | |
| 11 | common_CFLAGS := -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions -DHAVE_EXPAT_CONFIG_H |
| 12 | |
| 13 | common_C_INCLUDES += \ |
| 14 | $(LOCAL_PATH)/lib |
| 15 | |
| 16 | common_COPY_HEADERS_TO := libexpat |
| 17 | common_COPY_HEADERS := \ |
| 18 | lib/expat.h \ |
| 19 | lib/expat_external.h |
| 20 | |
| 21 | # For the host |
| 22 | # ===================================================== |
| 23 | |
| 24 | include $(CLEAR_VARS) |
| 25 | |
| 26 | LOCAL_SRC_FILES := $(common_SRC_FILES) |
| 27 | LOCAL_CFLAGS += $(common_CFLAGS) |
| 28 | LOCAL_C_INCLUDES += $(common_C_INCLUDES) |
| 29 | |
| 30 | ifeq ($(HOST_OS),darwin) |
| 31 | LOCAL_CFLAGS += -fno-common |
| 32 | endif |
| 33 | |
| 34 | LOCAL_MODULE:= libexpat |
Jesse Wilson | 204e2ef | 2010-09-16 15:47:50 -0700 | [diff] [blame^] | 35 | LOCAL_MODULE_TAGS := optional |
The Android Open Source Project | b80e287 | 2009-03-03 19:29:30 -0800 | [diff] [blame] | 36 | LOCAL_COPY_HEADERS_TO := $(common_COPY_HEADERS_TO) |
| 37 | LOCAL_COPY_HEADERS := $(common_COPY_HEADERS) |
| 38 | |
| 39 | include $(BUILD_HOST_STATIC_LIBRARY) |
| 40 | |
| 41 | |
| 42 | # For the device |
| 43 | # ===================================================== |
| 44 | |
| 45 | include $(CLEAR_VARS) |
| 46 | |
| 47 | LOCAL_SRC_FILES := $(common_SRC_FILES) |
| 48 | LOCAL_CFLAGS += $(common_CFLAGS) |
| 49 | LOCAL_C_INCLUDES += $(common_C_INCLUDES) |
| 50 | |
| 51 | LOCAL_MODULE:= libexpat |
Jesse Wilson | 204e2ef | 2010-09-16 15:47:50 -0700 | [diff] [blame^] | 52 | LOCAL_MODULE_TAGS := optional |
The Android Open Source Project | b80e287 | 2009-03-03 19:29:30 -0800 | [diff] [blame] | 53 | LOCAL_COPY_HEADERS_TO := $(common_COPY_HEADERS_TO) |
| 54 | LOCAL_COPY_HEADERS := $(common_COPY_HEADERS) |
| 55 | |
| 56 | include $(BUILD_SHARED_LIBRARY) |
| 57 | |