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 | |
Anthony Green | 6f734f8 | 2019-11-18 15:13:16 -0500 | [diff] [blame] | 17 | EXTRA_DIST = LICENSE ChangeLog.old \ |
Richard Henderson | 5d69d57 | 2014-11-13 13:50:39 +0100 | [diff] [blame] | 18 | m4/libtool.m4 m4/lt~obsolete.m4 \ |
Anthony Green | 9c00a3f | 2012-10-12 16:46:06 -0400 | [diff] [blame] | 19 | m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4 \ |
Richard Henderson | a4b785e | 2014-10-17 02:07:32 -0400 | [diff] [blame] | 20 | m4/ltversion.m4 src/debug.c msvcc.sh \ |
Richard Henderson | 5d69d57 | 2014-11-13 13:50:39 +0100 | [diff] [blame] | 21 | generate-darwin-source-and-headers.py \ |
| 22 | libffi.xcodeproj/project.pbxproj \ |
Anthony Green | f3c2729 | 2018-03-23 11:47:29 -0400 | [diff] [blame] | 23 | libtool-ldflags libtool-version configure.host README.md \ |
Anthony Green | 8e3935f | 2019-11-22 12:42:26 -0500 | [diff] [blame] | 24 | libffi.map.in LICENSE-BUILDTOOLS msvc_build make_sunver.pl |
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 | 981c32e | 2013-01-02 07:34:03 -0500 | [diff] [blame] | 29 | # Subdir rules rely on $(FLAGS_TO_PASS) |
| 30 | FLAGS_TO_PASS = $(AM_MAKEFLAGS) |
| 31 | |
Anthony Green | c6dddbd | 2009-10-04 08:11:33 -0400 | [diff] [blame] | 32 | MAKEOVERRIDES= |
| 33 | |
Richard Henderson | 5d69d57 | 2014-11-13 13:50:39 +0100 | [diff] [blame] | 34 | pkgconfigdir = $(libdir)/pkgconfig |
| 35 | pkgconfig_DATA = libffi.pc |
| 36 | |
Anthony Green | 981c32e | 2013-01-02 07:34:03 -0500 | [diff] [blame] | 37 | toolexeclib_LTLIBRARIES = libffi.la |
Anthony Green | c6dddbd | 2009-10-04 08:11:33 -0400 | [diff] [blame] | 38 | noinst_LTLIBRARIES = libffi_convenience.la |
Anthony Green | f88118b | 2013-07-02 15:51:27 -0400 | [diff] [blame] | 39 | |
| 40 | libffi_la_SOURCES = src/prep_cif.c src/types.c \ |
| 41 | src/raw_api.c src/java_raw_api.c src/closures.c |
Anthony Green | c6dddbd | 2009-10-04 08:11:33 -0400 | [diff] [blame] | 42 | |
Anthony Green | 6a6e7f8 | 2011-11-12 16:20:42 -0500 | [diff] [blame] | 43 | if FFI_DEBUG |
Richard Henderson | 5d69d57 | 2014-11-13 13:50:39 +0100 | [diff] [blame] | 44 | libffi_la_SOURCES += src/debug.c |
Anthony Green | 6a6e7f8 | 2011-11-12 16:20:42 -0500 | [diff] [blame] | 45 | endif |
| 46 | |
Richard Henderson | 5d69d57 | 2014-11-13 13:50:39 +0100 | [diff] [blame] | 47 | noinst_HEADERS = \ |
| 48 | src/aarch64/ffitarget.h src/aarch64/internal.h \ |
| 49 | src/alpha/ffitarget.h src/alpha/internal.h \ |
| 50 | src/arc/ffitarget.h \ |
| 51 | src/arm/ffitarget.h src/arm/internal.h \ |
| 52 | src/avr32/ffitarget.h \ |
| 53 | src/bfin/ffitarget.h \ |
| 54 | src/cris/ffitarget.h \ |
| 55 | src/frv/ffitarget.h \ |
| 56 | src/ia64/ffitarget.h src/ia64/ia64_flags.h \ |
| 57 | src/m32r/ffitarget.h \ |
| 58 | src/m68k/ffitarget.h \ |
| 59 | src/m88k/ffitarget.h \ |
| 60 | src/metag/ffitarget.h \ |
| 61 | src/microblaze/ffitarget.h \ |
| 62 | src/mips/ffitarget.h \ |
| 63 | src/moxie/ffitarget.h \ |
| 64 | src/nios2/ffitarget.h \ |
| 65 | src/or1k/ffitarget.h \ |
| 66 | src/pa/ffitarget.h \ |
| 67 | src/powerpc/ffitarget.h src/powerpc/asm.h src/powerpc/ffi_powerpc.h \ |
Stef O'Rear | 3840d49 | 2018-03-11 05:55:15 -0700 | [diff] [blame] | 68 | src/riscv/ffitarget.h \ |
Sergei Trofimovich | cd5e9f8 | 2017-11-05 13:56:42 +0000 | [diff] [blame] | 69 | src/s390/ffitarget.h src/s390/internal.h \ |
Richard Henderson | 5d69d57 | 2014-11-13 13:50:39 +0100 | [diff] [blame] | 70 | src/sh/ffitarget.h \ |
| 71 | src/sh64/ffitarget.h \ |
| 72 | src/sparc/ffitarget.h src/sparc/internal.h \ |
| 73 | src/tile/ffitarget.h \ |
| 74 | src/vax/ffitarget.h \ |
Moritz Angermann | 4c6aa78 | 2017-10-01 11:32:41 +0800 | [diff] [blame] | 75 | src/x86/ffitarget.h src/x86/internal.h src/x86/internal64.h src/x86/asmnames.h \ |
Richard Henderson | 5d69d57 | 2014-11-13 13:50:39 +0100 | [diff] [blame] | 76 | src/xtensa/ffitarget.h \ |
| 77 | src/dlmalloc.c |
| 78 | |
Anthony Green | 1d60594 | 2019-10-24 05:25:11 -0400 | [diff] [blame] | 79 | EXTRA_libffi_la_SOURCES = src/aarch64/ffi.c src/aarch64/sysv.S \ |
| 80 | src/aarch64/win64_armasm.S src/alpha/ffi.c src/alpha/osf.S \ |
| 81 | src/arc/ffi.c src/arc/arcompact.S src/arm/ffi.c \ |
| 82 | src/arm/sysv.S src/arm/ffi.c src/arm/sysv_msvc_arm32.S \ |
| 83 | src/avr32/ffi.c src/avr32/sysv.S src/bfin/ffi.c \ |
| 84 | src/bfin/sysv.S src/cris/ffi.c src/cris/sysv.S src/frv/ffi.c \ |
| 85 | src/frv/eabi.S src/ia64/ffi.c src/ia64/unix.S src/m32r/ffi.c \ |
| 86 | src/m32r/sysv.S src/m68k/ffi.c src/m68k/sysv.S src/m88k/ffi.c \ |
| 87 | src/m88k/obsd.S src/metag/ffi.c src/metag/sysv.S \ |
| 88 | src/microblaze/ffi.c src/microblaze/sysv.S src/mips/ffi.c \ |
| 89 | src/mips/o32.S src/mips/n32.S src/moxie/ffi.c \ |
| 90 | src/moxie/eabi.S src/nios2/ffi.c src/nios2/sysv.S \ |
| 91 | src/or1k/ffi.c src/or1k/sysv.S src/pa/ffi.c src/pa/linux.S \ |
| 92 | src/pa/hpux32.S src/powerpc/ffi.c src/powerpc/ffi_sysv.c \ |
| 93 | src/powerpc/ffi_linux64.c src/powerpc/sysv.S \ |
| 94 | src/powerpc/linux64.S src/powerpc/linux64_closure.S \ |
| 95 | src/powerpc/ppc_closure.S src/powerpc/aix.S \ |
| 96 | src/powerpc/darwin.S src/powerpc/aix_closure.S \ |
| 97 | src/powerpc/darwin_closure.S src/powerpc/ffi_darwin.c \ |
| 98 | src/riscv/ffi.c src/riscv/sysv.S src/s390/ffi.c \ |
| 99 | src/s390/sysv.S src/sh/ffi.c src/sh/sysv.S src/sh64/ffi.c \ |
| 100 | src/sh64/sysv.S src/sparc/ffi.c src/sparc/ffi64.c \ |
| 101 | src/sparc/v8.S src/sparc/v9.S src/tile/ffi.c src/tile/tile.S \ |
| 102 | src/vax/ffi.c src/vax/elfbsd.S src/x86/ffi.c src/x86/sysv.S \ |
| 103 | src/x86/ffiw64.c src/x86/win64.S src/x86/ffi64.c \ |
| 104 | src/x86/unix64.S src/x86/sysv_intel.S src/x86/win64_intel.S \ |
Richard Henderson | 5d69d57 | 2014-11-13 13:50:39 +0100 | [diff] [blame] | 105 | src/xtensa/ffi.c src/xtensa/sysv.S |
| 106 | |
| 107 | TARGET_OBJ = @TARGET_OBJ@ |
| 108 | libffi_la_LIBADD = $(TARGET_OBJ) |
Anthony Green | c6dddbd | 2009-10-04 08:11:33 -0400 | [diff] [blame] | 109 | |
| 110 | libffi_convenience_la_SOURCES = $(libffi_la_SOURCES) |
Richard Henderson | 5d69d57 | 2014-11-13 13:50:39 +0100 | [diff] [blame] | 111 | EXTRA_libffi_convenience_la_SOURCES = $(EXTRA_libffi_la_SOURCES) |
| 112 | libffi_convenience_la_LIBADD = $(libffi_la_LIBADD) |
| 113 | libffi_convenience_la_DEPENDENCIES = $(libffi_la_DEPENDENCIES) |
Anthony Green | c6dddbd | 2009-10-04 08:11:33 -0400 | [diff] [blame] | 114 | nodist_libffi_convenience_la_SOURCES = $(nodist_libffi_la_SOURCES) |
| 115 | |
Anthony Green | f308faf | 2013-02-11 14:25:13 -0500 | [diff] [blame] | 116 | LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/libtool-ldflags $(LDFLAGS)) |
Anthony Green | c6dddbd | 2009-10-04 08:11:33 -0400 | [diff] [blame] | 117 | |
Anthony Green | a04e30b | 2014-02-28 17:20:59 -0500 | [diff] [blame] | 118 | AM_CFLAGS = |
| 119 | if FFI_DEBUG |
| 120 | # Build debug. Define FFI_DEBUG on the commandline so that, when building with |
| 121 | # MSVC, it can link against the debug CRT. |
| 122 | AM_CFLAGS += -DFFI_DEBUG |
| 123 | endif |
| 124 | |
Richard Henderson | c02c341 | 2016-03-03 13:51:44 -0800 | [diff] [blame] | 125 | if LIBFFI_BUILD_VERSIONED_SHLIB |
| 126 | if LIBFFI_BUILD_VERSIONED_SHLIB_GNU |
| 127 | libffi_version_script = -Wl,--version-script,libffi.map |
| 128 | libffi_version_dep = libffi.map |
| 129 | endif |
| 130 | if LIBFFI_BUILD_VERSIONED_SHLIB_SUN |
| 131 | libffi_version_script = -Wl,-M,libffi.map-sun |
| 132 | libffi_version_dep = libffi.map-sun |
Anthony Green | ca11253 | 2019-10-26 07:26:30 -0400 | [diff] [blame] | 133 | libffi.map-sun : libffi.map $(top_srcdir)/make_sunver.pl \ |
Richard Henderson | c02c341 | 2016-03-03 13:51:44 -0800 | [diff] [blame] | 134 | $(libffi_la_OBJECTS) $(libffi_la_LIBADD) |
Anthony Green | ca11253 | 2019-10-26 07:26:30 -0400 | [diff] [blame] | 135 | perl $(top_srcdir)/make_sunver.pl libffi.map \ |
Richard Henderson | c02c341 | 2016-03-03 13:51:44 -0800 | [diff] [blame] | 136 | `echo $(libffi_la_OBJECTS) $(libffi_la_LIBADD) | \ |
| 137 | sed 's,\([^/ ]*\)\.l\([ao]\),.libs/\1.\2,g'` \ |
| 138 | > $@ || (rm -f $@ ; exit 1) |
| 139 | endif |
| 140 | else |
| 141 | libffi_version_script = |
| 142 | libffi_version_dep = |
| 143 | endif |
| 144 | libffi_version_info = -version-info `grep -v '^\#' $(srcdir)/libtool-version` |
| 145 | |
| 146 | libffi.map: $(top_srcdir)/libffi.map.in |
| 147 | $(COMPILE) -D$(TARGET) -E -x assembler-with-cpp -o $@ $< |
| 148 | |
| 149 | libffi_la_LDFLAGS = -no-undefined $(libffi_version_info) $(libffi_version_script) $(LTLDFLAGS) $(AM_LTLDFLAGS) |
| 150 | libffi_la_DEPENDENCIES = $(libffi_la_LIBADD) $(libffi_version_dep) |
Anthony Green | c6dddbd | 2009-10-04 08:11:33 -0400 | [diff] [blame] | 151 | |
Anthony Green | 981c32e | 2013-01-02 07:34:03 -0500 | [diff] [blame] | 152 | AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src |
| 153 | AM_CCASFLAGS = $(AM_CPPFLAGS) |
Anthony Green | c6dddbd | 2009-10-04 08:11:33 -0400 | [diff] [blame] | 154 | |
Josh Triplett | 1c68c07 | 2014-03-16 06:11:58 -0700 | [diff] [blame] | 155 | dist-hook: |
Anthony Green | 8e3935f | 2019-11-22 12:42:26 -0500 | [diff] [blame] | 156 | d=`(cd $(distdir); pwd)`; (cd doc; make pdf; cp *.pdf $$d/doc) |
Anthony Green | 0c2251a | 2014-05-11 10:22:30 -0400 | [diff] [blame] | 157 | if [ -d $(top_srcdir)/.git ] ; then (cd $(top_srcdir); git log --no-decorate) ; else echo 'See git log for history.' ; fi > $(distdir)/ChangeLog |
Anthony Green | 90fb897 | 2019-10-24 06:24:14 -0400 | [diff] [blame] | 158 | s=`awk '/was released on/{ print NR; exit}' $(top_srcdir)/README.md`; tail -n +$$(($$s-1)) $(top_srcdir)/README.md > $(distdir)/README.md |
Anthony Green | 8e3935f | 2019-11-22 12:42:26 -0500 | [diff] [blame] | 159 | |