blob: bcba01c1bc08c0b51dd63020ec1bbaa935eaa34e [file] [log] [blame]
The Android Open Source Projectb80e2872009-03-03 19:29:30 -08001LOCAL_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
6common_SRC_FILES := \
7 lib/xmlparse.c \
8 lib/xmlrole.c \
9 lib/xmltok.c
10
11common_CFLAGS := -Wall -Wmissing-prototypes -Wstrict-prototypes -fexceptions -DHAVE_EXPAT_CONFIG_H
12
13common_C_INCLUDES += \
14 $(LOCAL_PATH)/lib
15
16common_COPY_HEADERS_TO := libexpat
17common_COPY_HEADERS := \
18 lib/expat.h \
19 lib/expat_external.h
20
21# For the host
22# =====================================================
23
24include $(CLEAR_VARS)
25
26LOCAL_SRC_FILES := $(common_SRC_FILES)
27LOCAL_CFLAGS += $(common_CFLAGS)
28LOCAL_C_INCLUDES += $(common_C_INCLUDES)
29
30ifeq ($(HOST_OS),darwin)
31 LOCAL_CFLAGS += -fno-common
32endif
33
34LOCAL_MODULE:= libexpat
Jesse Wilson204e2ef2010-09-16 15:47:50 -070035LOCAL_MODULE_TAGS := optional
The Android Open Source Projectb80e2872009-03-03 19:29:30 -080036LOCAL_COPY_HEADERS_TO := $(common_COPY_HEADERS_TO)
37LOCAL_COPY_HEADERS := $(common_COPY_HEADERS)
38
39include $(BUILD_HOST_STATIC_LIBRARY)
40
41
42# For the device
43# =====================================================
44
45include $(CLEAR_VARS)
46
47LOCAL_SRC_FILES := $(common_SRC_FILES)
48LOCAL_CFLAGS += $(common_CFLAGS)
49LOCAL_C_INCLUDES += $(common_C_INCLUDES)
50
51LOCAL_MODULE:= libexpat
Jesse Wilson204e2ef2010-09-16 15:47:50 -070052LOCAL_MODULE_TAGS := optional
The Android Open Source Projectb80e2872009-03-03 19:29:30 -080053LOCAL_COPY_HEADERS_TO := $(common_COPY_HEADERS_TO)
54LOCAL_COPY_HEADERS := $(common_COPY_HEADERS)
55
56include $(BUILD_SHARED_LIBRARY)
57