• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
9ifneq ($(TARGET_ARCH),arm)
10
11LOCAL_PATH:= $(call my-dir)
12include $(CLEAR_VARS)
13
14LOCAL_C_INCLUDES := \
15	external/libffi/include \
16	external/libffi/$(TARGET_OS)-$(TARGET_ARCH)
17
18LOCAL_SRC_FILES := src/debug.c src/prep_cif.c src/types.c \
19        src/raw_api.c src/java_raw_api.c
20
21ifeq ($(TARGET_OS)-$(TARGET_ARCH),linux-arm)
22  LOCAL_SRC_FILES += src/arm/sysv.S src/arm/ffi.c
23endif
24ifeq ($(TARGET_OS)-$(TARGET_ARCH),linux-x86)
25  LOCAL_SRC_FILES += src/x86/ffi.c src/x86/sysv.S
26endif
27
28ifeq ($(LOCAL_SRC_FILES),)
29  LOCAL_SRC_FILES := your-architecture-not-supported-by-ffi-makefile.c
30endif
31
32LOCAL_MODULE := libffi
33
34
35include $(BUILD_SHARED_LIBRARY)
36
37
38include external/libffi/testsuite/Android.mk
39
40endif
41