]>
Commit | Line | Data |
---|---|---|
63e5e3e0 AG |
1 | ## Process this with automake to create Makefile.in |
2 | ||
b85e31b9 | 3 | AUTOMAKE_OPTIONS = foreign subdir-objects |
b1760f7f | 4 | |
4e70f25f | 5 | ACLOCAL_AMFLAGS = -I .. -I ../config |
63e5e3e0 | 6 | |
b7b857bb | 7 | SUBDIRS = include testsuite man |
bbf3057b | 8 | |
b1760f7f RH |
9 | EXTRA_DIST = LICENSE ChangeLog.v1 ChangeLog.libgcj \ |
10 | ChangeLog.libffi ChangeLog.libffi-3.1 \ | |
11 | m4/libtool.m4 m4/lt~obsolete.m4 \ | |
b4b575ce | 12 | m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4 \ |
b1760f7f RH |
13 | m4/ltversion.m4 src/debug.c msvcc.sh \ |
14 | generate-darwin-source-and-headers.py \ | |
15 | libffi.xcodeproj/project.pbxproj \ | |
16 | libtool-ldflags | |
b4b575ce | 17 | |
4e70f25f AS |
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 | |
24 | ||
25 | # Defines info, dvi, pdf and html targets | |
26 | MAKEINFOFLAGS = -I $(srcdir)/../gcc/doc/include | |
b4b575ce | 27 | info_TEXINFOS = doc/libffi.texi |
b7b857bb | 28 | |
4e70f25f AS |
29 | # AM_CONDITIONAL on configure option --generated-files-in-srcdir |
30 | if GENINSRC | |
31 | STAMP_GENINSRC = stamp-geninsrc | |
32 | else | |
33 | STAMP_GENINSRC = | |
34 | endif | |
35 | ||
36 | # AM_CONDITIONAL on configure check ACX_CHECK_PROG_VER([MAKEINFO]) | |
37 | if BUILD_INFO | |
38 | STAMP_BUILD_INFO = stamp-build-info | |
39 | else | |
40 | STAMP_BUILD_INFO = | |
41 | endif | |
42 | ||
43 | all-local: $(STAMP_GENINSRC) | |
44 | ||
45 | stamp-geninsrc: doc/libffi.info | |
46 | cp -p $(top_builddir)/doc/libffi.info $(srcdir)/doc/libffi.info | |
47 | @touch $@ | |
48 | ||
49 | doc/libffi.info: $(STAMP_BUILD_INFO) | |
50 | ||
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 | |
53 | @touch $@ | |
54 | ||
4e70f25f AS |
55 | CLEANFILES = $(STAMP_GENINSRC) $(STAMP_BUILD_INFO) doc/libffi.info |
56 | MAINTAINERCLEANFILES = $(srcdir)/doc/libffi.info | |
57 | ||
91bffbe9 JJ |
58 | ## ################################################################ |
59 | ||
60 | ## | |
61 | ## This section is for make and multilib madness. | |
62 | ## | |
63 | ||
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. | |
67 | AM_MAKEFLAGS = \ | |
109c4a7c DH |
68 | "AR_FLAGS=$(AR_FLAGS)" \ |
69 | "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ | |
70 | "CFLAGS=$(CFLAGS)" \ | |
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)" \ | |
82 | "MAKE=$(MAKE)" \ | |
83 | "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \ | |
84 | "PICFLAG=$(PICFLAG)" \ | |
85 | "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \ | |
86 | "RUNTESTFLAGS=$(RUNTESTFLAGS)" \ | |
87 | "SHELL=$(SHELL)" \ | |
88 | "exec_prefix=$(exec_prefix)" \ | |
89 | "infodir=$(infodir)" \ | |
90 | "libdir=$(libdir)" \ | |
91 | "mandir=$(mandir)" \ | |
92 | "prefix=$(prefix)" \ | |
93 | "AR=$(AR)" \ | |
94 | "AS=$(AS)" \ | |
95 | "CC=$(CC)" \ | |
96 | "CXX=$(CXX)" \ | |
97 | "LD=$(LD)" \ | |
98 | "NM=$(NM)" \ | |
99 | "RANLIB=$(RANLIB)" \ | |
100 | "DESTDIR=$(DESTDIR)" | |
91bffbe9 | 101 | |
2c2a780f MP |
102 | # Subdir rules rely on $(FLAGS_TO_PASS) |
103 | FLAGS_TO_PASS = $(AM_MAKEFLAGS) | |
104 | ||
91bffbe9 JJ |
105 | MAKEOVERRIDES= |
106 | ||
b1760f7f RH |
107 | pkgconfigdir = $(libdir)/pkgconfig |
108 | pkgconfig_DATA = libffi.pc | |
109 | ||
63e5e3e0 | 110 | toolexeclib_LTLIBRARIES = libffi.la |
ce3b24a7 | 111 | noinst_LTLIBRARIES = libffi_convenience.la |
63e5e3e0 | 112 | |
b4b575ce | 113 | libffi_la_SOURCES = src/prep_cif.c src/types.c \ |
18fa3240 | 114 | src/raw_api.c src/java_raw_api.c src/closures.c |
63e5e3e0 | 115 | |
b4b575ce | 116 | if FFI_DEBUG |
b1760f7f RH |
117 | libffi_la_SOURCES += src/debug.c |
118 | endif | |
119 | ||
120 | noinst_HEADERS = \ | |
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 \ | |
139 | src/pa/ffitarget.h \ | |
140 | src/powerpc/ffitarget.h src/powerpc/asm.h src/powerpc/ffi_powerpc.h \ | |
93249dde | 141 | src/riscv/ffitarget.h \ |
b1760f7f RH |
142 | src/s390/ffitarget.h \ |
143 | src/sh/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 \ | |
150 | src/dlmalloc.c | |
151 | ||
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 \ | |
93249dde | 177 | src/riscv/ffi.c src/riscv/sysv.S \ |
b1760f7f RH |
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 | |
190 | ||
191 | TARGET_OBJ = @TARGET_OBJ@ | |
192 | libffi_la_LIBADD = $(TARGET_OBJ) | |
63e5e3e0 | 193 | |
3ed8e5b6 | 194 | libffi_convenience_la_SOURCES = $(libffi_la_SOURCES) |
b1760f7f RH |
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) | |
3ed8e5b6 AT |
198 | nodist_libffi_convenience_la_SOURCES = $(nodist_libffi_la_SOURCES) |
199 | ||
7afa92c5 JB |
200 | LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS)) |
201 | ||
b1760f7f RH |
202 | AM_CFLAGS = -Wall -g -fexceptions |
203 | if FFI_DEBUG | |
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 | |
207 | endif | |
208 | ||
2c055256 RH |
209 | if LIBAT_BUILD_VERSIONED_SHLIB |
210 | if LIBAT_BUILD_VERSIONED_SHLIB_GNU | |
5147e0e8 RH |
211 | libffi_version_script = -Wl,--version-script,libffi.map |
212 | libffi_version_dep = libffi.map | |
2c055256 RH |
213 | endif |
214 | if LIBAT_BUILD_VERSIONED_SHLIB_SUN | |
215 | libffi_version_script = -Wl,-M,libffi.map-sun | |
216 | libffi_version_dep = libffi.map-sun | |
5147e0e8 | 217 | libffi.map-sun : libffi.map $(top_srcdir)/../contrib/make_sunver.pl \ |
2c055256 | 218 | $(libffi_la_OBJECTS) $(libffi_la_LIBADD) |
fd2298e3 | 219 | perl $(top_srcdir)/../contrib/make_sunver.pl libffi.map \ |
bc33dc51 | 220 | `echo $(libffi_la_OBJECTS) $(libffi_la_LIBADD) | \ |
fd2298e3 RO |
221 | sed 's,\([^/ ]*\)\.l\([ao]\),.libs/\1.\2,g'` \ |
222 | > $@ || (rm -f $@ ; exit 1) | |
2c055256 RH |
223 | endif |
224 | else | |
225 | libffi_version_script = | |
226 | libffi_version_dep = | |
227 | endif | |
228 | libffi_version_info = -version-info `grep -v '^\#' $(srcdir)/libtool-version` | |
229 | ||
5147e0e8 RH |
230 | libffi.map: $(top_srcdir)/libffi.map.in |
231 | $(COMPILE) -D$(TARGET) -E -x assembler-with-cpp -o $@ $< | |
232 | ||
2c055256 RH |
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) | |
63e5e3e0 | 235 | |
076e5443 PB |
236 | AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src |
237 | AM_CCASFLAGS = $(AM_CPPFLAGS) | |
8665824c | 238 | |
0eb5e2b9 AO |
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 |