Merge pull request #75 from joshtriplett/longdouble
[libffi.git] / Makefile.am
1 ## Process this with automake to create Makefile.in
2
3 AUTOMAKE_OPTIONS = foreign subdir-objects
4
5 ACLOCAL_AMFLAGS = -I m4
6
7 SUBDIRS = include testsuite man
8
9 EXTRA_DIST = LICENSE ChangeLog.v1 ChangeLog.libgcj configure.host       \
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/powerpc/ffi.c src/powerpc/ffi_powerpc.h                    \
28          src/powerpc/ffi_sysv.c src/powerpc/ffi_linux64.c               \
29          src/powerpc/sysv.S src/powerpc/linux64.S                       \
30          src/powerpc/linux64_closure.S src/powerpc/ppc_closure.S        \
31          src/powerpc/asm.h src/powerpc/aix.S src/powerpc/darwin.S       \
32          src/powerpc/aix_closure.S src/powerpc/darwin_closure.S         \
33          src/powerpc/ffi_darwin.c src/powerpc/ffitarget.h               \
34          src/s390/ffi.c src/s390/sysv.S src/s390/ffitarget.h            \
35          src/sh/ffi.c src/sh/sysv.S src/sh/ffitarget.h src/sh64/ffi.c   \
36          src/sh64/sysv.S src/sh64/ffitarget.h src/sparc/v8.S            \
37          src/sparc/v9.S src/sparc/ffitarget.h src/sparc/ffi.c           \
38          src/x86/darwin64.S src/x86/ffi.c src/x86/sysv.S                \
39          src/x86/win32.S src/x86/darwin.S src/x86/win64.S               \
40          src/x86/freebsd.S src/x86/ffi64.c src/x86/unix64.S             \
41          src/x86/ffitarget.h src/pa/ffitarget.h src/pa/ffi.c            \
42          src/pa/linux.S src/pa/hpux32.S src/frv/ffi.c src/bfin/ffi.c    \
43          src/bfin/ffitarget.h src/bfin/sysv.S src/frv/eabi.S            \
44          src/frv/ffitarget.h src/dlmalloc.c src/tile/ffi.c              \
45          src/tile/ffitarget.h src/tile/tile.S libtool-version           \
46          src/vax/ffi.c src/vax/ffitarget.h src/vax/elfbsd.S             \
47          src/xtensa/ffitarget.h src/xtensa/ffi.c src/xtensa/sysv.S      \
48          ChangeLog.libffi m4/libtool.m4 m4/lt~obsolete.m4               \
49          m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4                  \
50          m4/ltversion.m4 src/arm/gentramp.sh src/debug.c msvcc.sh       \
51          generate-ios-source-and-headers.py                             \
52          generate-osx-source-and-headers.py                             \
53          libffi.xcodeproj/project.pbxproj src/arm/trampoline.S          \
54          libtool-ldflags
55
56 info_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.
67 AM_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)
103 FLAGS_TO_PASS = $(AM_MAKEFLAGS)
104
105 MAKEOVERRIDES=
106
107 toolexeclib_LTLIBRARIES = libffi.la
108 noinst_LTLIBRARIES = libffi_convenience.la
109
110 libffi_la_SOURCES = src/prep_cif.c src/types.c \
111                 src/raw_api.c src/java_raw_api.c src/closures.c
112
113 pkgconfigdir = $(libdir)/pkgconfig
114 pkgconfig_DATA = libffi.pc
115
116 nodist_libffi_la_SOURCES =
117
118 if FFI_DEBUG
119 nodist_libffi_la_SOURCES += src/debug.c
120 endif
121
122 if MIPS
123 nodist_libffi_la_SOURCES += src/mips/ffi.c src/mips/o32.S src/mips/n32.S
124 endif
125 if BFIN
126 nodist_libffi_la_SOURCES += src/bfin/ffi.c src/bfin/sysv.S
127 endif
128 if X86
129 nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/sysv.S
130 endif
131 if X86_FREEBSD
132 nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/freebsd.S
133 endif
134 if X86_WIN32
135 nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/win32.S
136 endif
137 if X86_WIN64
138 nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/win64.S
139 endif
140 if X86_DARWIN
141 nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/darwin.S src/x86/ffi64.c src/x86/darwin64.S
142 endif
143 if SPARC
144 nodist_libffi_la_SOURCES += src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S
145 endif
146 if ALPHA
147 nodist_libffi_la_SOURCES += src/alpha/ffi.c src/alpha/osf.S
148 endif
149 if IA64
150 nodist_libffi_la_SOURCES += src/ia64/ffi.c src/ia64/unix.S
151 endif
152 if M32R
153 nodist_libffi_la_SOURCES += src/m32r/sysv.S src/m32r/ffi.c
154 endif
155 if M68K
156 nodist_libffi_la_SOURCES += src/m68k/ffi.c src/m68k/sysv.S
157 endif
158 if M88K
159 nodist_libffi_la_SOURCES += src/m88k/ffi.c src/m88k/obsd.S
160 endif
161 if MOXIE
162 nodist_libffi_la_SOURCES += src/moxie/ffi.c src/moxie/eabi.S
163 endif
164 if MICROBLAZE
165 nodist_libffi_la_SOURCES += src/microblaze/ffi.c src/microblaze/sysv.S
166 endif
167 if NIOS2
168 nodist_libffi_la_SOURCES += src/nios2/sysv.S src/nios2/ffi.c
169 endif
170 if POWERPC
171 nodist_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
172 endif
173 if POWERPC_AIX
174 nodist_libffi_la_SOURCES += src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_closure.S
175 endif
176 if POWERPC_DARWIN
177 nodist_libffi_la_SOURCES += src/powerpc/ffi_darwin.c src/powerpc/darwin.S src/powerpc/darwin_closure.S
178 endif
179 if POWERPC_FREEBSD
180 nodist_libffi_la_SOURCES += src/powerpc/ffi.c src/powerpc/ffi_sysv.c src/powerpc/sysv.S src/powerpc/ppc_closure.S
181 endif
182 if AARCH64
183 nodist_libffi_la_SOURCES += src/aarch64/sysv.S src/aarch64/ffi.c
184 endif
185 if ARC
186 nodist_libffi_la_SOURCES += src/arc/arcompact.S src/arc/ffi.c
187 endif
188 if ARM
189 nodist_libffi_la_SOURCES += src/arm/sysv.S src/arm/ffi.c
190 if FFI_EXEC_TRAMPOLINE_TABLE
191 nodist_libffi_la_SOURCES += src/arm/trampoline.S
192 endif
193 endif
194 if AVR32
195 nodist_libffi_la_SOURCES += src/avr32/sysv.S src/avr32/ffi.c
196 endif
197 if LIBFFI_CRIS
198 nodist_libffi_la_SOURCES += src/cris/sysv.S src/cris/ffi.c
199 endif
200 if FRV
201 nodist_libffi_la_SOURCES += src/frv/eabi.S src/frv/ffi.c
202 endif
203 if S390
204 nodist_libffi_la_SOURCES += src/s390/sysv.S src/s390/ffi.c
205 endif
206 if X86_64
207 nodist_libffi_la_SOURCES += src/x86/ffi64.c src/x86/unix64.S src/x86/ffi.c src/x86/sysv.S
208 endif
209 if SH
210 nodist_libffi_la_SOURCES += src/sh/sysv.S src/sh/ffi.c
211 endif
212 if SH64
213 nodist_libffi_la_SOURCES += src/sh64/sysv.S src/sh64/ffi.c
214 endif
215 if PA_LINUX
216 nodist_libffi_la_SOURCES += src/pa/linux.S src/pa/ffi.c
217 endif
218 if PA_HPUX
219 nodist_libffi_la_SOURCES += src/pa/hpux32.S src/pa/ffi.c
220 endif
221 if TILE
222 nodist_libffi_la_SOURCES += src/tile/tile.S src/tile/ffi.c
223 endif
224 if XTENSA
225 nodist_libffi_la_SOURCES += src/xtensa/sysv.S src/xtensa/ffi.c
226 endif
227 if METAG
228 nodist_libffi_la_SOURCES += src/metag/sysv.S src/metag/ffi.c
229 endif
230 if VAX
231 nodist_libffi_la_SOURCES += src/vax/elfbsd.S src/vax/ffi.c
232 endif
233
234 libffi_convenience_la_SOURCES = $(libffi_la_SOURCES)
235 nodist_libffi_convenience_la_SOURCES = $(nodist_libffi_la_SOURCES)
236
237 LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/libtool-ldflags $(LDFLAGS))
238
239 libffi_la_LDFLAGS = -no-undefined -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LTLDFLAGS) $(AM_LTLDFLAGS)
240
241 AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
242 AM_CCASFLAGS = $(AM_CPPFLAGS)
243