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 include $(BUILD_HOST_STATIC_LIBRARY)
     44 
     45 
     46 include $(CLEAR_VARS)
     47 
     48 LOCAL_SRC_FILES := $(common_SRC_FILES)
     49 LOCAL_CFLAGS += $(common_CFLAGS)
     50 LOCAL_C_INCLUDES += $(common_C_INCLUDES)
     51 
     52 ifeq ($(HOST_OS),darwin)
     53 	LOCAL_CFLAGS += -fno-common
     54 endif
     55 
     56 LOCAL_MODULE:= libexpat-host
     57 LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
     58 LOCAL_MODULE_TAGS := optional
     59 LOCAL_COPY_HEADERS_TO := $(common_COPY_HEADERS_TO)
     60 LOCAL_COPY_HEADERS := $(common_COPY_HEADERS)
     61 LOCAL_MULTILIB := both
     62 
     63 include $(BUILD_HOST_SHARED_LIBRARY)
     64 
     65 
     66 # For the device
     67 # =====================================================
     68 
     69 # Device static library
     70 include $(CLEAR_VARS)
     71 
     72 ifeq ($(TARGET_ARCH),arm)
     73     LOCAL_SDK_VERSION := 8
     74 else
     75     LOCAL_SDK_VERSION := 9
     76 endif
     77 
     78 LOCAL_SRC_FILES := $(common_SRC_FILES)
     79 LOCAL_CFLAGS += $(common_CFLAGS)
     80 LOCAL_C_INCLUDES += $(common_C_INCLUDES)
     81 
     82 LOCAL_MODULE:= libexpat_static
     83 LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
     84 LOCAL_MODULE_TAGS := optional
     85 
     86 include $(BUILD_STATIC_LIBRARY)
     87 
     88 # Device shared library
     89 include $(CLEAR_VARS)
     90 
     91 ifeq ($(TARGET_ARCH),arm)
     92     LOCAL_SDK_VERSION := 8
     93 else
     94     LOCAL_SDK_VERSION := 9
     95 endif
     96 
     97 LOCAL_SYSTEM_SHARED_LIBRARIES := libc
     98 LOCAL_SRC_FILES := $(common_SRC_FILES)
     99 LOCAL_CFLAGS += $(common_CFLAGS)
    100 LOCAL_C_INCLUDES += $(common_C_INCLUDES)
    101 
    102 LOCAL_MODULE:= libexpat
    103 LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
    104 LOCAL_MODULE_TAGS := optional
    105 LOCAL_COPY_HEADERS_TO := $(common_COPY_HEADERS_TO)
    106 LOCAL_COPY_HEADERS := $(common_COPY_HEADERS)
    107 
    108 include $(BUILD_SHARED_LIBRARY)
    109