Xtensa support
[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         src/xtensa/ffitarget.h src/xtensa/ffi.c src/xtensa/sysv.S       \
36          ChangeLog.libffi m4/libtool.m4 m4/lt~obsolete.m4               \
37          m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4                  \
38          m4/ltversion.m4 src/arm/gentramp.sh src/debug.c msvcc.sh       \
39         generate-ios-source-and-headers.py                              \
40          generate-osx-source-and-headers.py                             \
41          libffi.xcodeproj/project.pbxproj src/arm/trampoline.S
42
43 info_TEXINFOS = doc/libffi.texi
44
45 ## ################################################################
46
47 ##
48 ## This section is for make and multilib madness.
49 ##
50
51 # Work around what appears to be a GNU make bug handling MAKEFLAGS
52 # values defined in terms of make variables, as is the case for CC and
53 # friends when we are called from the top level Makefile.
54 AM_MAKEFLAGS = \
55         "AR_FLAGS=$(AR_FLAGS)" \
56         "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
57         "CFLAGS=$(CFLAGS)" \
58         "CXXFLAGS=$(CXXFLAGS)" \
59         "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
60         "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
61         "INSTALL=$(INSTALL)" \
62         "INSTALL_DATA=$(INSTALL_DATA)" \
63         "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
64         "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
65         "JC1FLAGS=$(JC1FLAGS)" \
66         "LDFLAGS=$(LDFLAGS)" \
67         "LIBCFLAGS=$(LIBCFLAGS)" \
68         "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
69         "MAKE=$(MAKE)" \
70         "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
71         "PICFLAG=$(PICFLAG)" \
72         "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
73         "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
74         "SHELL=$(SHELL)" \
75         "exec_prefix=$(exec_prefix)" \
76         "infodir=$(infodir)" \
77         "libdir=$(libdir)" \
78         "mandir=$(mandir)" \
79         "prefix=$(prefix)" \
80         "AR=$(AR)" \
81         "AS=$(AS)" \
82         "CC=$(CC)" \
83         "CXX=$(CXX)" \
84         "LD=$(LD)" \
85         "NM=$(NM)" \
86         "RANLIB=$(RANLIB)" \
87         "DESTDIR=$(DESTDIR)"
88
89 # Subdir rules rely on $(FLAGS_TO_PASS)
90 FLAGS_TO_PASS = $(AM_MAKEFLAGS)
91
92 MAKEOVERRIDES=
93
94 toolexeclib_LTLIBRARIES = libffi.la
95 noinst_LTLIBRARIES = libffi_convenience.la
96
97 libffi_la_SOURCES = src/prep_cif.c src/types.c \
98                 src/raw_api.c src/java_raw_api.c src/closures.c
99
100 nodist_libffi_la_SOURCES =
101
102 if FFI_DEBUG
103 nodist_libffi_la_SOURCES += src/debug.c
104 endif
105
106 if MIPS
107 nodist_libffi_la_SOURCES += src/mips/ffi.c src/mips/o32.S src/mips/n32.S
108 endif
109 if BFIN
110 nodist_libffi_la_SOURCES += src/bfin/ffi.c src/bfin/sysv.S
111 endif
112 if X86
113 nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/sysv.S
114 endif
115 if X86_FREEBSD
116 nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/freebsd.S
117 endif
118 if X86_WIN32
119 nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/win32.S
120 endif
121 if X86_WIN64
122 nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/win64.S
123 endif
124 if X86_DARWIN
125 nodist_libffi_la_SOURCES += src/x86/ffi.c src/x86/darwin.S src/x86/ffi64.c src/x86/darwin64.S
126 endif
127 if SPARC
128 nodist_libffi_la_SOURCES += src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S
129 endif
130 if ALPHA
131 nodist_libffi_la_SOURCES += src/alpha/ffi.c src/alpha/osf.S
132 endif
133 if IA64
134 nodist_libffi_la_SOURCES += src/ia64/ffi.c src/ia64/unix.S
135 endif
136 if M32R
137 nodist_libffi_la_SOURCES += src/m32r/sysv.S src/m32r/ffi.c
138 endif
139 if M68K
140 nodist_libffi_la_SOURCES += src/m68k/ffi.c src/m68k/sysv.S
141 endif
142 if POWERPC
143 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
144 endif
145 if POWERPC_AIX
146 nodist_libffi_la_SOURCES += src/powerpc/ffi_darwin.c src/powerpc/aix.S src/powerpc/aix_closure.S
147 endif
148 if POWERPC_DARWIN
149 nodist_libffi_la_SOURCES += src/powerpc/ffi_darwin.c src/powerpc/darwin.S src/powerpc/darwin_closure.S
150 endif
151 if POWERPC_FREEBSD
152 nodist_libffi_la_SOURCES += src/powerpc/ffi.c src/powerpc/sysv.S src/powerpc/ppc_closure.S
153 endif
154 if AARCH64
155 nodist_libffi_la_SOURCES += src/aarch64/sysv.S src/aarch64/ffi.c
156 endif
157 if ARM
158 nodist_libffi_la_SOURCES += src/arm/sysv.S src/arm/ffi.c
159 if FFI_EXEC_TRAMPOLINE_TABLE
160 nodist_libffi_la_SOURCES += src/arm/trampoline.S
161 endif
162 endif
163 if AVR32
164 nodist_libffi_la_SOURCES += src/avr32/sysv.S src/avr32/ffi.c
165 endif
166 if LIBFFI_CRIS
167 nodist_libffi_la_SOURCES += src/cris/sysv.S src/cris/ffi.c
168 endif
169 if FRV
170 nodist_libffi_la_SOURCES += src/frv/eabi.S src/frv/ffi.c
171 endif
172 if S390
173 nodist_libffi_la_SOURCES += src/s390/sysv.S src/s390/ffi.c
174 endif
175 if X86_64
176 nodist_libffi_la_SOURCES += src/x86/ffi64.c src/x86/unix64.S src/x86/ffi.c src/x86/sysv.S
177 endif
178 if SH
179 nodist_libffi_la_SOURCES += src/sh/sysv.S src/sh/ffi.c
180 endif
181 if SH64
182 nodist_libffi_la_SOURCES += src/sh64/sysv.S src/sh64/ffi.c
183 endif
184 if PA_LINUX
185 nodist_libffi_la_SOURCES += src/pa/linux.S src/pa/ffi.c
186 endif
187 if PA_HPUX
188 nodist_libffi_la_SOURCES += src/pa/hpux32.S src/pa/ffi.c
189 endif
190 if TILE
191 nodist_libffi_la_SOURCES += src/tile/tile.S src/tile/ffi.c
192 endif
193 if XTENSA
194 nodist_libffi_la_SOURCES += src/xtensa/sysv.S src/xtensa/ffi.c
195 endif
196
197 libffi_convenience_la_SOURCES = $(libffi_la_SOURCES)
198 nodist_libffi_convenience_la_SOURCES = $(nodist_libffi_la_SOURCES)
199
200 LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
201
202 libffi_la_LDFLAGS = -no-undefined -version-info `grep -v '^\#' $(srcdir)/libtool-version` $(LTLDFLAGS) $(AM_LTLDFLAGS)
203
204 AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
205 AM_CCASFLAGS = $(AM_CPPFLAGS)
206