Anthony Green | c6dddbd | 2009-10-04 08:11:33 -0400 | [diff] [blame] | 1 | ## Process this with automake to create Makefile.in |
| 2 | |
| 3 | AUTOMAKE_OPTIONS = foreign subdir-objects |
Anthony Green | c6dddbd | 2009-10-04 08:11:33 -0400 | [diff] [blame] | 4 | |
Anthony Green | ed6ae95 | 2013-02-07 16:43:36 -0500 | [diff] [blame] | 5 | ACLOCAL_AMFLAGS = -I m4 |
| 6 | |
Anthony Green | c6dddbd | 2009-10-04 08:11:33 -0400 | [diff] [blame] | 7 | SUBDIRS = include testsuite man |
Tom Tromey | 6dd5fd5 | 2016-02-22 15:34:39 -0700 | [diff] [blame] | 8 | if BUILD_DOCS |
| 9 | ## This hack is needed because it doesn't seem possible to make a |
| 10 | ## conditional info_TEXINFOS in Automake. At least Automake 1.14 |
| 11 | ## either gives errors -- if this attempted in the most |
| 12 | ## straightforward way -- or simply unconditionally tries to build the |
| 13 | ## info file. |
| 14 | SUBDIRS += doc |
| 15 | endif |
Anthony Green | c6dddbd | 2009-10-04 08:11:33 -0400 | [diff] [blame] | 16 | |
Josh Triplett | a86bd31 | 2014-03-16 06:58:59 -0700 | [diff] [blame] | 17 | EXTRA_DIST = LICENSE ChangeLog.v1 ChangeLog.libgcj \ |
Richard Henderson | 5d69d57 | 2014-11-13 13:50:39 +0100 | [diff] [blame] | 18 | ChangeLog.libffi ChangeLog.libffi-3.1 \ |
| 19 | m4/libtool.m4 m4/lt~obsolete.m4 \ |
Anthony Green | 9c00a3f | 2012-10-12 16:46:06 -0400 | [diff] [blame] | 20 | m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4 \ |
Richard Henderson | a4b785e | 2014-10-17 02:07:32 -0400 | [diff] [blame] | 21 | m4/ltversion.m4 src/debug.c msvcc.sh \ |
Richard Henderson | 5d69d57 | 2014-11-13 13:50:39 +0100 | [diff] [blame] | 22 | generate-darwin-source-and-headers.py \ |
| 23 | libffi.xcodeproj/project.pbxproj \ |
| 24 | libtool-ldflags |
Anthony Green | 3b7efa4 | 2011-08-15 13:25:13 -0400 | [diff] [blame] | 25 | |
Moritz Angermann | 6b6df1a | 2017-10-01 12:37:53 +0800 | [diff] [blame] | 26 | # local.exp is generated by configure |
Moritz Angermann | 6cf0dea | 2017-10-02 10:20:16 +0800 | [diff] [blame^] | 27 | DISTCLEANFILES = local.exp |
Havard Graff | fa7a257 | 2015-05-12 10:45:13 +0200 | [diff] [blame] | 28 | |
Anthony Green | c6dddbd | 2009-10-04 08:11:33 -0400 | [diff] [blame] | 29 | ## ################################################################ |
| 30 | |
| 31 | ## |
| 32 | ## This section is for make and multilib madness. |
| 33 | ## |
| 34 | |
| 35 | # Work around what appears to be a GNU make bug handling MAKEFLAGS |
| 36 | # values defined in terms of make variables, as is the case for CC and |
| 37 | # friends when we are called from the top level Makefile. |
| 38 | AM_MAKEFLAGS = \ |
Ryan VanderMeulen | 46c5d3c | 2014-03-16 21:16:08 -0400 | [diff] [blame] | 39 | 'AR_FLAGS=$(AR_FLAGS)' \ |
| 40 | 'CC_FOR_BUILD=$(CC_FOR_BUILD)' \ |
| 41 | 'CFLAGS=$(CFLAGS)' \ |
| 42 | 'CXXFLAGS=$(CXXFLAGS)' \ |
| 43 | 'CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)' \ |
| 44 | 'CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)' \ |
| 45 | 'INSTALL=$(INSTALL)' \ |
| 46 | 'INSTALL_DATA=$(INSTALL_DATA)' \ |
| 47 | 'INSTALL_PROGRAM=$(INSTALL_PROGRAM)' \ |
| 48 | 'INSTALL_SCRIPT=$(INSTALL_SCRIPT)' \ |
| 49 | 'JC1FLAGS=$(JC1FLAGS)' \ |
| 50 | 'LDFLAGS=$(LDFLAGS)' \ |
| 51 | 'LIBCFLAGS=$(LIBCFLAGS)' \ |
| 52 | 'LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)' \ |
| 53 | 'MAKE=$(MAKE)' \ |
| 54 | 'MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)' \ |
| 55 | 'PICFLAG=$(PICFLAG)' \ |
| 56 | 'PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)' \ |
| 57 | 'RUNTESTFLAGS=$(RUNTESTFLAGS)' \ |
| 58 | 'SHELL=$(SHELL)' \ |
| 59 | 'exec_prefix=$(exec_prefix)' \ |
| 60 | 'infodir=$(infodir)' \ |
| 61 | 'libdir=$(libdir)' \ |
| 62 | 'mandir=$(mandir)' \ |
| 63 | 'prefix=$(prefix)' \ |
| 64 | 'AR=$(AR)' \ |
| 65 | 'AS=$(AS)' \ |
| 66 | 'CC=$(CC)' \ |
| 67 | 'CXX=$(CXX)' \ |
| 68 | 'LD=$(LD)' \ |
| 69 | 'NM=$(NM)' \ |
| 70 | 'RANLIB=$(RANLIB)' \ |
| 71 | 'DESTDIR=$(DESTDIR)' |
Anthony Green | c6dddbd | 2009-10-04 08:11:33 -0400 | [diff] [blame] | 72 | |
Anthony Green | 981c32e | 2013-01-02 07:34:03 -0500 | [diff] [blame] | 73 | # Subdir rules rely on $(FLAGS_TO_PASS) |
| 74 | FLAGS_TO_PASS = $(AM_MAKEFLAGS) |
| 75 | |
Anthony Green | c6dddbd | 2009-10-04 08:11:33 -0400 | [diff] [blame] | 76 | MAKEOVERRIDES= |
| 77 | |
Richard Henderson | 5d69d57 | 2014-11-13 13:50:39 +0100 | [diff] [blame] | 78 | pkgconfigdir = $(libdir)/pkgconfig |
| 79 | pkgconfig_DATA = libffi.pc |
| 80 | |
Anthony Green | 981c32e | 2013-01-02 07:34:03 -0500 | [diff] [blame] | 81 | toolexeclib_LTLIBRARIES = libffi.la |
Anthony Green | c6dddbd | 2009-10-04 08:11:33 -0400 | [diff] [blame] | 82 | noinst_LTLIBRARIES = libffi_convenience.la |
Anthony Green | f88118b | 2013-07-02 15:51:27 -0400 | [diff] [blame] | 83 | |
| 84 | libffi_la_SOURCES = src/prep_cif.c src/types.c \ |
| 85 | src/raw_api.c src/java_raw_api.c src/closures.c |
Anthony Green | c6dddbd | 2009-10-04 08:11:33 -0400 | [diff] [blame] | 86 | |
Anthony Green | 6a6e7f8 | 2011-11-12 16:20:42 -0500 | [diff] [blame] | 87 | if FFI_DEBUG |
Richard Henderson | 5d69d57 | 2014-11-13 13:50:39 +0100 | [diff] [blame] | 88 | libffi_la_SOURCES += src/debug.c |
Anthony Green | 6a6e7f8 | 2011-11-12 16:20:42 -0500 | [diff] [blame] | 89 | endif |
| 90 | |
Richard Henderson | 5d69d57 | 2014-11-13 13:50:39 +0100 | [diff] [blame] | 91 | noinst_HEADERS = \ |
| 92 | src/aarch64/ffitarget.h src/aarch64/internal.h \ |
| 93 | src/alpha/ffitarget.h src/alpha/internal.h \ |
| 94 | src/arc/ffitarget.h \ |
| 95 | src/arm/ffitarget.h src/arm/internal.h \ |
| 96 | src/avr32/ffitarget.h \ |
| 97 | src/bfin/ffitarget.h \ |
| 98 | src/cris/ffitarget.h \ |
| 99 | src/frv/ffitarget.h \ |
| 100 | src/ia64/ffitarget.h src/ia64/ia64_flags.h \ |
| 101 | src/m32r/ffitarget.h \ |
| 102 | src/m68k/ffitarget.h \ |
| 103 | src/m88k/ffitarget.h \ |
| 104 | src/metag/ffitarget.h \ |
| 105 | src/microblaze/ffitarget.h \ |
| 106 | src/mips/ffitarget.h \ |
| 107 | src/moxie/ffitarget.h \ |
| 108 | src/nios2/ffitarget.h \ |
| 109 | src/or1k/ffitarget.h \ |
| 110 | src/pa/ffitarget.h \ |
| 111 | src/powerpc/ffitarget.h src/powerpc/asm.h src/powerpc/ffi_powerpc.h \ |
| 112 | src/s390/ffitarget.h \ |
| 113 | src/sh/ffitarget.h \ |
| 114 | src/sh64/ffitarget.h \ |
| 115 | src/sparc/ffitarget.h src/sparc/internal.h \ |
| 116 | src/tile/ffitarget.h \ |
| 117 | src/vax/ffitarget.h \ |
| 118 | src/x86/ffitarget.h src/x86/internal.h src/x86/internal64.h \ |
| 119 | src/xtensa/ffitarget.h \ |
| 120 | src/dlmalloc.c |
| 121 | |
| 122 | EXTRA_libffi_la_SOURCES = \ |
| 123 | src/aarch64/ffi.c src/aarch64/sysv.S \ |
| 124 | src/alpha/ffi.c src/alpha/osf.S \ |
| 125 | src/arc/ffi.c src/arc/arcompact.S \ |
| 126 | src/arm/ffi.c src/arm/sysv.S \ |
| 127 | src/avr32/ffi.c src/avr32/sysv.S \ |
| 128 | src/bfin/ffi.c src/bfin/sysv.S \ |
| 129 | src/cris/ffi.c src/cris/sysv.S \ |
| 130 | src/frv/ffi.c src/frv/eabi.S \ |
| 131 | src/ia64/ffi.c src/ia64/unix.S \ |
| 132 | src/m32r/ffi.c src/m32r/sysv.S \ |
| 133 | src/m68k/ffi.c src/m68k/sysv.S \ |
| 134 | src/m88k/ffi.c src/m88k/obsd.S \ |
| 135 | src/metag/ffi.c src/metag/sysv.S \ |
| 136 | src/microblaze/ffi.c src/microblaze/sysv.S \ |
| 137 | src/mips/ffi.c src/mips/o32.S src/mips/n32.S \ |
| 138 | src/moxie/ffi.c src/moxie/eabi.S \ |
| 139 | src/nios2/ffi.c src/nios2/sysv.S \ |
| 140 | src/or1k/ffi.c src/or1k/sysv.S \ |
| 141 | src/pa/ffi.c src/pa/linux.S src/pa/hpux32.S \ |
| 142 | src/powerpc/ffi.c src/powerpc/ffi_sysv.c src/powerpc/ffi_linux64.c \ |
| 143 | src/powerpc/sysv.S src/powerpc/linux64.S \ |
| 144 | src/powerpc/linux64_closure.S src/powerpc/ppc_closure.S \ |
| 145 | src/powerpc/aix.S src/powerpc/darwin.S src/powerpc/aix_closure.S \ |
| 146 | src/powerpc/darwin_closure.S src/powerpc/ffi_darwin.c \ |
| 147 | src/s390/ffi.c src/s390/sysv.S \ |
| 148 | src/sh/ffi.c src/sh/sysv.S \ |
| 149 | src/sh64/ffi.c src/sh64/sysv.S \ |
| 150 | src/sparc/ffi.c src/sparc/ffi64.c src/sparc/v8.S src/sparc/v9.S \ |
| 151 | src/tile/ffi.c src/tile/tile.S \ |
| 152 | src/vax/ffi.c src/vax/elfbsd.S \ |
| 153 | src/x86/ffi.c src/x86/sysv.S \ |
| 154 | src/x86/ffiw64.c src/x86/win64.S \ |
| 155 | src/x86/ffi64.c src/x86/unix64.S \ |
Richard Henderson | 5d69d57 | 2014-11-13 13:50:39 +0100 | [diff] [blame] | 156 | src/xtensa/ffi.c src/xtensa/sysv.S |
| 157 | |
| 158 | TARGET_OBJ = @TARGET_OBJ@ |
| 159 | libffi_la_LIBADD = $(TARGET_OBJ) |
Anthony Green | c6dddbd | 2009-10-04 08:11:33 -0400 | [diff] [blame] | 160 | |
| 161 | libffi_convenience_la_SOURCES = $(libffi_la_SOURCES) |
Richard Henderson | 5d69d57 | 2014-11-13 13:50:39 +0100 | [diff] [blame] | 162 | EXTRA_libffi_convenience_la_SOURCES = $(EXTRA_libffi_la_SOURCES) |
| 163 | libffi_convenience_la_LIBADD = $(libffi_la_LIBADD) |
| 164 | libffi_convenience_la_DEPENDENCIES = $(libffi_la_DEPENDENCIES) |
Anthony Green | c6dddbd | 2009-10-04 08:11:33 -0400 | [diff] [blame] | 165 | nodist_libffi_convenience_la_SOURCES = $(nodist_libffi_la_SOURCES) |
| 166 | |
Anthony Green | f308faf | 2013-02-11 14:25:13 -0500 | [diff] [blame] | 167 | LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/libtool-ldflags $(LDFLAGS)) |
Anthony Green | c6dddbd | 2009-10-04 08:11:33 -0400 | [diff] [blame] | 168 | |
Anthony Green | a04e30b | 2014-02-28 17:20:59 -0500 | [diff] [blame] | 169 | AM_CFLAGS = |
| 170 | if FFI_DEBUG |
| 171 | # Build debug. Define FFI_DEBUG on the commandline so that, when building with |
| 172 | # MSVC, it can link against the debug CRT. |
| 173 | AM_CFLAGS += -DFFI_DEBUG |
| 174 | endif |
| 175 | |
Richard Henderson | c02c341 | 2016-03-03 13:51:44 -0800 | [diff] [blame] | 176 | if LIBFFI_BUILD_VERSIONED_SHLIB |
| 177 | if LIBFFI_BUILD_VERSIONED_SHLIB_GNU |
| 178 | libffi_version_script = -Wl,--version-script,libffi.map |
| 179 | libffi_version_dep = libffi.map |
| 180 | endif |
| 181 | if LIBFFI_BUILD_VERSIONED_SHLIB_SUN |
| 182 | libffi_version_script = -Wl,-M,libffi.map-sun |
| 183 | libffi_version_dep = libffi.map-sun |
| 184 | libffi.map-sun : libffi.map $(top_srcdir)/../contrib/make_sunver.pl \ |
| 185 | $(libffi_la_OBJECTS) $(libffi_la_LIBADD) |
| 186 | perl $(top_srcdir)/../contrib/make_sunver.pl libffi.map \ |
| 187 | `echo $(libffi_la_OBJECTS) $(libffi_la_LIBADD) | \ |
| 188 | sed 's,\([^/ ]*\)\.l\([ao]\),.libs/\1.\2,g'` \ |
| 189 | > $@ || (rm -f $@ ; exit 1) |
| 190 | endif |
| 191 | else |
| 192 | libffi_version_script = |
| 193 | libffi_version_dep = |
| 194 | endif |
| 195 | libffi_version_info = -version-info `grep -v '^\#' $(srcdir)/libtool-version` |
| 196 | |
| 197 | libffi.map: $(top_srcdir)/libffi.map.in |
| 198 | $(COMPILE) -D$(TARGET) -E -x assembler-with-cpp -o $@ $< |
| 199 | |
| 200 | libffi_la_LDFLAGS = -no-undefined $(libffi_version_info) $(libffi_version_script) $(LTLDFLAGS) $(AM_LTLDFLAGS) |
| 201 | libffi_la_DEPENDENCIES = $(libffi_la_LIBADD) $(libffi_version_dep) |
Anthony Green | c6dddbd | 2009-10-04 08:11:33 -0400 | [diff] [blame] | 202 | |
Anthony Green | 981c32e | 2013-01-02 07:34:03 -0500 | [diff] [blame] | 203 | AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src |
| 204 | AM_CCASFLAGS = $(AM_CPPFLAGS) |
Anthony Green | c6dddbd | 2009-10-04 08:11:33 -0400 | [diff] [blame] | 205 | |
Josh Triplett | 1c68c07 | 2014-03-16 06:11:58 -0700 | [diff] [blame] | 206 | dist-hook: |
Anthony Green | 0c2251a | 2014-05-11 10:22:30 -0400 | [diff] [blame] | 207 | if [ -d $(top_srcdir)/.git ] ; then (cd $(top_srcdir); git log --no-decorate) ; else echo 'See git log for history.' ; fi > $(distdir)/ChangeLog |