OSDN Git Service

Initial Contribution
[android-x86/external-libffi.git] / Android.mk
1 # Copyright 2007 The Android Open Source Project
2 #
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.
8
9 ifneq ($(TARGET_ARCH),arm)
10
11 LOCAL_PATH:= $(call my-dir)
12 include $(CLEAR_VARS)
13
14 LOCAL_C_INCLUDES := \
15         external/libffi/include \
16         external/libffi/$(TARGET_OS)-$(TARGET_ARCH)
17
18 LOCAL_SRC_FILES := src/debug.c src/prep_cif.c src/types.c \
19         src/raw_api.c src/java_raw_api.c
20
21 ifeq ($(TARGET_OS)-$(TARGET_ARCH),linux-arm)
22   LOCAL_SRC_FILES += src/arm/sysv.S src/arm/ffi.c
23 endif
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
27 endif
28
29 ifeq ($(LOCAL_SRC_FILES),)
30   LOCAL_SRC_FILES := your-architecture-not-supported-by-ffi-makefile.c
31 endif
32
33 LOCAL_MODULE := libffi
34
35
36 include $(BUILD_SHARED_LIBRARY)
37
38
39 include external/libffi/testsuite/Android.mk
40
41 endif