mirror of
https://github.com/Zenithsiz/ftmemsim-valgrind.git
synced 2026-02-03 18:13:01 +00:00
following improvements: - Arch/OS/platform-specific files are now included/excluded via the preprocessor, rather than via the build system. This is more consistent (we use the pre-processor for small arch/OS/platform-specific chunks within files) and makes the build system much simpler, as the sources for all programs are the same on all platforms. - Vast amounts of cut+paste Makefile.am code has been factored out. If a new platform is implemented, you need to add 11 extra Makefile.am lines. Previously it was over 100 lines. - Vex has been autotoolised. Dependency checking now works in Vex (no more incomplete builds). Parallel builds now also work. --with-vex no longer works; it's little use and a pain to support. VEX/Makefile is still in the Vex repository and gets overwritten at configure-time; it should probably be renamed Makefile-gcc to avoid possible problems, such as accidentally committing a generated Makefile. There's a bunch of hacky copying to deal with the fact that autotools don't handle same-named files in different directories. Julian plans to rename the files to avoid this problem. - Various small Makefile.am things have been made more standard automake style, eg. the use of pkginclude/pkglib prefixes instead of rolling our own. - The existing five top-level Makefile.am include files have been consolidated into three. - Most Makefile.am files now are structured more clearly, with comment headers separating sections, declarations relating to the same things next to each other, better spacing and layout, etc. - Removed the unused exp-ptrcheck/tests/x86 directory. - Renamed some XML files. - Factored out some duplicated dSYM handling code. - Split auxprogs/ into auxprogs/ and mpi/, which allowed the resulting Makefile.am files to be much more standard. - Cleaned up m_coredump by merging a bunch of files that had been overzealously separated. The net result is 630 fewer lines of Makefile.am code, or 897 if you exclude the added Makefile.vex.am, or 997 once the hacky file copying for Vex is removed. And the build system is much simpler. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10364
271 lines
8.6 KiB
Makefile
271 lines
8.6 KiB
Makefile
# VEX/Makefile is generated from this file at configure-time.
|
|
|
|
include $(top_srcdir)/Makefile.all.am
|
|
|
|
#----------------------------------------------------------------------------
|
|
# Headers, etc
|
|
#----------------------------------------------------------------------------
|
|
|
|
EXTRA_DIST = \
|
|
HACKING.README \
|
|
LICENSE.README \
|
|
LICENSE.GPL \
|
|
quote.txt \
|
|
newline.txt \
|
|
auxprogs/genoffsets.c
|
|
|
|
pkginclude_HEADERS = \
|
|
pub/libvex.h \
|
|
pub/libvex_basictypes.h \
|
|
pub/libvex_emwarn.h \
|
|
pub/libvex_guest_offsets.h \
|
|
pub/libvex_guest_x86.h \
|
|
pub/libvex_guest_amd64.h \
|
|
pub/libvex_guest_ppc32.h \
|
|
pub/libvex_guest_ppc64.h \
|
|
pub/libvex_guest_arm.h \
|
|
pub/libvex_ir.h \
|
|
pub/libvex_trc_values.h
|
|
|
|
noinst_HEADERS = \
|
|
priv/main/vex_globals.h \
|
|
priv/main/vex_util.h \
|
|
priv/ir/irmatch.h \
|
|
priv/ir/iropt.h \
|
|
priv/guest-generic/bb_to_IR.h \
|
|
priv/guest-generic/g_generic_x87.h \
|
|
priv/guest-x86/gdefs.h \
|
|
priv/guest-amd64/gdefs.h \
|
|
priv/guest-ppc/gdefs.h \
|
|
priv/guest-arm/gdefs.h \
|
|
priv/host-generic/h_generic_regs.h \
|
|
priv/host-generic/h_generic_simd64.h \
|
|
priv/host-x86/hdefs.h \
|
|
priv/host-amd64/hdefs.h \
|
|
priv/host-ppc/hdefs.h \
|
|
priv/host-arm/hdefs.h
|
|
|
|
BUILT_SOURCES = pub/libvex_guest_offsets.h
|
|
CLEANFILES = pub/libvex_guest_offsets.h
|
|
|
|
# This is very uggerly. Need to sed out both "xyzzyN" and
|
|
# "xyzzy$N" since gcc on different targets emits the constants
|
|
# differently -- with a leading $ on x86/amd64 but none on ppc32/64.
|
|
pub/libvex_guest_offsets.h:
|
|
rm -f auxprogs/genoffsets.s
|
|
$(CC) $(LIBVEX_CFLAGS) -O -S -o auxprogs/genoffsets.s \
|
|
auxprogs/genoffsets.c
|
|
grep xyzzy auxprogs/genoffsets.s | grep define \
|
|
| sed "s/xyzzy\\$$//g" | sed "s/xyzzy//g" \
|
|
> pub/libvex_guest_offsets.h
|
|
rm -f auxprogs/genoffsets.s
|
|
|
|
#----------------------------------------------------------------------------
|
|
# vex_svnversion.h
|
|
#----------------------------------------------------------------------------
|
|
|
|
# The contents of vex_svnversion.h depends on the Vex revision number. The
|
|
# ideal way to deal with it would be if SVN had post-update hooks: we'd
|
|
# generate/regenerate it every time we did "svn co"/"svn up", and otherwise
|
|
# never delete it or regenerate it.
|
|
#
|
|
# But SVN lacks post-update hooks. So instead we generate it when building
|
|
# (it's in BUILT_SOURCES) if it's not present (we test for that in the
|
|
# generation rule), or if 'make version' is run. (Thus it can get
|
|
# out-of-date when developing; the 'make version' target lets that be
|
|
# remedied manually.) Otherwise, we never delete it or regenerate it (in
|
|
# particular, it is not present in CLEANFILES). Furthermore, at 'make dist'
|
|
# time, we regenerate it, and copy it into the dist tarball, thus ensuring
|
|
# the distributed version is up-to-date. Note that if a user manually
|
|
# deletes it and rebuilds, or does 'make dist' from a distributed version,
|
|
# it will be regenerated incorrectly, containing the string "exported"
|
|
# instead of the SVN revision number.
|
|
|
|
BUILT_SOURCES += priv/main/vex_svnversion.h
|
|
|
|
# Generate it at build time if not present. Nb: generating a file and
|
|
# putting it in $(srcdir) rather than $(builddir) seems like bad form. But
|
|
# because this file won't be regenerated post-distribution, then it's more
|
|
# like a non-generated file and so is reasonable to put in $(srcdir).
|
|
priv/main/vex_svnversion.h: version
|
|
if [ ! -f priv/main/vex_svnversion.h ] ; then \
|
|
mv $(top_srcdir)/vex_svnversion.h $(srcdir)/priv/main/; \
|
|
else \
|
|
rm -f $(top_srcdir)/vex_svnversion.h; \
|
|
fi
|
|
|
|
# Regenerate it and copy it into the dist tarball at 'make dist' time.
|
|
dist-hook: version
|
|
mv $(top_srcdir)/vex_svnversion.h $(distdir)/priv/main/
|
|
|
|
# Generate it.
|
|
version:
|
|
cat quote.txt > $(top_srcdir)/vex_svnversion.h
|
|
svnversion -n . >> $(top_srcdir)/vex_svnversion.h
|
|
cat quote.txt >> $(top_srcdir)/vex_svnversion.h
|
|
cat newline.txt >> $(top_srcdir)/vex_svnversion.h
|
|
|
|
#----------------------------------------------------------------------------
|
|
# libvex-<platform>.a
|
|
#----------------------------------------------------------------------------
|
|
|
|
pkglib_LIBRARIES = libvex-@VGCONF_ARCH_PRI@-@VGCONF_OS@.a
|
|
if VGCONF_HAVE_PLATFORM_SEC
|
|
pkglib_LIBRARIES += libvex-@VGCONF_ARCH_SEC@-@VGCONF_OS@.a
|
|
endif
|
|
|
|
# XXX: automake cannot handle having multiple files of the same name in
|
|
# different directories. The plan is to change the Vex filenames to avoid
|
|
# this. In the meantime, we use some hacky rules to copy the like-named
|
|
# files to differently-named files.
|
|
|
|
LIBVEX_SOURCES_COMMON = \
|
|
priv/main/vex_globals.c \
|
|
priv/main/vex_main.c \
|
|
priv/main/vex_util.c \
|
|
priv/ir/irdefs.c \
|
|
priv/ir/irmatch.c \
|
|
priv/ir/iropt.c \
|
|
priv/guest-generic/bb_to_IR.c \
|
|
priv/guest-generic/g_generic_x87.c \
|
|
priv/guest-x86/ghelpers-x86.c \
|
|
priv/guest-x86/toIR-x86.c \
|
|
priv/guest-amd64/ghelpers-amd64.c \
|
|
priv/guest-amd64/toIR-amd64.c \
|
|
priv/guest-ppc/ghelpers-ppc.c \
|
|
priv/guest-ppc/toIR-ppc.c \
|
|
priv/guest-arm/ghelpers-arm.c \
|
|
priv/guest-arm/toIR-arm.c \
|
|
priv/host-generic/h_generic_regs.c \
|
|
priv/host-generic/h_generic_simd64.c \
|
|
priv/host-generic/reg_alloc2.c \
|
|
priv/host-x86/hdefs-x86.c \
|
|
priv/host-x86/isel-x86.c \
|
|
priv/host-amd64/hdefs-amd64.c \
|
|
priv/host-amd64/isel-amd64.c \
|
|
priv/host-ppc/hdefs-ppc.c \
|
|
priv/host-ppc/isel-ppc.c \
|
|
priv/host-arm/hdefs-arm.c \
|
|
priv/host-arm/isel-arm.c
|
|
|
|
# XXX: temporary
|
|
TMP_FILES = \
|
|
priv/guest-x86/ghelpers-x86.c \
|
|
priv/guest-amd64/ghelpers-amd64.c \
|
|
priv/guest-ppc/ghelpers-ppc.c \
|
|
priv/guest-arm/ghelpers-arm.c \
|
|
\
|
|
priv/guest-x86/toIR-x86.c \
|
|
priv/guest-amd64/toIR-amd64.c \
|
|
priv/guest-ppc/toIR-ppc.c \
|
|
priv/guest-arm/toIR-arm.c \
|
|
\
|
|
priv/host-x86/hdefs-x86.c \
|
|
priv/host-amd64/hdefs-amd64.c \
|
|
priv/host-ppc/hdefs-ppc.c \
|
|
priv/host-arm/hdefs-arm.c \
|
|
\
|
|
priv/host-x86/isel-x86.c \
|
|
priv/host-amd64/isel-amd64.c \
|
|
priv/host-ppc/isel-ppc.c \
|
|
priv/host-arm/isel-arm.c
|
|
|
|
BUILT_SOURCES += $(TMP_FILES)
|
|
CLEANFILES += $(TMP_FILES)
|
|
|
|
# XXX: temporary
|
|
EXTRA_DIST += \
|
|
priv/guest-x86/ghelpers.c \
|
|
priv/guest-amd64/ghelpers.c \
|
|
priv/guest-ppc/ghelpers.c \
|
|
priv/guest-arm/ghelpers.c \
|
|
\
|
|
priv/guest-x86/toIR.c \
|
|
priv/guest-amd64/toIR.c \
|
|
priv/guest-ppc/toIR.c \
|
|
priv/guest-arm/toIR.c \
|
|
\
|
|
priv/host-x86/hdefs.c \
|
|
priv/host-amd64/hdefs.c \
|
|
priv/host-ppc/hdefs.c \
|
|
priv/host-arm/hdefs.c \
|
|
\
|
|
priv/host-x86/isel.c \
|
|
priv/host-amd64/isel.c \
|
|
priv/host-ppc/isel.c \
|
|
priv/host-arm/isel.c
|
|
|
|
|
|
# XXX: ghelpers
|
|
priv/guest-x86/ghelpers-x86.c: priv/guest-x86/ghelpers.c
|
|
cp priv/guest-x86/ghelpers.c priv/guest-x86/ghelpers-x86.c
|
|
|
|
priv/guest-amd64/ghelpers-amd64.c: priv/guest-amd64/ghelpers.c
|
|
cp priv/guest-amd64/ghelpers.c priv/guest-amd64/ghelpers-amd64.c
|
|
|
|
priv/guest-ppc/ghelpers-ppc.c: priv/guest-ppc/ghelpers.c
|
|
cp priv/guest-ppc/ghelpers.c priv/guest-ppc/ghelpers-ppc.c
|
|
|
|
priv/guest-arm/ghelpers-arm.c: priv/guest-arm/ghelpers.c
|
|
cp priv/guest-arm/ghelpers.c priv/guest-arm/ghelpers-arm.c
|
|
|
|
# XXX: toIR
|
|
priv/guest-x86/toIR-x86.c: priv/guest-x86/toIR.c
|
|
cp priv/guest-x86/toIR.c priv/guest-x86/toIR-x86.c
|
|
|
|
priv/guest-amd64/toIR-amd64.c: priv/guest-amd64/toIR.c
|
|
cp priv/guest-amd64/toIR.c priv/guest-amd64/toIR-amd64.c
|
|
|
|
priv/guest-ppc/toIR-ppc.c: priv/guest-ppc/toIR.c
|
|
cp priv/guest-ppc/toIR.c priv/guest-ppc/toIR-ppc.c
|
|
|
|
priv/guest-arm/toIR-arm.c: priv/guest-arm/toIR.c
|
|
cp priv/guest-arm/toIR.c priv/guest-arm/toIR-arm.c
|
|
|
|
# XXX: hdefs
|
|
priv/host-x86/hdefs-x86.c: priv/host-x86/hdefs.c
|
|
cp priv/host-x86/hdefs.c priv/host-x86/hdefs-x86.c
|
|
|
|
priv/host-amd64/hdefs-amd64.c: priv/host-amd64/hdefs.c
|
|
cp priv/host-amd64/hdefs.c priv/host-amd64/hdefs-amd64.c
|
|
|
|
priv/host-ppc/hdefs-ppc.c: priv/host-ppc/hdefs.c
|
|
cp priv/host-ppc/hdefs.c priv/host-ppc/hdefs-ppc.c
|
|
|
|
priv/host-arm/hdefs-arm.c: priv/host-arm/hdefs.c
|
|
cp priv/host-arm/hdefs.c priv/host-arm/hdefs-arm.c
|
|
|
|
# XXX: isel
|
|
priv/host-x86/isel-x86.c: priv/host-x86/isel.c
|
|
cp priv/host-x86/isel.c priv/host-x86/isel-x86.c
|
|
|
|
priv/host-amd64/isel-amd64.c: priv/host-amd64/isel.c
|
|
cp priv/host-amd64/isel.c priv/host-amd64/isel-amd64.c
|
|
|
|
priv/host-ppc/isel-ppc.c: priv/host-ppc/isel.c
|
|
cp priv/host-ppc/isel.c priv/host-ppc/isel-ppc.c
|
|
|
|
priv/host-arm/isel-arm.c: priv/host-arm/isel.c
|
|
cp priv/host-arm/isel.c priv/host-arm/isel-arm.c
|
|
|
|
|
|
LIBVEX_CFLAGS = \
|
|
-Wbad-function-cast \
|
|
-Wcast-qual \
|
|
-Wcast-align \
|
|
-fstrict-aliasing
|
|
|
|
libvex_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_SOURCES = $(LIBVEX_SOURCES_COMMON)
|
|
libvex_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CPPFLAGS = \
|
|
$(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) -Ipriv
|
|
libvex_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CFLAGS = \
|
|
$(AM_CFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) $(LIBVEX_CFLAGS)
|
|
if VGCONF_HAVE_PLATFORM_SEC
|
|
libvex_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_SOURCES = $(LIBVEX_SOURCES_COMMON)
|
|
libvex_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CPPFLAGS = \
|
|
$(AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) -Ipriv
|
|
libvex_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CFLAGS = \
|
|
$(AM_CFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) $(LIBVEX_CFLAGS)
|
|
endif
|
|
|