Home | History | Annotate | Download | only in expat
      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 := \
     12     -Wall \
     13     -Wmissing-prototypes -Wstrict-prototypes \
     14     -Wno-unused-parameter -Wno-missing-field-initializers \
     15     -fexceptions \
     16     -DHAVE_EXPAT_CONFIG_H
     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
     40 LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
     41 LOCAL_MODULE_TAGS := optional
     42 
     43 LOCAL_MULTILIB := both
     44 
     45 include $(BUILD_HOST_STATIC_LIBRARY)
     46 
     47 
     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 
     58 LOCAL_MODULE:= libexpat-host
     59 LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
     60 LOCAL_MODULE_TAGS := optional
     61 LOCAL_COPY_HEADERS_TO := $(common_COPY_HEADERS_TO)
     62 LOCAL_COPY_HEADERS := $(common_COPY_HEADERS)
     63 LOCAL_MULTILIB := both
     64 
     65 include $(BUILD_HOST_SHARED_LIBRARY)
     66 
     67 
     68 # For the device
     69 # =====================================================
     70 
     71 # Device static library
     72 include $(CLEAR_VARS)
     73 
     74 ifeq ($(TARGET_ARCH),arm)
     75     LOCAL_SDK_VERSION := 8
     76 else
     77     LOCAL_SDK_VERSION := 9
     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
     85 LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
     86 LOCAL_MODULE_TAGS := optional
     87 
     88 include $(BUILD_STATIC_LIBRARY)
     89 
     90 # Device shared library
     91 include $(CLEAR_VARS)
     92 
     93 ifeq ($(TARGET_ARCH),arm)
     94     LOCAL_SDK_VERSION := 8
     95 else
     96     LOCAL_SDK_VERSION := 9
     97 endif
     98 
     99 LOCAL_SYSTEM_SHARED_LIBRARIES := libc
    100 LOCAL_SRC_FILES := $(common_SRC_FILES)
    101 LOCAL_CFLAGS += $(common_CFLAGS)
    102 LOCAL_C_INCLUDES += $(common_C_INCLUDES)
    103 
    104 LOCAL_MODULE:= libexpat
    105 LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
    106 LOCAL_MODULE_TAGS := optional
    107 LOCAL_COPY_HEADERS_TO := $(common_COPY_HEADERS_TO)
    108 LOCAL_COPY_HEADERS := $(common_COPY_HEADERS)
    109 
    110 include $(BUILD_SHARED_LIBRARY)
    111