## Process this with automake to create Makefile.in

AUTOMAKE_OPTIONS = foreign subdir-objects

SUBDIRS = include

EXTRA_DIST = LICENSE ChangeLog.v1 \
	src/alpha/ffi.c src/alpha/osf.S src/alpha/ffitarget.h \
	src/arm/ffi.c src/arm/sysv.S src/arm/ffitarget.h \
	src/cris/ffi.c src/cris/sysv.S src/cris/ffitarget.h \
	src/mips/ffi.c src/mips/n32.S src/mips/o32.S \
	src/mips/ffitarget.h \
	src/m32r/ffi.c src/m32r/sysv.S src/m32r/ffitarget.h \
	src/m68k/ffi.c src/m68k/sysv.S src/m68k/ffitarget.h \
	src/powerpc/ffi.c src/powerpc/sysv.S \
	src/powerpc/linux64.S src/powerpc/linux64_closure.S \
	src/powerpc/ppc_closure.S src/powerpc/asm.h \
	src/powerpc/aix.S src/powerpc/darwin.S \
	src/powerpc/aix_closure.S src/powerpc/darwin_closure.S \
	src/powerpc/ffi_darwin.c src/powerpc/ffitarget.h \
	src/s390/ffi.c src/s390/sysv.S src/s390/ffitarget.h \
	src/sh/ffi.c src/sh/sysv.S src/sh/ffitarget.h \
	src/sh64/ffi.c src/sh64/sysv.S src/sh64/ffitarget.h \
	src/sparc/v8.S src/sparc/v9.S src/sparc/ffitarget.h \
	src/sparc/ffi.c \
	src/x86/ffi.c src/x86/sysv.S src/x86/win32.S src/x86/darwin.S \
	src/x86/ffi64.c src/x86/unix64.S src/x86/ffitarget.h \
	src/pa/ffi.c src/pa/linux.S src/frv/eabi.S src/frv/ffitarget.h

lib_LTLIBRARIES = libffi.la

libffi_la_SOURCES = src/debug.c src/prep_cif.c src/types.c \
		src/raw_api.c src/java_raw_api.c

if MIPS_IRIX
libffi_la_SOURCES += src/mips/ffi.c src/mips/o32.S src/mips/n32.S
endif
if MIPS_LINUX
libffi_la_SOURCES += src/mips/ffi.c src/mips/o32.S
endif
if X86
libffi_la_SOURCES += src/x86/ffi.c src/x86/sysv.S
endif
if X86_WIN32
libffi_la_SOURCES += src/x86/ffi.c src/x86/win32.S
endif
if X86_DARWIN
libffi_la_SOURCES += src/x86/ffi.c src/x86/darwin.S
endif
if X86_FREEBSD
libffi_la_SOURCES += src/x86/ffi.c src/x86/sysv.S
endif
if SPARC
libffi_la_SOURCES += src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S
endif
if ALPHA
libffi_la_SOURCES += src/alpha/ffi.c src/alpha/osf.S
endif
if IA64
libffi_la_SOURCES += src/ia64/ffi.c src/ia64/unix.S
endif
if M32R
libffi_la_SOURCES += src/m32r/sysv.S src/m32r/ffi.c
endif
if M68K
libffi_la_SOURCES += src/m68k/ffi.c src/m68k/sysv.S
endif
if POWERPC
libffi_la_SOURCES += src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S src/powerpc/linux64.S src/powerpc/linux64_closure.S
endif
if POWERPC_AIX
libffi_la_SOURCES += src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_closure.S
endif
if POWERPC_DARWIN
libffi_la_SOURCES += src/powerpc/ffi_darwin.c src/powerpc/darwin.S src/powerpc/darwin_closure.S
endif
if POWERPC_FREEBSD
libffi_la_SOURCES += src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S
endif
if ARM
libffi_la_SOURCES += src/arm/sysv.S src/arm/ffi.c
endif
if LIBFFI_CRIS
libffi_la_SOURCES += src/cris/sysv.S src/cris/ffi.c
endif
if FRV
libffi_la_SOURCES += src/frv/eabi.S src/frv/ffi.c
endif
if S390
libffi_la_SOURCES += src/s390/sysv.S src/s390/ffi.c
endif
if X86_64
libffi_la_SOURCES += src/x86/ffi64.c src/x86/unix64.S src/x86/ffi.c src/x86/sysv.S
endif
if SH
libffi_la_SOURCES += src/sh/sysv.S src/sh/ffi.c
endif
if SH64
libffi_la_SOURCES += src/sh64/sysv.S src/sh64/ffi.c
endif
if PA
libffi_la_SOURCES += src/pa/linux.S src/pa/ffi.c
endif

AM_CFLAGS = -Wall -g -fexceptions

libffi_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version`

AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
AM_CCASFLAGS = $(AM_CPPFLAGS)
