summaryrefslogtreecommitdiff
path: root/ext/ffi_c/libffi.gnu.mk
blob: b6b3701c1c893c8872fa692b54e50775aa45b750 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# -*- makefile -*-
#
#  Common definitions for all systems that use GNU make
#


# Tack the extra deps onto the autogenerated variables
INCFLAGS += -I"$(LIBFFI_BUILD_DIR)"/include
LOCAL_LIBS += $(LIBFFI)
BUILD_DIR = $(shell pwd)
LIBFFI_CFLAGS = $(FFI_MMAP_EXEC)
LIBFFI_BUILD_DIR = $(BUILD_DIR)/libffi-$(arch)

ifeq ($(srcdir),.)
  LIBFFI_SRC_DIR := $(shell pwd)/libffi
else ifeq ($(srcdir),..)
  LIBFFI_SRC_DIR := $(shell pwd)/../libffi
else
  LIBFFI_SRC_DIR := $(realpath $(srcdir)/libffi)
endif

LIBFFI = "$(LIBFFI_BUILD_DIR)"/.libs/libffi_convenience.a
LIBFFI_AUTOGEN = ${LIBFFI_SRC_DIR}/autogen.sh
LIBFFI_CONFIGURE = "$(LIBFFI_SRC_DIR)"/configure --disable-static \
	--with-pic=yes --disable-dependency-tracking --disable-docs

$(OBJS):	$(LIBFFI)

#
# libffi.mk or libffi.darwin.mk contains rules for building the actual library
#