1 ## Process this with automake to create Makefile.in
3 AUTOMAKE_OPTIONS = foreign subdir-objects
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 # Automake Documentation:
19 # If your package has Texinfo files in many directories, you can use the
20 # variable TEXINFO_TEX to tell Automake where to find the canonical
21 # `texinfo.tex' for your package. The value of this variable should be
22 # the relative path from the current `Makefile.am' to `texinfo.tex'.
23 TEXINFO_TEX = ../gcc/doc/include/texinfo.tex
25 # Defines info, dvi, pdf and html targets
26 MAKEINFOFLAGS = -I $(srcdir)/../gcc/doc/include
27 info_TEXINFOS = doc/libffi.texi
29 # AM_CONDITIONAL on configure option --generated-files-in-srcdir
31 STAMP_GENINSRC = stamp-geninsrc
36 # AM_CONDITIONAL on configure check ACX_CHECK_PROG_VER([MAKEINFO])
38 STAMP_BUILD_INFO = stamp-build-info
43 all-local: $(STAMP_GENINSRC)
45 stamp-geninsrc: doc/libffi.info
46 cp -p $(top_builddir)/doc/libffi.info $(srcdir)/doc/libffi.info
49 doc/libffi.info: $(STAMP_BUILD_INFO)
51 stamp-build-info: doc/libffi.texi $(srcdir)/doc/version.texi doc/$(am__dirstamp)
52 $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)/doc -o doc/libffi.info $(srcdir)/doc/libffi.texi
55 CLEANFILES = $(STAMP_GENINSRC) $(STAMP_BUILD_INFO) doc/libffi.info
56 MAINTAINERCLEANFILES = $(srcdir)/doc/libffi.info
58 ## ################################################################
61 ## This section is for make and multilib madness.
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.
68 "AR_FLAGS=$(AR_FLAGS)" \
69 "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
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)" \
83 "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
84 "PICFLAG=$(PICFLAG)" \
85 "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
86 "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
88 "exec_prefix=$(exec_prefix)" \
89 "infodir=$(infodir)" \
102 # Subdir rules rely on $(FLAGS_TO_PASS)
103 FLAGS_TO_PASS = $(AM_MAKEFLAGS)
107 pkgconfigdir = $(libdir)/pkgconfig
108 pkgconfig_DATA = libffi.pc
110 toolexeclib_LTLIBRARIES = libffi.la
111 noinst_LTLIBRARIES = libffi_convenience.la
113 libffi_la_SOURCES = src/prep_cif.c src/types.c \
114 src/raw_api.c src/java_raw_api.c src/closures.c
117 libffi_la_SOURCES += src/debug.c
121 src/aarch64/ffitarget.h src/aarch64/internal.h \
122 src/alpha/ffitarget.h src/alpha/internal.h \
123 src/arc/ffitarget.h \
124 src/arm/ffitarget.h src/arm/internal.h \
125 src/avr32/ffitarget.h \
126 src/bfin/ffitarget.h \
127 src/cris/ffitarget.h \
128 src/frv/ffitarget.h \
129 src/ia64/ffitarget.h src/ia64/ia64_flags.h \
130 src/m32r/ffitarget.h \
131 src/m68k/ffitarget.h \
132 src/m88k/ffitarget.h \
133 src/metag/ffitarget.h \
134 src/microblaze/ffitarget.h \
135 src/mips/ffitarget.h \
136 src/moxie/ffitarget.h \
137 src/nios2/ffitarget.h \
138 src/or1k/ffitarget.h \
140 src/powerpc/ffitarget.h src/powerpc/asm.h src/powerpc/ffi_powerpc.h \
141 src/riscv/ffitarget.h \
142 src/s390/ffitarget.h \
144 src/sh64/ffitarget.h \
145 src/sparc/ffitarget.h src/sparc/internal.h \
146 src/tile/ffitarget.h \
147 src/vax/ffitarget.h \
148 src/x86/ffitarget.h src/x86/internal.h src/x86/internal64.h \
149 src/xtensa/ffitarget.h \
152 EXTRA_libffi_la_SOURCES = \
153 src/aarch64/ffi.c src/aarch64/sysv.S \
154 src/alpha/ffi.c src/alpha/osf.S \
155 src/arc/ffi.c src/arc/arcompact.S \
156 src/arm/ffi.c src/arm/sysv.S \
157 src/avr32/ffi.c src/avr32/sysv.S \
158 src/bfin/ffi.c src/bfin/sysv.S \
159 src/cris/ffi.c src/cris/sysv.S \
160 src/frv/ffi.c src/frv/eabi.S \
161 src/ia64/ffi.c src/ia64/unix.S \
162 src/m32r/ffi.c src/m32r/sysv.S \
163 src/m68k/ffi.c src/m68k/sysv.S \
164 src/m88k/ffi.c src/m88k/obsd.S \
165 src/metag/ffi.c src/metag/sysv.S \
166 src/microblaze/ffi.c src/microblaze/sysv.S \
167 src/mips/ffi.c src/mips/o32.S src/mips/n32.S \
168 src/moxie/ffi.c src/moxie/eabi.S \
169 src/nios2/ffi.c src/nios2/sysv.S \
170 src/or1k/ffi.c src/or1k/sysv.S \
171 src/pa/ffi.c src/pa/linux.S src/pa/hpux32.S \
172 src/powerpc/ffi.c src/powerpc/ffi_sysv.c src/powerpc/ffi_linux64.c \
173 src/powerpc/sysv.S src/powerpc/linux64.S \
174 src/powerpc/linux64_closure.S src/powerpc/ppc_closure.S \
175 src/powerpc/aix.S src/powerpc/darwin.S src/powerpc/aix_closure.S \
176 src/powerpc/darwin_closure.S src/powerpc/ffi_darwin.c \
177 src/riscv/ffi.c src/riscv/sysv.S \
178 src/s390/ffi.c src/s390/sysv.S \
179 src/sh/ffi.c src/sh/sysv.S \
180 src/sh64/ffi.c src/sh64/sysv.S \
181 src/sparc/ffi.c src/sparc/ffi64.c src/sparc/v8.S src/sparc/v9.S \
182 src/tile/ffi.c src/tile/tile.S \
183 src/vax/ffi.c src/vax/elfbsd.S \
184 src/x86/ffi.c src/x86/sysv.S \
185 src/x86/ffiw64.c src/x86/win64.S \
186 src/x86/ffi64.c src/x86/unix64.S \
187 src/x86/darwin64.S src/x86/darwin.S \
188 src/x86/darwin64_c.c src/x86/darwin_c.c \
189 src/xtensa/ffi.c src/xtensa/sysv.S
191 TARGET_OBJ = @TARGET_OBJ@
192 libffi_la_LIBADD = $(TARGET_OBJ)
194 libffi_convenience_la_SOURCES = $(libffi_la_SOURCES)
195 EXTRA_libffi_convenience_la_SOURCES = $(EXTRA_libffi_la_SOURCES)
196 libffi_convenience_la_LIBADD = $(libffi_la_LIBADD)
197 libffi_convenience_la_DEPENDENCIES = $(libffi_la_DEPENDENCIES)
198 nodist_libffi_convenience_la_SOURCES = $(nodist_libffi_la_SOURCES)
200 LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
202 AM_CFLAGS = -Wall -g -fexceptions
204 # Build debug. Define FFI_DEBUG on the commandline so that, when building with
205 # MSVC, it can link against the debug CRT.
206 AM_CFLAGS += -DFFI_DEBUG
209 if LIBAT_BUILD_VERSIONED_SHLIB
210 if LIBAT_BUILD_VERSIONED_SHLIB_GNU
211 libffi_version_script = -Wl,--version-script,libffi.map
212 libffi_version_dep = libffi.map
214 if LIBAT_BUILD_VERSIONED_SHLIB_SUN
215 libffi_version_script = -Wl,-M,libffi.map-sun
216 libffi_version_dep = libffi.map-sun
217 libffi.map-sun : libffi.map $(top_srcdir)/../contrib/make_sunver.pl \
218 $(libffi_la_OBJECTS) $(libffi_la_LIBADD)
219 perl $(top_srcdir)/../contrib/make_sunver.pl libffi.map \
220 `echo $(libffi_la_OBJECTS) $(libffi_la_LIBADD) | \
221 sed 's,\([^/ ]*\)\.l\([ao]\),.libs/\1.\2,g'` \
222 > $@ || (rm -f $@ ; exit 1)
225 libffi_version_script =
228 libffi_version_info = -version-info `grep -v '^\#' $(srcdir)/libtool-version`
230 libffi.map: $(top_srcdir)/libffi.map.in
231 $(COMPILE) -D$(TARGET) -E -x assembler-with-cpp -o $@ $<
233 libffi_la_LDFLAGS = -no-undefined $(libffi_version_info) $(libffi_version_script) $(LTLDFLAGS) $(AM_LTLDFLAGS)
234 libffi_la_DEPENDENCIES = $(libffi_la_LIBADD) $(libffi_version_dep)
236 AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
237 AM_CCASFLAGS = $(AM_CPPFLAGS)
239 # Multilib support. Automake should provide these on its own.
240 all-recursive: all-multi
241 install-recursive: install-multi
242 mostlyclean-recursive: mostlyclean-multi
243 clean-recursive: clean-multi
244 distclean-recursive: distclean-multi
245 maintainer-clean-recursive: maintainer-clean-multi