gcov: Remove TARGET_GCOV_TYPE_SIZE target hook
[official-gcc.git] / libffi / Makefile.am
blob2c5b74df9ee305db367693c09bfb162520a51814
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.old                                      \
10         m4/libtool.m4 m4/lt~obsolete.m4                                 \
11          m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4                  \
12          m4/ltversion.m4 src/debug.c msvcc.sh                           \
13         generate-darwin-source-and-headers.py                           \
14         libffi.xcodeproj/project.pbxproj                                \
15         libtool-ldflags libtool-version configure.host README.md        \
16         libffi.map.in LICENSE-BUILDTOOLS msvc_build make_sunver.pl      
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
33 if GENINSRC
34 STAMP_GENINSRC = stamp-geninsrc
35 else
36 STAMP_GENINSRC =
37 endif
39 # AM_CONDITIONAL on configure check ACX_CHECK_PROG_VER([MAKEINFO])
40 if BUILD_DOCS
41 STAMP_BUILD_INFO = stamp-build-info
42 else
43 STAMP_BUILD_INFO =
44 endif
46 all-local: $(STAMP_GENINSRC)
48 stamp-geninsrc: doc/libffi.info
49         cp -p $(top_builddir)/doc/libffi.info $(srcdir)/doc/libffi.info
50         @touch $@
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
56         @touch $@
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.
70 AM_MAKEFLAGS = \
71         "AR_FLAGS=$(AR_FLAGS)" \
72         "CC_FOR_BUILD=$(CC_FOR_BUILD)" \
73         "CFLAGS=$(CFLAGS)" \
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)" \
85         "MAKE=$(MAKE)" \
86         "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
87         "PICFLAG=$(PICFLAG)" \
88         "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
89         "RUNTESTFLAGS=$(RUNTESTFLAGS)" \
90         "SHELL=$(SHELL)" \
91         "exec_prefix=$(exec_prefix)" \
92         "infodir=$(infodir)" \
93         "libdir=$(libdir)" \
94         "mandir=$(mandir)" \
95         "prefix=$(prefix)" \
96         "AR=$(AR)" \
97         "AS=$(AS)" \
98         "CC=$(CC)" \
99         "CXX=$(CXX)" \
100         "LD=$(LD)" \
101         "NM=$(NM)" \
102         "RANLIB=$(RANLIB)" \
103         "DESTDIR=$(DESTDIR)"
105 # Subdir rules rely on $(FLAGS_TO_PASS)
106 FLAGS_TO_PASS = $(AM_MAKEFLAGS)
108 MAKEOVERRIDES=
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 \
118                 src/tramp.c
120 if FFI_DEBUG
121 libffi_la_SOURCES += src/debug.c
122 endif
124 noinst_HEADERS = src/aarch64/ffitarget.h src/aarch64/internal.h         \
125         src/alpha/ffitarget.h src/alpha/internal.h                      \
126         src/arc/ffitarget.h src/arm/ffitarget.h src/arm/internal.h      \
127         src/avr32/ffitarget.h src/bfin/ffitarget.h                      \
128         src/cris/ffitarget.h src/csky/ffitarget.h src/frv/ffitarget.h   \
129         src/ia64/ffitarget.h src/ia64/ia64_flags.h                      \
130         src/m32r/ffitarget.h src/m68k/ffitarget.h                       \
131         src/m88k/ffitarget.h src/metag/ffitarget.h                      \
132         src/microblaze/ffitarget.h src/mips/ffitarget.h                 \
133         src/moxie/ffitarget.h src/nios2/ffitarget.h                     \
134         src/or1k/ffitarget.h src/pa/ffitarget.h                         \
135         src/powerpc/ffitarget.h src/powerpc/asm.h                       \
136         src/powerpc/ffi_powerpc.h src/riscv/ffitarget.h                 \
137         src/s390/ffitarget.h src/s390/internal.h src/sh/ffitarget.h     \
138         src/sh64/ffitarget.h src/sparc/ffitarget.h                      \
139         src/sparc/internal.h src/tile/ffitarget.h src/vax/ffitarget.h   \
140         src/x86/ffitarget.h src/x86/internal.h src/x86/internal64.h     \
141         src/x86/asmnames.h src/xtensa/ffitarget.h src/dlmalloc.c        \
142         src/kvx/ffitarget.h src/loongarch64/ffitarget.h
144 EXTRA_libffi_la_SOURCES = src/aarch64/ffi.c src/aarch64/sysv.S          \
145         src/aarch64/win64_armasm.S src/alpha/ffi.c src/alpha/osf.S      \
146         src/arc/ffi.c src/arc/arcompact.S src/arm/ffi.c                 \
147         src/arm/sysv.S src/arm/ffi.c src/arm/sysv_msvc_arm32.S          \
148         src/avr32/ffi.c src/avr32/sysv.S src/bfin/ffi.c                 \
149         src/bfin/sysv.S src/cris/ffi.c src/cris/sysv.S src/frv/ffi.c    \
150         src/csky/ffi.c src/csky/sysv.S src/frv/eabi.S src/ia64/ffi.c    \
151         src/ia64/unix.S src/m32r/ffi.c src/m32r/sysv.S src/m68k/ffi.c   \
152         src/m68k/sysv.S src/m88k/ffi.c src/m88k/obsd.S                  \
153         src/metag/ffi.c src/metag/sysv.S src/microblaze/ffi.c           \
154         src/microblaze/sysv.S src/mips/ffi.c src/mips/o32.S             \
155         src/mips/n32.S src/moxie/ffi.c src/moxie/eabi.S                 \
156         src/nios2/ffi.c src/nios2/sysv.S src/or1k/ffi.c                 \
157         src/or1k/sysv.S src/pa/ffi.c src/pa/linux.S src/pa/hpux32.S     \
158         src/powerpc/ffi.c src/powerpc/ffi_sysv.c                        \
159         src/powerpc/ffi_linux64.c src/powerpc/sysv.S                    \
160         src/powerpc/linux64.S src/powerpc/linux64_closure.S             \
161         src/powerpc/ppc_closure.S src/powerpc/aix.S                     \
162         src/powerpc/darwin.S src/powerpc/aix_closure.S                  \
163         src/powerpc/darwin_closure.S src/powerpc/ffi_darwin.c           \
164         src/riscv/ffi.c src/riscv/sysv.S src/s390/ffi.c                 \
165         src/s390/sysv.S src/sh/ffi.c src/sh/sysv.S src/sh64/ffi.c       \
166         src/sh64/sysv.S src/sparc/ffi.c src/sparc/ffi64.c               \
167         src/sparc/v8.S src/sparc/v9.S src/tile/ffi.c src/tile/tile.S    \
168         src/vax/ffi.c src/vax/elfbsd.S src/x86/ffi.c src/x86/sysv.S     \
169         src/x86/ffiw64.c src/x86/win64.S src/x86/ffi64.c                \
170         src/x86/unix64.S src/x86/sysv_intel.S src/x86/win64_intel.S     \
171         src/xtensa/ffi.c src/xtensa/sysv.S src/kvx/ffi.c                \
172         src/kvx/sysv.S src/loongarch64/ffi.c src/loongarch64/sysv.S
174 TARGET_OBJ = @TARGET_OBJ@
175 libffi_la_LIBADD = $(TARGET_OBJ)
177 libffi_convenience_la_SOURCES = $(libffi_la_SOURCES)
178 EXTRA_libffi_convenience_la_SOURCES = $(EXTRA_libffi_la_SOURCES)
179 libffi_convenience_la_LIBADD = $(libffi_la_LIBADD)
180 libffi_convenience_la_DEPENDENCIES = $(libffi_la_DEPENDENCIES)
181 nodist_libffi_convenience_la_SOURCES = $(nodist_libffi_la_SOURCES)
183 LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
185 AM_CFLAGS = -Wall -g -fexceptions $(CET_FLAGS)
186 if FFI_DEBUG
187 # Build debug. Define FFI_DEBUG on the commandline so that, when building with
188 # MSVC, it can link against the debug CRT.
189 AM_CFLAGS += -DFFI_DEBUG
190 endif
192 if LIBFFI_BUILD_VERSIONED_SHLIB
193 if LIBFFI_BUILD_VERSIONED_SHLIB_GNU
194 libffi_version_script = -Wl,--version-script,libffi.map
195 libffi_version_dep = libffi.map
196 endif
197 if LIBFFI_BUILD_VERSIONED_SHLIB_SUN
198 libffi_version_script = -Wl,-M,libffi.map-sun
199 libffi_version_dep = libffi.map-sun
200 libffi.map-sun : libffi.map $(top_srcdir)/../contrib/make_sunver.pl \
201                  $(libffi_la_OBJECTS) $(libffi_la_LIBADD)
202         perl $(top_srcdir)/../contrib/make_sunver.pl libffi.map \
203          `echo $(libffi_la_OBJECTS) $(libffi_la_LIBADD) | \
204             sed 's,\([^/        ]*\)\.l\([ao]\),.libs/\1.\2,g'` \
205          > $@ || (rm -f $@ ; exit 1)
206 endif
207 else
208 libffi_version_script =
209 libffi_version_dep =
210 endif
211 libffi_version_info = -version-info `grep -v '^\#' $(srcdir)/libtool-version`
213 libffi.map: $(top_srcdir)/libffi.map.in
214         $(COMPILE) -D$(TARGET) -DGENERATE_LIBFFI_MAP \
215          -E -x assembler-with-cpp -o $@ $(top_srcdir)/libffi.map.in
217 if ENABLE_DARWIN_AT_RPATH
218 libffi_darwin_rpath = -Wl,-rpath,@loader_path
219 endif
220 libffi_la_LDFLAGS = -no-undefined $(libffi_version_info) \
221         $(libffi_version_script) $(LTLDFLAGS) $(AM_LTLDFLAGS) \
222         $(libffi_darwin_rpath)
223 libffi_la_DEPENDENCIES = $(libffi_la_LIBADD) $(libffi_version_dep)
225 AM_CPPFLAGS = -I. -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
226 AM_CCASFLAGS = $(AM_CPPFLAGS) $(CET_FLAGS)
228 # Multilib support.  Automake should provide these on its own.
229 all-recursive: all-multi
230 install-recursive: install-multi
231 mostlyclean-recursive: mostlyclean-multi
232 clean-recursive: clean-multi
233 distclean-recursive: distclean-multi
234 maintainer-clean-recursive: maintainer-clean-multi
236 include $(top_srcdir)/../multilib.am