Home | History | Annotate | Download | only in libffi
      1 # Copyright 2007 The Android Open Source Project
      2 #
      3 # Licensed under the Apache License, Version 2.0 (the "License");
      4 # you may not use this file except in compliance with the License.
      5 # You may obtain a copy of the License at
      6 #
      7 #      http://www.apache.org/licenses/LICENSE-2.0
      8 #
      9 # Unless required by applicable law or agreed to in writing, software
     10 # distributed under the License is distributed on an "AS IS" BASIS,
     11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     12 # See the License for the specific language governing permissions and
     13 # limitations under the License.
     14 
     15 # The libffi code is organized primarily by architecture, but at some
     16 # point OS-specific issues started to creep in. In some cases there
     17 # are OS-specific source files, in others there are just #ifdefs in
     18 # the code. We need to generate the appropriate defines and select the
     19 # right set of source files for the OS and architecture.
     20 
     21 LOCAL_C_INCLUDES := \
     22 	external/libffi/include \
     23 	external/libffi/$(ffi_os)-$(ffi_arch)
     24 
     25 ifeq ($(ffi_os)-$(ffi_arch),linux-arm)
     26   LOCAL_SRC_FILES := src/arm/sysv.S src/arm/ffi.c
     27 endif
     28 
     29 ifeq ($(ffi_os)-$(ffi_arch),linux-x86)
     30   LOCAL_SRC_FILES := src/x86/ffi.c src/x86/sysv.S
     31 endif
     32 
     33 ifeq ($(ffi_os)-$(ffi_arch),darwin-x86)
     34   LOCAL_SRC_FILES := src/x86/ffi.c src/x86/darwin.S
     35 endif
     36 
     37 ifeq ($(LOCAL_SRC_FILES),)
     38   $(info The os/architecture $(ffi_os)-$(ffi_arch) is not supported by libffi.)
     39   LOCAL_SRC_FILES := your-architecture-not-supported-by-ffi-makefile.c
     40 endif
     41 
     42 LOCAL_SRC_FILES += \
     43 	src/debug.c \
     44 	src/java_raw_api.c \
     45 	src/prep_cif.c \
     46         src/raw_api.c \
     47 	src/types.c
     48