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