1## Process this with automake to create Makefile.in
2
3AUTOMAKE_OPTIONS = foreign subdir-objects
4
5ACLOCAL_AMFLAGS = -I m4
6
7SUBDIRS = include testsuite man
8
9EXTRA_DIST = LICENSE ChangeLog.v1 ChangeLog.libgcj			\
10	 src/aarch64/ffi.c src/aarch64/ffitarget.h src/aarch64/sysv.S	\
11	 src/alpha/ffi.c src/alpha/osf.S			\
12	 src/alpha/ffitarget.h src/arc/ffi.c src/arc/arcompact.S	\
13	 src/arc/ffitarget.h src/arm/ffi.c src/arm/sysv.S		\
14	 src/arm/ffitarget.h src/avr32/ffi.c src/avr32/sysv.S		\
15	 src/avr32/ffitarget.h src/cris/ffi.c src/cris/sysv.S		\
16	 src/cris/ffitarget.h src/ia64/ffi.c src/ia64/ffitarget.h	\
17	 src/ia64/ia64_flags.h src/ia64/unix.S src/mips/ffi.c		\
18	 src/mips/n32.S src/mips/o32.S src/metag/ffi.c			\
19	 src/metag/ffitarget.h src/metag/sysv.S src/moxie/ffi.c		\
20	 src/moxie/ffitarget.h src/moxie/eabi.S src/mips/ffitarget.h	\
21	 src/m32r/ffi.c src/m32r/sysv.S src/m32r/ffitarget.h		\
22	 src/m68k/ffi.c src/m68k/sysv.S src/m68k/ffitarget.h		\
23	 src/m88k/ffi.c src/m88k/obsd.S src/m88k/ffitarget.h		\
24	 src/microblaze/ffi.c src/microblaze/sysv.S			\
25	 src/microblaze/ffitarget.h					\
26	 src/nios2/ffi.c src/nios2/ffitarget.h src/nios2/sysv.S		\
27	 src/or1k/ffi.c src/or1k/ffitarget.h src/or1k/sysv.S		\
28	 src/powerpc/ffi.c src/powerpc/ffi_powerpc.h			\
29	 src/powerpc/ffi_sysv.c src/powerpc/ffi_linux64.c		\
30	 src/powerpc/sysv.S src/powerpc/linux64.S			\
31	 src/powerpc/linux64_closure.S src/powerpc/ppc_closure.S	\
32	 src/powerpc/asm.h src/powerpc/aix.S src/powerpc/darwin.S	\
33	 src/powerpc/aix_closure.S src/powerpc/darwin_closure.S		\
34	 src/powerpc/ffi_darwin.c src/powerpc/ffitarget.h		\
35	 src/s390/ffi.c src/s390/sysv.S src/s390/ffitarget.h		\
36	 src/sh/ffi.c src/sh/sysv.S src/sh/ffitarget.h src/sh64/ffi.c	\
37	 src/sh64/sysv.S src/sh64/ffitarget.h src/sparc/v8.S		\
38	 src/sparc/v9.S src/sparc/ffitarget.h src/sparc/ffi.c		\
39	 src/x86/darwin64.S src/x86/ffi.c src/x86/sysv.S		\
40	 src/x86/win32.S src/x86/darwin.S src/x86/win64.S		\
41	 src/x86/freebsd.S src/x86/ffi64.c src/x86/unix64.S		\
42	 src/x86/ffitarget.h src/pa/ffitarget.h src/pa/ffi.c		\
43	 src/pa/linux.S src/pa/hpux32.S src/frv/ffi.c src/bfin/ffi.c	\
44	 src/bfin/ffitarget.h src/bfin/sysv.S src/frv/eabi.S		\
45	 src/frv/ffitarget.h src/dlmalloc.c src/tile/ffi.c		\
46	 src/tile/ffitarget.h src/tile/tile.S libtool-version		\
47	 src/vax/ffi.c src/vax/ffitarget.h src/vax/elfbsd.S		\
48	 src/xtensa/ffitarget.h src/xtensa/ffi.c src/xtensa/sysv.S	\
49	 ChangeLog.libffi m4/libtool.m4 m4/lt~obsolete.m4		\
50	 m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4			\
51	 m4/ltversion.m4 src/arm/gentramp.sh src/debug.c msvcc.sh	\
52	 generate-darwin-source-and-headers.py				\
53	 libffi.xcodeproj/project.pbxproj src/arm/trampoline.S		\
54	 libtool-ldflags ChangeLog.libffi-3.1
55
56info_TEXINFOS = doc/libffi.texi
57
58## ################################################################
59
60##
61## This section is for make and multilib madness.
62##
63
64# Work around what appears to be a GNU make bug handling MAKEFLAGS
65# values defined in terms of make variables, as is the case for CC and
66# friends when we are called from the top level Makefile.
67AM_MAKEFLAGS = \
68	'AR_FLAGS=$(AR_FLAGS)' \
69	'CC_FOR_BUILD=$(CC_FOR_BUILD)' \
70	'CFLAGS=$(CFLAGS)' \
71	'CXXFLAGS=$(CXXFLAGS)' \
72	'CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)' \
73	'CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)' \
74	'INSTALL=$(INSTALL)' \
75	'INSTALL_DATA=$(INSTALL_DATA)' \
76	'INSTALL_PROGRAM=$(INSTALL_PROGRAM)' \
77	'INSTALL_SCRIPT=$(INSTALL_SCRIPT)' \
78	'JC1FLAGS=$(JC1FLAGS)' \
79	'LDFLAGS=$(LDFLAGS)' \
80	'LIBCFLAGS=$(LIBCFLAGS)' \
81	'LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)' \
82	'MAKE=$(MAKE)' \
83	'MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)' \
84	'PICFLAG=$(PICFLAG)' \
85	'PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)' \
86	'RUNTESTFLAGS=$(RUNTESTFLAGS)' \
87	'SHELL=$(SHELL)' \
88	'exec_prefix=$(exec_prefix)' \
89	'infodir=$(infodir)' \
90	'libdir=$(libdir)' \
91	'mandir=$(mandir)' \
92	'prefix=$(prefix)' \
93	'AR=$(AR)' \
94	'AS=$(AS)' \
95	'CC=$(CC)' \
96	'CXX=$(CXX)' \
97	'LD=$(LD)' \
98	'NM=$(NM)' \
99	'RANLIB=$(RANLIB)' \
100	'DESTDIR=$(DESTDIR)'
101
102# Subdir rules rely on $(FLAGS_TO_PASS)
103FLAGS_TO_PASS = $(AM_MAKEFLAGS)
104
105MAKEOVERRIDES=
106
107toolexeclib_LTLIBRARIES = libffi.la
108noinst_LTLIBRARIES = libffi_convenience.la
109
110libffi_la_SOURCES = src/prep_cif.c src/types.c \
111		src/raw_api.c src/java_raw_api.c src/closures.c
112
113pkgconfigdir = $(libdir)/pkgconfig
114pkgconfig_DATA = libffi.pc
115
116nodist_libffi_la_SOURCES =
117
118if FFI_DEBUG
119nodist_libffi_la_SOURCES += src/debug.c
120endif
121
122if MIPS
123nodist_libffi_la_SOURCES += src/mips/ffi.c src/mips/o32.S src/mips/n32.S
124endif
125if BFIN
126nodist_libffi_la_SOURCES += src/bfin/ffi.c src/bfin/sysv.S
127endif
128if X86
129nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/sysv.S src/x86/win32.S
130endif
131if X86_FREEBSD
132nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/freebsd.S src/x86/win32.S
133endif
134if X86_WIN32
135nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/win32.S
136endif
137if X86_WIN64
138nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/win64.S
139endif
140if X86_DARWIN
141nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/darwin.S src/x86/ffi64.c src/x86/darwin64.S
142if X86_DARWIN32
143nodist_libffi_la_SOURCES += src/x86/win32.S
144endif
145endif
146if SPARC
147nodist_libffi_la_SOURCES += src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S
148endif
149if ALPHA
150nodist_libffi_la_SOURCES += src/alpha/ffi.c src/alpha/osf.S
151endif
152if IA64
153nodist_libffi_la_SOURCES += src/ia64/ffi.c src/ia64/unix.S
154endif
155if M32R
156nodist_libffi_la_SOURCES += src/m32r/sysv.S src/m32r/ffi.c
157endif
158if M68K
159nodist_libffi_la_SOURCES += src/m68k/ffi.c src/m68k/sysv.S
160endif
161if M88K
162nodist_libffi_la_SOURCES += src/m88k/ffi.c src/m88k/obsd.S
163endif
164if MOXIE
165nodist_libffi_la_SOURCES += src/moxie/ffi.c src/moxie/eabi.S
166endif
167if MICROBLAZE
168nodist_libffi_la_SOURCES += src/microblaze/ffi.c src/microblaze/sysv.S
169endif
170if NIOS2
171nodist_libffi_la_SOURCES += src/nios2/sysv.S src/nios2/ffi.c
172endif
173if OR1K
174nodist_libffi_la_SOURCES += src/or1k/sysv.S src/or1k/ffi.c
175endif
176if POWERPC
177nodist_libffi_la_SOURCES += src/powerpc/ffi.c src/powerpc/ffi_sysv.c src/powerpc/ffi_linux64.c src/powerpc/sysv.S src/powerpc/ppc_closure.S src/powerpc/linux64.S src/powerpc/linux64_closure.S
178endif
179if POWERPC_AIX
180nodist_libffi_la_SOURCES += src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_closure.S
181endif
182if POWERPC_DARWIN
183nodist_libffi_la_SOURCES += src/powerpc/ffi_darwin.c src/powerpc/darwin.S src/powerpc/darwin_closure.S
184endif
185if POWERPC_FREEBSD
186nodist_libffi_la_SOURCES += src/powerpc/ffi.c src/powerpc/ffi_sysv.c src/powerpc/sysv.S src/powerpc/ppc_closure.S
187endif
188if AARCH64
189nodist_libffi_la_SOURCES += src/aarch64/sysv.S src/aarch64/ffi.c
190endif
191if ARC
192nodist_libffi_la_SOURCES += src/arc/arcompact.S src/arc/ffi.c
193endif
194if ARM
195nodist_libffi_la_SOURCES += src/arm/sysv.S src/arm/ffi.c
196if FFI_EXEC_TRAMPOLINE_TABLE
197nodist_libffi_la_SOURCES += src/arm/trampoline.S
198endif
199endif
200if AVR32
201nodist_libffi_la_SOURCES += src/avr32/sysv.S src/avr32/ffi.c
202endif
203if LIBFFI_CRIS
204nodist_libffi_la_SOURCES += src/cris/sysv.S src/cris/ffi.c
205endif
206if FRV
207nodist_libffi_la_SOURCES += src/frv/eabi.S src/frv/ffi.c
208endif
209if S390
210nodist_libffi_la_SOURCES += src/s390/sysv.S src/s390/ffi.c
211endif
212if X86_64
213nodist_libffi_la_SOURCES += src/x86/ffi64.c src/x86/unix64.S src/x86/ffi.c src/x86/sysv.S
214endif
215if SH
216nodist_libffi_la_SOURCES += src/sh/sysv.S src/sh/ffi.c
217endif
218if SH64
219nodist_libffi_la_SOURCES += src/sh64/sysv.S src/sh64/ffi.c
220endif
221if PA_LINUX
222nodist_libffi_la_SOURCES += src/pa/linux.S src/pa/ffi.c
223endif
224if PA_HPUX
225nodist_libffi_la_SOURCES += src/pa/hpux32.S src/pa/ffi.c
226endif
227if TILE
228nodist_libffi_la_SOURCES += src/tile/tile.S src/tile/ffi.c
229endif
230if XTENSA
231nodist_libffi_la_SOURCES += src/xtensa/sysv.S src/xtensa/ffi.c
232endif
233if METAG
234nodist_libffi_la_SOURCES += src/metag/sysv.S src/metag/ffi.c
235endif
236if VAX
237nodist_libffi_la_SOURCES += src/vax/elfbsd.S src/vax/ffi.c
238endif
239
240libffi_convenience_la_SOURCES = $(libffi_la_SOURCES)
241nodist_libffi_convenience_la_SOURCES = $(nodist_libffi_la_SOURCES)
242
243LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/libtool-ldflags $(LDFLAGS))
244
245AM_CFLAGS =
246if FFI_DEBUG
247# Build debug. Define FFI_DEBUG on the commandline so that, when building with
248# MSVC, it can link against the debug CRT.
249AM_CFLAGS += -DFFI_DEBUG
250endif
251
252libffi_la_LDFLAGS = -no-undefined -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LTLDFLAGS) $(AM_LTLDFLAGS)
253
254AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
255AM_CCASFLAGS = $(AM_CPPFLAGS)
256
257dist-hook:
258	if [ -d $(top_srcdir)/.git ] ; then (cd $(top_srcdir); git log --no-decorate) ; else echo 'See git log for history.' ; fi > $(distdir)/ChangeLog
259