1 ## Process this with automake to create Makefile.in
3 AUTOMAKE_OPTIONS = foreign subdir-objects info-in-builddir
5 ACLOCAL_AMFLAGS = -I .. -I ../config
7 SUBDIRS = include testsuite man
9 EXTRA_DIST = LICENSE ChangeLog.v1 ChangeLog.libgcj \
10 ChangeLog.libffi ChangeLog.libffi-3.1 \
11 m4/libtool.m4 m4/lt~obsolete.m4 \
12 m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4 \
13 m4/ltversion.m4 src/debug.c msvcc.sh \
14 generate-darwin-source-and-headers.py \
15 libffi.xcodeproj/project.pbxproj \
18 # local.exp is generated by configure
19 DISTCLEANFILES = local.exp
21 # Automake Documentation:
22 # If your package has Texinfo files in many directories, you can use the
23 # variable TEXINFO_TEX to tell Automake where to find the canonical
24 # `texinfo.tex' for your package. The value of this variable should be
25 # the relative path from the current `Makefile.am' to `texinfo.tex'.
26 TEXINFO_TEX = ../gcc/doc/include/texinfo.tex
28 # Defines info, dvi, pdf and html targets
29 MAKEINFOFLAGS = -I $(srcdir)/../gcc/doc/include
30 info_TEXINFOS = doc/libffi.texi
32 # AM_CONDITIONAL on configure option --generated-files-in-srcdir
34 STAMP_GENINSRC = stamp-geninsrc
39 # AM_CONDITIONAL on configure check ACX_CHECK_PROG_VER([MAKEINFO])
41 STAMP_BUILD_INFO = stamp-build-info
46 all-local: $(STAMP_GENINSRC)
48 stamp-geninsrc: doc/libffi.info
49 cp -p $(top_builddir)/doc/libffi.info $(srcdir)/doc/libffi.info
52 doc/libffi.info: $(STAMP_BUILD_INFO)
54 stamp-build-info: doc/libffi.texi $(srcdir)/doc/version.texi doc/$(am__dirstamp)
55 $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)/doc -o doc/libffi.info $(srcdir)/doc/libffi.texi
58 CLEANFILES = $(STAMP_GENINSRC) $(STAMP_BUILD_INFO)
59 MAINTAINERCLEANFILES = $(srcdir)/doc/libffi.info
61 ## ################################################################
64 ## This section is for make and multilib madness.
67 # Work around what appears to be a GNU make bug handling MAKEFLAGS
68 # values defined in terms of make variables, as is the case for CC and
69 # friends when we are called from the top level Makefile.
71 "AR_FLAGS=$(AR_FLAGS)" \
72 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
74 "CXXFLAGS=$(CXXFLAGS)" \
75 "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
76 "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
77 "INSTALL=$(INSTALL)" \
78 "INSTALL_DATA=$(INSTALL_DATA)" \
79 "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
80 "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
81 "JC1FLAGS=$(JC1FLAGS)" \
82 "LDFLAGS=$(LDFLAGS)" \
83 "LIBCFLAGS=$(LIBCFLAGS)" \
84 "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
86 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
87 "PICFLAG=$(PICFLAG)" \
88 "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
89 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
91 "exec_prefix=$(exec_prefix)" \
92 "infodir=$(infodir)" \
105 # Subdir rules rely on $(FLAGS_TO_PASS)
106 FLAGS_TO_PASS = $(AM_MAKEFLAGS)
110 pkgconfigdir = $(libdir)/pkgconfig
111 pkgconfig_DATA = libffi.pc
113 toolexeclib_LTLIBRARIES = libffi.la
114 noinst_LTLIBRARIES = libffi_convenience.la
116 libffi_la_SOURCES = src/prep_cif.c src/types.c \
117 src/raw_api.c src/java_raw_api.c src/closures.c
120 libffi_la_SOURCES += src/debug.c
124 src/aarch64/ffitarget.h src/aarch64/internal.h \
125 src/alpha/ffitarget.h src/alpha/internal.h \
126 src/arc/ffitarget.h \
127 src/arm/ffitarget.h src/arm/internal.h \
128 src/avr32/ffitarget.h \
129 src/bfin/ffitarget.h \
130 src/cris/ffitarget.h \
131 src/frv/ffitarget.h \
132 src/ia64/ffitarget.h src/ia64/ia64_flags.h \
133 src/m32r/ffitarget.h \
134 src/m68k/ffitarget.h \
135 src/m88k/ffitarget.h \
136 src/metag/ffitarget.h \
137 src/microblaze/ffitarget.h \
138 src/mips/ffitarget.h \
139 src/moxie/ffitarget.h \
140 src/nios2/ffitarget.h \
141 src/or1k/ffitarget.h \
143 src/powerpc/ffitarget.h src/powerpc/asm.h src/powerpc/ffi_powerpc.h \
144 src/riscv/ffitarget.h \
145 src/s390/ffitarget.h \
147 src/sh64/ffitarget.h \
148 src/sparc/ffitarget.h src/sparc/internal.h \
149 src/tile/ffitarget.h \
150 src/vax/ffitarget.h \
151 src/x86/ffitarget.h src/x86/internal.h src/x86/internal64.h \
152 src/xtensa/ffitarget.h \
155 EXTRA_libffi_la_SOURCES = \
156 src/aarch64/ffi.c src/aarch64/sysv.S \
157 src/alpha/ffi.c src/alpha/osf.S \
158 src/arc/ffi.c src/arc/arcompact.S \
159 src/arm/ffi.c src/arm/sysv.S \
160 src/avr32/ffi.c src/avr32/sysv.S \
161 src/bfin/ffi.c src/bfin/sysv.S \
162 src/cris/ffi.c src/cris/sysv.S \
163 src/frv/ffi.c src/frv/eabi.S \
164 src/ia64/ffi.c src/ia64/unix.S \
165 src/m32r/ffi.c src/m32r/sysv.S \
166 src/m68k/ffi.c src/m68k/sysv.S \
167 src/m88k/ffi.c src/m88k/obsd.S \
168 src/metag/ffi.c src/metag/sysv.S \
169 src/microblaze/ffi.c src/microblaze/sysv.S \
170 src/mips/ffi.c src/mips/o32.S src/mips/n32.S \
171 src/moxie/ffi.c src/moxie/eabi.S \
172 src/nios2/ffi.c src/nios2/sysv.S \
173 src/or1k/ffi.c src/or1k/sysv.S \
174 src/pa/ffi.c src/pa/linux.S src/pa/hpux32.S \
175 src/powerpc/ffi.c src/powerpc/ffi_sysv.c src/powerpc/ffi_linux64.c \
176 src/powerpc/sysv.S src/powerpc/linux64.S \
177 src/powerpc/linux64_closure.S src/powerpc/ppc_closure.S \
178 src/powerpc/aix.S src/powerpc/darwin.S src/powerpc/aix_closure.S \
179 src/powerpc/darwin_closure.S src/powerpc/ffi_darwin.c \
180 src/riscv/ffi.c src/riscv/sysv.S \
181 src/s390/ffi.c src/s390/sysv.S \
182 src/sh/ffi.c src/sh/sysv.S \
183 src/sh64/ffi.c src/sh64/sysv.S \
184 src/sparc/ffi.c src/sparc/ffi64.c src/sparc/v8.S src/sparc/v9.S \
185 src/tile/ffi.c src/tile/tile.S \
186 src/vax/ffi.c src/vax/elfbsd.S \
187 src/x86/ffi.c src/x86/sysv.S \
188 src/x86/ffiw64.c src/x86/win64.S \
189 src/x86/ffi64.c src/x86/unix64.S \
190 src/x86/darwin64.S src/x86/darwin.S \
191 src/x86/darwin64_c.c src/x86/darwin_c.c \
192 src/xtensa/ffi.c src/xtensa/sysv.S
194 TARGET_OBJ = @TARGET_OBJ@
195 libffi_la_LIBADD = $(TARGET_OBJ)
197 libffi_convenience_la_SOURCES = $(libffi_la_SOURCES)
198 EXTRA_libffi_convenience_la_SOURCES = $(EXTRA_libffi_la_SOURCES)
199 libffi_convenience_la_LIBADD = $(libffi_la_LIBADD)
200 libffi_convenience_la_DEPENDENCIES = $(libffi_la_DEPENDENCIES)
201 nodist_libffi_convenience_la_SOURCES = $(nodist_libffi_la_SOURCES)
203 LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
205 AM_CFLAGS = -Wall -g -fexceptions
207 # Build debug. Define FFI_DEBUG on the commandline so that, when building with
208 # MSVC, it can link against the debug CRT.
209 AM_CFLAGS += -DFFI_DEBUG
212 if LIBAT_BUILD_VERSIONED_SHLIB
213 if LIBAT_BUILD_VERSIONED_SHLIB_GNU
214 libffi_version_script = -Wl,--version-script,libffi.map
215 libffi_version_dep = libffi.map
217 if LIBAT_BUILD_VERSIONED_SHLIB_SUN
218 libffi_version_script = -Wl,-M,libffi.map-sun
219 libffi_version_dep = libffi.map-sun
220 libffi.map-sun : libffi.map $(top_srcdir)/../contrib/make_sunver.pl \
221 $(libffi_la_OBJECTS) $(libffi_la_LIBADD)
222 perl $(top_srcdir)/../contrib/make_sunver.pl libffi.map \
223 `echo $(libffi_la_OBJECTS) $(libffi_la_LIBADD) | \
224 sed 's,\([^/ ]*\)\.l\([ao]\),.libs/\1.\2,g'` \
225 > $@ || (rm -f $@ ; exit 1)
228 libffi_version_script =
231 libffi_version_info = -version-info `grep -v '^\#' $(srcdir)/libtool-version`
233 libffi.map: $(top_srcdir)/libffi.map.in
234 $(COMPILE) -D$(TARGET) -E -x assembler-with-cpp -o $@ $<
236 libffi_la_LDFLAGS = -no-undefined $(libffi_version_info) $(libffi_version_script) $(LTLDFLAGS) $(AM_LTLDFLAGS)
237 libffi_la_DEPENDENCIES = $(libffi_la_LIBADD) $(libffi_version_dep)
239 AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
240 AM_CCASFLAGS = $(AM_CPPFLAGS)
242 # Multilib support. Automake should provide these on its own.
243 all-recursive: all-multi
244 install-recursive: install-multi
245 mostlyclean-recursive: mostlyclean-multi
246 clean-recursive: clean-multi
247 distclean-recursive: distclean-multi
248 maintainer-clean-recursive: maintainer-clean-multi
250 include $(top_srcdir)/../multilib.am