# Note that these are overridden by GNU make-specific code below if
# GNU make is used. The overrides implement dependency tracking.
-COMPILE.pre = $(CXX) $(CXX_DIALECT)
+COMPILE.pre = $(CXX) -x c++ $(CXX_DIALECT)
COMPILE.post = -c -o $@
COMPILE = $(COMPILE.pre) $(INTERNAL_CFLAGS) $(COMPILE.post)
POSTCOMPILE = @true
# Where is libipt? This will be empty if libipt was not available.
LIBIPT = @LIBIPT@
+# Where is libmpfr? This will be empty if libmpfr was not available.
+LIBMPFR = @LIBMPFR@
+
WARN_CFLAGS = @WARN_CFLAGS@
WERROR_CFLAGS = @WERROR_CFLAGS@
GDB_WARN_CFLAGS = $(WARN_CFLAGS)
#
# CLI sub directory definitons
#
-SUBDIR_CLI_OBS = \
- cli-cmds.o \
- cli-decode.o \
- cli-dump.o \
- cli-interp.o \
- cli-logging.o \
- cli-script.o \
- cli-setshow.o \
- cli-utils.o
-
SUBDIR_CLI_SRCS = \
cli/cli-cmds.c \
cli/cli-decode.c \
cli/cli-setshow.c \
cli/cli-utils.c
+SUBDIR_CLI_OBS = $(patsubst %.c,%.o,$(SUBDIR_CLI_SRCS))
+
SUBDIR_CLI_DEPS =
SUBDIR_CLI_LDFLAGS =
SUBDIR_CLI_CFLAGS =
SUBDIR_PYTHON_CFLAGS =
SUBDIR_UNITTESTS_SRCS = \
+ unittests/array-view-selftests.c \
+ unittests/common-utils-selftests.c \
+ unittests/environ-selftests.c \
unittests/function-view-selftests.c \
+ unittests/lookup_name_info-selftests.c \
+ unittests/memory-map-selftests.c \
+ unittests/memrange-selftests.c \
unittests/offset-type-selftests.c \
unittests/optional-selftests.c \
unittests/ptid-selftests.c \
- unittests/scoped_restore-selftests.c
+ unittests/rsp-low-selftests.c \
+ unittests/scoped_restore-selftests.c \
+ unittests/xml-utils-selftests.c
SUBDIR_UNITTESTS_OBS = \
+ array-view-selftests.o \
+ common-utils-selftests.o \
+ environ-selftests.o \
function-view-selftests.o \
+ lookup_name_info-selftests.o \
+ memory-map-selftests.o \
+ memrange-selftests.o \
offset-type-selftests.o \
optional-selftests.o \
ptid-selftests.o \
- scoped_restore-selftests.o
+ rsp-low-selftests.o \
+ scoped_restore-selftests.o \
+ xml-utils-selftests.o
# Opcodes currently live in one of two places. Either they are in the
# opcode library, typically ../opcodes, or they are in a header file
CONFIG_UNINSTALL = @CONFIG_UNINSTALL@
HAVE_NATIVE_GCORE_TARGET = @HAVE_NATIVE_GCORE_TARGET@
+CONFIG_SRC_SUBDIR = arch cli
+CONFIG_DEP_SUBDIR = $(addsuffix /$(DEPDIR),$(CONFIG_SRC_SUBDIR))
+
# -I. for config files.
# -I$(srcdir) for gdb internal headers.
# -I$(srcdir)/config for more generic config files.
$(XM_CLIBS) $(NAT_CLIBS) $(GDBTKLIBS) \
@LIBS@ @GUILE_LIBS@ @PYTHON_LIBS@ \
$(LIBEXPAT) $(LIBLZMA) $(LIBBABELTRACE) $(LIBIPT) \
- $(LIBIBERTY) $(WIN32LIBS) $(LIBGNU) $(LIBICONV)
+ $(LIBIBERTY) $(WIN32LIBS) $(LIBGNU) $(LIBICONV) $(LIBMPFR)
CDEPS = $(XM_CDEPS) $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE_DEPS) \
$(OPCODES) $(INTL_DEPS) $(LIBIBERTY) $(CONFIG_DEPS) $(LIBGNU)
$(srcdir)/features/traceframe-info.dtd \
$(srcdir)/features/xinclude.dtd
-# This is ser-unix.o for any system which supports a v7/BSD/SYSV/POSIX
-# interface to the serial port. Hopefully if get ported to OS/2, VMS,
-# etc., then there will be (as part of the C library or perhaps as
-# part of libiberty) a POSIX interface. But at least for now the
-# host-dependent makefile fragment might need to use something else
-# besides ser-unix.o
+# Build the ser-*.o files the host supports. This includes ser-unix.o
+# for any system that supports a POSIX interface to the serial port.
+# See configure.ac.
SER_HARDWIRE = @SER_HARDWIRE@
# The `remote' debugging target is supported for most architectures,
# All target-dependent objects files that require 64-bit CORE_ADDR
# (used with --enable-targets=all --enable-64-bit-bfd).
ALL_64_TARGET_OBS = \
- aarch64-insn.o \
+ aarch64-fbsd-tdep.o \
aarch64-linux-tdep.o \
aarch64-newlib-tdep.o \
aarch64-tdep.o \
amd64-sol2-tdep.o \
amd64-tdep.o \
amd64-windows-tdep.o \
+ arch/aarch64.o \
+ arch/aarch64-insn.o \
+ arch/amd64.o \
ia64-linux-tdep.o \
ia64-tdep.o \
ia64-vms-tdep.o \
# All other target-dependent objects files (used with --enable-targets=all).
ALL_TARGET_OBS = \
arc-tdep.o \
- arm.o \
+ arch/arm.o \
+ arch/arm-get-next-pcs.o \
+ arch/arm-linux.o \
+ arch/i386.o \
arm-bsd-tdep.o \
- arm-get-next-pcs.o \
- arm-linux.o \
+ arm-fbsd-tdep.o \
arm-linux-tdep.o \
arm-nbsd-tdep.o \
arm-obsd-tdep.o \
agent.c \
annotate.c \
arch-utils.c \
+ arch/i386.c \
auto-load.c \
auxv.c \
ax-gdb.c \
d-valprint.c \
dbxread.c \
demangle.c \
- dfp.c \
dictionary.c \
disasm.c \
disasm-selftests.c \
- doublest.c \
dtrace-probe.c \
dummy-frame.c \
dwarf2-frame.c \
parse.c \
printcmd.c \
probe.c \
+ producer.c \
proc-service.list \
progspace.c \
progspace-and-thread.c \
reverse.c \
rust-exp.y \
rust-lang.c \
- selftest.c \
selftest-arch.c \
sentinel-frame.c \
ser-base.c \
tracepoint.c \
trad-frame.c \
tramp-frame.c \
+ target-float.c \
typeprint.c \
ui-file.c \
ui-file.h \
common/filestuff.c \
common/format.c \
common/job-control.c \
+ common/gdb_tilde_expand.c \
common/gdb_vecs.c \
common/new-op.c \
common/print-utils.c \
common/ptid.c \
common/rsp-low.c \
common/run-time-clock.c \
+ common/selftest.c \
common/signals.c \
common/signals-state-save-restore.c \
common/vec.c \
darwin-nat.h \
dcache.h \
defs.h \
- dfp.h \
dicos-tdep.h \
dictionary.h \
disasm.h \
- doublest.h \
dummy-frame.h \
dwarf2-frame.h \
dwarf2-frame-tailcall.h \
frv-tdep.h \
ft32-tdep.h \
gcore.h \
- gdb.h \
gdb_bfd.h \
gdb_curses.h \
gdb-dlfcn.h \
tracefile.h \
tracepoint.h \
trad-frame.h \
+ target-float.h \
tramp-frame.h \
typeprint.h \
ui-file.h \
xml-syscall.h \
xml-tdesc.h \
xtensa-tdep.h \
+ arch/aarch64.h \
arch/aarch64-insn.h \
arch/arm.h \
+ arch/i386.h \
cli/cli-cmds.h \
cli/cli-decode.h \
cli/cli-script.h \
common/fileio.h \
common/format.h \
common/gdb_assert.h \
+ common/gdb_tilde_expand.h \
common/gdb_locale.h \
common/gdb_setjmp.h \
common/gdb_signals.h \
common/gdb_sys_time.h \
- common/gdb_termios.h \
common/gdb_vecs.h \
common/gdb_wait.h \
common/common-inferior.h \
dbxread.o \
debug.o \
demangle.o \
- dfp.o \
dictionary.o \
disasm.o \
disasm-selftests.o \
- doublest.o \
dummy-frame.o \
dwarf2-frame.o \
dwarf2-frame-tailcall.o \
f-typeprint.o \
f-valprint.o \
fileio.o \
+ filename-seen-cache.o \
filestuff.o \
filesystem.o \
findcmd.o \
frame-unwind.o \
gcore.o \
gdb_bfd.o \
+ gdb_tilde_expand.o \
gdb-dlfcn.o \
gdb_obstack.o \
gdb_regex.o \
print-utils.o \
printcmd.o \
probe.o \
+ producer.o \
progspace.o \
progspace-and-thread.o \
prologue-value.o \
top.o \
trad-frame.o \
tramp-frame.o \
+ target-float.o \
typeprint.o \
ui-file.o \
ui-out.o \
user-regs.o \
utils.o \
- utils-selftests.o \
valarith.o \
valops.o \
valprint.o \
@$(MAKE) $(FLAGS_TO_PASS) DO=all "DODIRS=`echo $(SUBDIRS) | sed 's/testsuite//'`" subdir_do
# Rule for compiling .c files in the top-level gdb directory.
-%.o: %.c
+# The order-only dependencies ensure that we create the build subdirectories.
+%.o: %.c | $(CONFIG_DEP_SUBDIR)
$(COMPILE) $<
$(POSTCOMPILE)
-# Rules for compiling .c files in the various source subdirectories.
-%.o: ${srcdir}/arch/%.c
- $(COMPILE) $<
- $(POSTCOMPILE)
-
-%.o: $(srcdir)/cli/%.c
- $(COMPILE) $<
- $(POSTCOMPILE)
+$(CONFIG_DEP_SUBDIR):
+ $(SHELL) $(srcdir)/../mkinstalldirs $@
+# Rules for compiling .c files in the various source subdirectories.
%.o: ${srcdir}/common/%.c
$(COMPILE) $<
$(POSTCOMPILE)
rm -f test-cp-name-parser$(EXEEXT)
rm -f xml-builtin.c stamp-xml
rm -f $(DEPDIR)/*
+ for i in $(CONFIG_SRC_SUBDIR); do \
+ rm -f $$i/*.o; \
+ rm -f $$i/$(DEPDIR)/*; \
+ done
# This used to depend on c-exp.c m2-exp.c TAGS
# I believe this is wrong; the makefile standards for distclean just
rm -f config.log config.cache
rm -f Makefile
rm -rf $(DEPDIR)
+ for i in $(CONFIG_SRC_SUBDIR); do \
+ rmdir $$i/$(DEPDIR); \
+ done
maintainer-clean: local-maintainer-clean do-maintainer-clean distclean
realclean: maintainer-clean
MAKEOVERRIDES =
ALLDEPFILES = \
+ aarch64-fbsd-nat.c \
+ aarch64-fbsd-tdep.c \
aarch64-linux-nat.c \
aarch64-linux-tdep.c \
aarch64-newlib-tdep.c \
arc-tdep.c \
arm.c \
arm-bsd-tdep.c \
+ arm-fbsd-nat.c \
+ arm-fbsd-tdep.c \
arm-get-next-pcs.c \
arm-linux.c \
arm-linux-nat.c \
bfin-tdep.c \
bsd-kvm.c \
bsd-uthread.c \
- core-regset.c \
darwin-nat.c \
dcache.c \
dcache.c \
# Some files need explicit build rules (due to -Werror problems) or due
# to sub-directory fun 'n' games.
-# FIXME: cagney/2003-08-10: "monitor.c" gets -Wformat-nonliteral
-# errors. It turns out that that is the least of monitor.c's
-# problems. The function print_vsprintf appears to be using
-# va_arg(long) to extract CORE_ADDR parameters - something that
-# definitly will not work. "monitor.c" needs to be rewritten so that
-# it doesn't use format strings and instead uses callbacks.
-monitor.o: $(srcdir)/monitor.c
- $(COMPILE.pre) $(INTERNAL_CFLAGS) $(GDB_WARN_CFLAGS_NO_FORMAT) \
- $(COMPILE.post) $(srcdir)/monitor.c
- $(POSTCOMPILE)
-
# Do not try to build "printcmd.c" with -Wformat-nonliteral. It manually
# checks format strings.
printcmd.o: $(srcdir)/printcmd.c
$(COMPILE.post) $(srcdir)/printcmd.c
$(POSTCOMPILE)
+# Same for "target-float.c".
+target-float.o: $(srcdir)/target-float.c
+ $(COMPILE.pre) $(INTERNAL_CFLAGS) $(GDB_WARN_CFLAGS_NO_FORMAT) \
+ $(COMPILE.post) $(srcdir)/target-float.c
+
# ada-exp.c can appear in srcdir, for releases; or in ., for
# development builds.
ADA_EXP_C = `if test -f ada-exp.c; then echo ada-exp.c; else echo $(srcdir)/ada-exp.c; fi`
# into place if the compile succeeds. We need this because gcc does
# not atomically write the dependency output file.
override COMPILE.post = -c -o $@ -MT $@ -MMD -MP \
- -MF $(DEPDIR)/$(basename $(@F)).Tpo
-override POSTCOMPILE = @mv $(DEPDIR)/$(basename $(@F)).Tpo \
- $(DEPDIR)/$(basename $(@F)).Po
+ -MF $(@D)/$(DEPDIR)/$(basename $(@F)).Tpo
+override POSTCOMPILE = @mv $(@D)/$(DEPDIR)/$(basename $(@F)).Tpo \
+ $(@D)/$(DEPDIR)/$(basename $(@F)).Po
else
override COMPILE.pre = source='$<' object='$@' libtool=no \
- DEPDIR=$(DEPDIR) $(DEPMODE) $(depcomp) $(CC)
+ DEPDIR=$(DEPDIR) $(DEPMODE) $(depcomp) \
+ $(CXX) -x c++ $(CXX_DIALECT)
# depcomp handles atomicity for us, so we don't need a postcompile
# step.
override POSTCOMPILE =