1 # Copyright 2007 The Android Open Source Project
3 # The libffi code is organized primarily by architecture, but at some
4 # point OS-specific issues started to creep in. In some cases there are
5 # OS-specific source files, in others there are just #ifdefs in the code.
6 # We need to generate the appropriate defines and select the right set of
7 # source files for the OS and architecture.
9 ifneq ($(TARGET_ARCH),arm)
11 LOCAL_PATH:= $(call my-dir)
15 external/libffi/include \
16 external/libffi/$(TARGET_OS)-$(TARGET_ARCH)
18 LOCAL_SRC_FILES := src/debug.c src/prep_cif.c src/types.c \
19 src/raw_api.c src/java_raw_api.c
21 ifeq ($(TARGET_OS)-$(TARGET_ARCH),linux-arm)
22 LOCAL_SRC_FILES += src/arm/sysv.S src/arm/ffi.c
24 ifeq ($(TARGET_OS)-$(TARGET_ARCH),linux-x86)
25 LOCAL_SRC_FILES += src/x86/ffi.c src/x86/sysv.S
26 LOCAL_CFLAGS := -DCONF_HAVE_LONG_DOUBLE
29 ifeq ($(LOCAL_SRC_FILES),)
30 LOCAL_SRC_FILES := your-architecture-not-supported-by-ffi-makefile.c
33 LOCAL_MODULE := libffi
36 include $(BUILD_SHARED_LIBRARY)
39 include external/libffi/testsuite/Android.mk