blob: 8a32794345ad879a1ee6890972061d635d64dd2d [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 Green9c00a3f2012-10-12 16:46:06 -04007EXTRA_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/ffitarget.h \
10 src/avr32/ffi.c src/avr32/sysv.S src/avr32/ffitarget.h \
11 src/cris/ffi.c src/cris/sysv.S src/cris/ffitarget.h \
12 src/ia64/ffi.c src/ia64/ffitarget.h src/ia64/ia64_flags.h \
13 src/ia64/unix.S src/mips/ffi.c src/mips/n32.S src/mips/o32.S \
14 src/mips/ffitarget.h src/m32r/ffi.c src/m32r/sysv.S \
15 src/m32r/ffitarget.h src/m68k/ffi.c src/m68k/sysv.S \
16 src/m68k/ffitarget.h src/powerpc/ffi.c src/powerpc/sysv.S \
17 src/powerpc/linux64.S src/powerpc/linux64_closure.S \
18 src/powerpc/ppc_closure.S src/powerpc/asm.h \
19 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/darwin.S src/x86/win64.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/bfin/ffi.c \
31 src/bfin/ffitarget.h src/bfin/sysv.S src/frv/eabi.S \
32 src/frv/ffitarget.h src/dlmalloc.c src/tile/ffi.c \
33 src/tile/ffitarget.h src/tile/tile.S libtool-version \
34 ChangeLog.libffi m4/libtool.m4 m4/lt~obsolete.m4 \
35 m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4 \
36 m4/ltversion.m4 src/arm/gentramp.sh src/debug.c msvcc.sh \
37 generate-ios-source-and-headers.py \
38 generate-osx-source-and-headers.py \
39 libffi.xcodeproj/project.pbxproj src/arm/trampoline.S
Anthony Green3b7efa42011-08-15 13:25:13 -040040
Anthony Green5cbe2052009-10-04 23:53:11 -040041info_TEXINFOS = doc/libffi.texi
Anthony Greenc6dddbd2009-10-04 08:11:33 -040042
43## ################################################################
44
45##
46## This section is for make and multilib madness.
47##
48
49# Work around what appears to be a GNU make bug handling MAKEFLAGS
50# values defined in terms of make variables, as is the case for CC and
51# friends when we are called from the top level Makefile.
52AM_MAKEFLAGS = \
53 "AR_FLAGS=$(AR_FLAGS)" \
54 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
55 "CFLAGS=$(CFLAGS)" \
56 "CXXFLAGS=$(CXXFLAGS)" \
57 "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
58 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
59 "INSTALL=$(INSTALL)" \
60 "INSTALL_DATA=$(INSTALL_DATA)" \
61 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
62 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
63 "JC1FLAGS=$(JC1FLAGS)" \
64 "LDFLAGS=$(LDFLAGS)" \
65 "LIBCFLAGS=$(LIBCFLAGS)" \
66 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
67 "MAKE=$(MAKE)" \
68 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
69 "PICFLAG=$(PICFLAG)" \
70 "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
71 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
72 "SHELL=$(SHELL)" \
73 "exec_prefix=$(exec_prefix)" \
74 "infodir=$(infodir)" \
75 "libdir=$(libdir)" \
Anthony Green3f5b1372010-07-12 14:39:18 -040076 "mandir=$(mandir)" \
Anthony Greenc6dddbd2009-10-04 08:11:33 -040077 "prefix=$(prefix)" \
78 "AR=$(AR)" \
79 "AS=$(AS)" \
80 "CC=$(CC)" \
81 "CXX=$(CXX)" \
82 "LD=$(LD)" \
83 "NM=$(NM)" \
84 "RANLIB=$(RANLIB)" \
85 "DESTDIR=$(DESTDIR)"
86
87MAKEOVERRIDES=
88
Anthony Green115ab362009-12-24 00:22:00 -050089ACLOCAL_AMFLAGS=$(ACLOCAL_AMFLAGS) -I m4
90
Anthony Green5cbe2052009-10-04 23:53:11 -040091lib_LTLIBRARIES = libffi.la
Anthony Greenc6dddbd2009-10-04 08:11:33 -040092noinst_LTLIBRARIES = libffi_convenience.la
93
Anthony Green6a6e7f82011-11-12 16:20:42 -050094libffi_la_SOURCES = src/prep_cif.c src/types.c \
Anthony Greenc6dddbd2009-10-04 08:11:33 -040095 src/raw_api.c src/java_raw_api.c src/closures.c
96
Anthony Green5cbe2052009-10-04 23:53:11 -040097pkgconfigdir = $(libdir)/pkgconfig
98pkgconfig_DATA = libffi.pc
99
Anthony Greenc6dddbd2009-10-04 08:11:33 -0400100nodist_libffi_la_SOURCES =
101
Anthony Green6a6e7f82011-11-12 16:20:42 -0500102if FFI_DEBUG
103nodist_libffi_la_SOURCES += src/debug.c
104endif
105
Anthony Greenc6dddbd2009-10-04 08:11:33 -0400106if MIPS
107nodist_libffi_la_SOURCES += src/mips/ffi.c src/mips/o32.S src/mips/n32.S
108endif
Anthony Green213ed152012-04-27 01:34:15 -0400109if BFIN
110nodist_libffi_la_SOURCES += src/bfin/ffi.c src/bfin/sysv.S
111endif
Anthony Greenc6dddbd2009-10-04 08:11:33 -0400112if X86
113nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/sysv.S
114endif
115if X86_FREEBSD
116nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/freebsd.S
117endif
118if X86_WIN32
119nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/win32.S
120endif
121if X86_WIN64
122nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/win64.S
123endif
124if X86_DARWIN
125nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/darwin.S src/x86/ffi64.c src/x86/darwin64.S
126endif
127if SPARC
128nodist_libffi_la_SOURCES += src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S
129endif
130if ALPHA
131nodist_libffi_la_SOURCES += src/alpha/ffi.c src/alpha/osf.S
132endif
133if IA64
134nodist_libffi_la_SOURCES += src/ia64/ffi.c src/ia64/unix.S
135endif
136if M32R
137nodist_libffi_la_SOURCES += src/m32r/sysv.S src/m32r/ffi.c
138endif
139if M68K
140nodist_libffi_la_SOURCES += src/m68k/ffi.c src/m68k/sysv.S
141endif
142if POWERPC
143nodist_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
144endif
145if POWERPC_AIX
146nodist_libffi_la_SOURCES += src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_closure.S
147endif
148if POWERPC_DARWIN
149nodist_libffi_la_SOURCES += src/powerpc/ffi_darwin.c src/powerpc/darwin.S src/powerpc/darwin_closure.S
150endif
151if POWERPC_FREEBSD
152nodist_libffi_la_SOURCES += src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S
153endif
154if ARM
155nodist_libffi_la_SOURCES += src/arm/sysv.S src/arm/ffi.c
Landon Fullerc71480e2010-09-19 09:02:05 -0700156if FFI_EXEC_TRAMPOLINE_TABLE
157nodist_libffi_la_SOURCES += src/arm/trampoline.S
158endif
Anthony Greenc6dddbd2009-10-04 08:11:33 -0400159endif
Anthony Green2340e7a2009-10-04 23:53:17 -0400160if AVR32
161nodist_libffi_la_SOURCES += src/avr32/sysv.S src/avr32/ffi.c
162endif
Anthony Greenc6dddbd2009-10-04 08:11:33 -0400163if LIBFFI_CRIS
164nodist_libffi_la_SOURCES += src/cris/sysv.S src/cris/ffi.c
165endif
166if FRV
167nodist_libffi_la_SOURCES += src/frv/eabi.S src/frv/ffi.c
168endif
Anthony Green3d561062011-11-12 07:20:24 -0500169if MOXIE
170nodist_libffi_la_SOURCES += src/moxie/eabi.S src/moxie/ffi.c
171endif
Anthony Greenc6dddbd2009-10-04 08:11:33 -0400172if S390
173nodist_libffi_la_SOURCES += src/s390/sysv.S src/s390/ffi.c
174endif
175if X86_64
176nodist_libffi_la_SOURCES += src/x86/ffi64.c src/x86/unix64.S src/x86/ffi.c src/x86/sysv.S
177endif
178if SH
179nodist_libffi_la_SOURCES += src/sh/sysv.S src/sh/ffi.c
180endif
181if SH64
182nodist_libffi_la_SOURCES += src/sh64/sysv.S src/sh64/ffi.c
183endif
184if PA_LINUX
185nodist_libffi_la_SOURCES += src/pa/linux.S src/pa/ffi.c
186endif
187if PA_HPUX
188nodist_libffi_la_SOURCES += src/pa/hpux32.S src/pa/ffi.c
189endif
Anthony Green9c00a3f2012-10-12 16:46:06 -0400190if TILE
191nodist_libffi_la_SOURCES += src/tile/tile.S src/tile/ffi.c
192endif
Anthony Greenc6dddbd2009-10-04 08:11:33 -0400193
194libffi_convenience_la_SOURCES = $(libffi_la_SOURCES)
195nodist_libffi_convenience_la_SOURCES = $(nodist_libffi_la_SOURCES)
196
Anthony Green7c7c9f32011-02-12 09:29:29 -0500197AM_CFLAGS = -g
Anthony Green00d0b592010-08-05 14:56:53 -0400198if FFI_DEBUG
199# Build debug. Define FFI_DEBUG on the commandline so that, when building with
200# MSVC, it can link against the debug CRT.
201AM_CFLAGS += -DFFI_DEBUG
Anthony Green00d0b592010-08-05 14:56:53 -0400202endif
Anthony Greenc6dddbd2009-10-04 08:11:33 -0400203
Anthony Greenc3042af2010-01-01 08:08:02 -0500204libffi_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LTLDFLAGS) $(AM_LTLDFLAGS)
Anthony Greenc6dddbd2009-10-04 08:11:33 -0400205
Peter Rosin0a1ab122012-03-30 08:14:08 -0400206AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src -DFFI_BUILDING
Anthony Green6a6e7f82011-11-12 16:20:42 -0500207AM_CCASFLAGS = $(AM_CPPFLAGS) -g
Anthony Greenc6dddbd2009-10-04 08:11:33 -0400208
Anthony Green5cbe2052009-10-04 23:53:11 -0400209# No install-html or install-pdf support in automake yet
210.PHONY: install-html install-pdf
211install-html:
212install-pdf: