blob: 22759c56045d4fd76522ab9fc685a289e2ee3cec [file] [log] [blame]
Anthony Greenc6dddbd2009-10-04 08:11:33 -04001## Process this with automake to create Makefile.in
2
3AUTOMAKE_OPTIONS = foreign subdir-objects
Anthony Greenc6dddbd2009-10-04 08:11:33 -04004
5SUBDIRS = include testsuite man
6
Anthony Green0cad4382011-02-09 06:11:46 -05007EXTRA_DIST = LICENSE ChangeLog.v1 ChangeLog.libgcj configure.host \
8 src/alpha/ffi.c src/alpha/osf.S src/alpha/ffitarget.h \
9 src/arm/ffi.c src/arm/sysv.S src/arm/trampoline.S \
10 src/arm/ffitarget.h src/avr32/ffi.c src/avr32/sysv.S \
11 src/avr32/ffitarget.h src/cris/ffi.c src/cris/sysv.S \
12 src/cris/ffitarget.h src/ia64/ffi.c src/ia64/ffitarget.h \
13 src/ia64/ia64_flags.h src/ia64/unix.S src/mips/ffi.c \
14 src/mips/n32.S src/mips/o32.S src/mips/ffitarget.h \
15 src/m32r/ffi.c src/m32r/sysv.S src/m32r/ffitarget.h \
16 src/m68k/ffi.c src/m68k/sysv.S src/m68k/ffitarget.h \
17 src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/linux64.S \
18 src/powerpc/linux64_closure.S src/powerpc/ppc_closure.S \
19 src/powerpc/asm.h src/powerpc/aix.S src/powerpc/darwin.S \
20 src/powerpc/aix_closure.S src/powerpc/darwin_closure.S \
21 src/powerpc/ffi_darwin.c src/powerpc/ffitarget.h \
22 src/s390/ffi.c src/s390/sysv.S src/s390/ffitarget.h \
23 src/sh/ffi.c src/sh/sysv.S src/sh/ffitarget.h src/sh64/ffi.c \
24 src/sh64/sysv.S src/sh64/ffitarget.h src/sparc/v8.S \
25 src/sparc/v9.S src/sparc/ffitarget.h src/sparc/ffi.c \
26 src/x86/darwin64.S src/x86/ffi.c src/x86/sysv.S \
27 src/x86/win32.S src/x86/win64.S src/x86/darwin.S \
28 src/x86/freebsd.S src/x86/ffi64.c src/x86/unix64.S \
29 src/x86/ffitarget.h src/pa/ffitarget.h src/pa/ffi.c \
30 src/pa/linux.S src/pa/hpux32.S src/frv/ffi.c src/frv/eabi.S \
31 src/frv/ffitarget.h src/dlmalloc.c src/moxie/ffi.c \
32 src/moxie/eabi.S libtool-version ChangeLog.libffi \
33 m4/libtool.m4 m4/lt~obsolete.m4 m4/ltoptions.m4 m4/ltsugar.m4 \
Anthony Green17d9e9e2011-02-11 12:23:20 -050034 m4/ltversion.m4 build-ios.sh src/arm/gentramp.sh src/debug.c
Anthony Green5cbe2052009-10-04 23:53:11 -040035
36info_TEXINFOS = doc/libffi.texi
Anthony Greenc6dddbd2009-10-04 08:11:33 -040037
38## ################################################################
39
40##
41## This section is for make and multilib madness.
42##
43
44# Work around what appears to be a GNU make bug handling MAKEFLAGS
45# values defined in terms of make variables, as is the case for CC and
46# friends when we are called from the top level Makefile.
47AM_MAKEFLAGS = \
48 "AR_FLAGS=$(AR_FLAGS)" \
49 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
50 "CFLAGS=$(CFLAGS)" \
51 "CXXFLAGS=$(CXXFLAGS)" \
52 "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
53 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
54 "INSTALL=$(INSTALL)" \
55 "INSTALL_DATA=$(INSTALL_DATA)" \
56 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
57 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
58 "JC1FLAGS=$(JC1FLAGS)" \
59 "LDFLAGS=$(LDFLAGS)" \
60 "LIBCFLAGS=$(LIBCFLAGS)" \
61 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
62 "MAKE=$(MAKE)" \
63 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
64 "PICFLAG=$(PICFLAG)" \
65 "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
66 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
67 "SHELL=$(SHELL)" \
68 "exec_prefix=$(exec_prefix)" \
69 "infodir=$(infodir)" \
70 "libdir=$(libdir)" \
Anthony Green3f5b1372010-07-12 14:39:18 -040071 "mandir=$(mandir)" \
Anthony Greenc6dddbd2009-10-04 08:11:33 -040072 "prefix=$(prefix)" \
73 "AR=$(AR)" \
74 "AS=$(AS)" \
75 "CC=$(CC)" \
76 "CXX=$(CXX)" \
77 "LD=$(LD)" \
78 "NM=$(NM)" \
79 "RANLIB=$(RANLIB)" \
80 "DESTDIR=$(DESTDIR)"
81
82MAKEOVERRIDES=
83
Anthony Green115ab362009-12-24 00:22:00 -050084ACLOCAL_AMFLAGS=$(ACLOCAL_AMFLAGS) -I m4
85
Anthony Green5cbe2052009-10-04 23:53:11 -040086lib_LTLIBRARIES = libffi.la
Anthony Greenc6dddbd2009-10-04 08:11:33 -040087noinst_LTLIBRARIES = libffi_convenience.la
88
Anthony Green17d9e9e2011-02-11 12:23:20 -050089libffi_la_SOURCES = src/prep_cif.c src/types.c \
Anthony Greenc6dddbd2009-10-04 08:11:33 -040090 src/raw_api.c src/java_raw_api.c src/closures.c
91
Anthony Green5cbe2052009-10-04 23:53:11 -040092pkgconfigdir = $(libdir)/pkgconfig
93pkgconfig_DATA = libffi.pc
94
Anthony Greenc6dddbd2009-10-04 08:11:33 -040095nodist_libffi_la_SOURCES =
96
Anthony Green17d9e9e2011-02-11 12:23:20 -050097if FFI_DEBUG
98nodist_libffi_la_SOURCES += src/debug.c
99endif
100
Anthony Greenc6dddbd2009-10-04 08:11:33 -0400101if MIPS
102nodist_libffi_la_SOURCES += src/mips/ffi.c src/mips/o32.S src/mips/n32.S
103endif
104if X86
105nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/sysv.S
106endif
107if X86_FREEBSD
108nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/freebsd.S
109endif
110if X86_WIN32
111nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/win32.S
112endif
113if X86_WIN64
114nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/win64.S
115endif
116if X86_DARWIN
117nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/darwin.S src/x86/ffi64.c src/x86/darwin64.S
118endif
119if SPARC
120nodist_libffi_la_SOURCES += src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S
121endif
122if ALPHA
123nodist_libffi_la_SOURCES += src/alpha/ffi.c src/alpha/osf.S
124endif
125if IA64
126nodist_libffi_la_SOURCES += src/ia64/ffi.c src/ia64/unix.S
127endif
128if M32R
129nodist_libffi_la_SOURCES += src/m32r/sysv.S src/m32r/ffi.c
130endif
131if M68K
132nodist_libffi_la_SOURCES += src/m68k/ffi.c src/m68k/sysv.S
133endif
134if POWERPC
135nodist_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
136endif
137if POWERPC_AIX
138nodist_libffi_la_SOURCES += src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_closure.S
139endif
140if POWERPC_DARWIN
141nodist_libffi_la_SOURCES += src/powerpc/ffi_darwin.c src/powerpc/darwin.S src/powerpc/darwin_closure.S
142endif
143if POWERPC_FREEBSD
144nodist_libffi_la_SOURCES += src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S
145endif
146if ARM
147nodist_libffi_la_SOURCES += src/arm/sysv.S src/arm/ffi.c
Landon Fullerc71480e2010-09-19 09:02:05 -0700148if FFI_EXEC_TRAMPOLINE_TABLE
149nodist_libffi_la_SOURCES += src/arm/trampoline.S
150endif
Anthony Greenc6dddbd2009-10-04 08:11:33 -0400151endif
Anthony Green2340e7a2009-10-04 23:53:17 -0400152if AVR32
153nodist_libffi_la_SOURCES += src/avr32/sysv.S src/avr32/ffi.c
154endif
Anthony Greenc6dddbd2009-10-04 08:11:33 -0400155if LIBFFI_CRIS
156nodist_libffi_la_SOURCES += src/cris/sysv.S src/cris/ffi.c
157endif
158if FRV
159nodist_libffi_la_SOURCES += src/frv/eabi.S src/frv/ffi.c
160endif
Anthony Greenc6dddbd2009-10-04 08:11:33 -0400161if S390
162nodist_libffi_la_SOURCES += src/s390/sysv.S src/s390/ffi.c
163endif
164if X86_64
165nodist_libffi_la_SOURCES += src/x86/ffi64.c src/x86/unix64.S src/x86/ffi.c src/x86/sysv.S
166endif
167if SH
168nodist_libffi_la_SOURCES += src/sh/sysv.S src/sh/ffi.c
169endif
170if SH64
171nodist_libffi_la_SOURCES += src/sh64/sysv.S src/sh64/ffi.c
172endif
173if PA_LINUX
174nodist_libffi_la_SOURCES += src/pa/linux.S src/pa/ffi.c
175endif
176if PA_HPUX
177nodist_libffi_la_SOURCES += src/pa/hpux32.S src/pa/ffi.c
178endif
179
180libffi_convenience_la_SOURCES = $(libffi_la_SOURCES)
181nodist_libffi_convenience_la_SOURCES = $(nodist_libffi_la_SOURCES)
182
Anthony Green7c7c9f32011-02-12 09:29:29 -0500183AM_CFLAGS = -g
Anthony Green00d0b592010-08-05 14:56:53 -0400184if FFI_DEBUG
185# Build debug. Define FFI_DEBUG on the commandline so that, when building with
186# MSVC, it can link against the debug CRT.
187AM_CFLAGS += -DFFI_DEBUG
Anthony Green00d0b592010-08-05 14:56:53 -0400188endif
Anthony Greenc6dddbd2009-10-04 08:11:33 -0400189
Anthony Greenc3042af2010-01-01 08:08:02 -0500190libffi_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LTLDFLAGS) $(AM_LTLDFLAGS)
Anthony Greenc6dddbd2009-10-04 08:11:33 -0400191
192AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
193AM_CCASFLAGS = $(AM_CPPFLAGS)
194
Anthony Green5cbe2052009-10-04 23:53:11 -0400195# No install-html or install-pdf support in automake yet
196.PHONY: install-html install-pdf
197install-html:
198install-pdf: