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 := -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
     35 LOCAL_MODULE_TAGS := optional
     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 # Device static library
     46 include $(CLEAR_VARS)
     47 
     48 ifneq ($(TARGET_ARCH),x86)
     49 LOCAL_NDK_VERSION := 4
     50 LOCAL_SDK_VERSION := 8
     51 endif
     52 
     53 LOCAL_SRC_FILES := $(common_SRC_FILES)
     54 LOCAL_CFLAGS += $(common_CFLAGS)
     55 LOCAL_C_INCLUDES += $(common_C_INCLUDES)
     56 
     57 LOCAL_MODULE:= libexpat_static
     58 LOCAL_MODULE_TAGS := optional
     59 
     60 include $(BUILD_STATIC_LIBRARY)
     61 
     62 # Device shared library
     63 include $(CLEAR_VARS)
     64 
     65 ifneq ($(TARGET_ARCH),x86)
     66 LOCAL_NDK_VERSION := 4
     67 LOCAL_SDK_VERSION := 8
     68 endif
     69 
     70 LOCAL_SRC_FILES := $(common_SRC_FILES)
     71 LOCAL_CFLAGS += $(common_CFLAGS)
     72 LOCAL_C_INCLUDES += $(common_C_INCLUDES)
     73 
     74 LOCAL_MODULE:= libexpat
     75 LOCAL_MODULE_TAGS := optional
     76 LOCAL_COPY_HEADERS_TO := $(common_COPY_HEADERS_TO)
     77 LOCAL_COPY_HEADERS := $(common_COPY_HEADERS)
     78 
     79 include $(BUILD_SHARED_LIBRARY)
     80 
     81