diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-02-21 23:35:46 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-04-02 23:35:47 -0400 |
commit | b6b1c790843087e67e85e7cfd3327a872c03c6bc (patch) | |
tree | 761f7448c55252958c11490910ec256c8150b08f /sim/igen/local.mk | |
parent | c2783492b62faa62bc501ffdd18fa0b6aa8d64b6 (diff) | |
download | gdb-b6b1c790843087e67e85e7cfd3327a872c03c6bc.zip gdb-b6b1c790843087e67e85e7cfd3327a872c03c6bc.tar.gz gdb-b6b1c790843087e67e85e7cfd3327a872c03c6bc.tar.bz2 |
sim: igen: merge build into top level
This simplifies the build a bit (especially for deps in port subdirs),
and avoids recursive make. This in turn speeds up the build, and sets
us up for multi-target.
Diffstat (limited to 'sim/igen/local.mk')
-rw-r--r-- | sim/igen/local.mk | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/sim/igen/local.mk b/sim/igen/local.mk new file mode 100644 index 0000000..10f0f6d --- /dev/null +++ b/sim/igen/local.mk @@ -0,0 +1,89 @@ +# The IGEN simulator generator for GDB, the GNU Debugger. +# +# Copyright 2002-2021 Free Software Foundation, Inc. +# +# Contributed by Andrew Cagney. +# +# This file is part of GDB. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +# This makes sure igen is available before building the arch-subdirs which +# need to run the igen tool. +all-recursive: igen/igen$(EXEEXT) + +# Alias for developers. +igen: %D%/igen$(EXEEXT) + +noinst_LIBRARIES += %D%/libigen.a +%C%_libigen_a_SOURCES = \ + %D%/table.c \ + %D%/lf.c \ + %D%/misc.c \ + %D%/filter_host.c \ + %D%/ld-decode.c \ + %D%/ld-cache.c \ + %D%/filter.c \ + %D%/ld-insn.c \ + %D%/gen-model.c \ + %D%/gen-itable.c \ + %D%/gen-icache.c \ + %D%/gen-semantics.c \ + %D%/gen-idecode.c \ + %D%/gen-support.c \ + %D%/gen-engine.c \ + %D%/gen.c + +%C%_igen_SOURCES = %D%/igen.c +%C%_igen_LDADD = %D%/libigen.a + +%D%/igen$(EXEEXT): $(%C%_igen_OBJECTS) $(%C%_igen_DEPENDENCIES) %D%/$(am__dirstamp) + $(AM_V_CCLD)$(LINK_FOR_BUILD) $(%C%_igen_OBJECTS) $(%C%_igen_LDADD) + +# igen is a build-time only tool. Override the default rules for it. +%D%/%.o: %D%/%.c + $(AM_V_CC)$(COMPILE_FOR_BUILD) -c $< -o $@ + +# Build some of the files in standalone mode for developers of igen itself. +%D%/%-main.o: %D%/%.c + $(AM_V_CC)$(COMPILE_FOR_BUILD) -DMAIN -c $< -o $@ + +%C%_filter_SOURCES = +%C%_filter_LDADD = %D%/filter-main.o %D%/libigen.a + +%C%_gen_SOURCES = +%C%_gen_LDADD = %D%/gen-main.o %D%/libigen.a + +%C%_ld_cache_SOURCES = +%C%_ld_cache_LDADD = %D%/ld-cache-main.o %D%/libigen.a + +%C%_ld_decode_SOURCES = +%C%_ld_decode_LDADD = %D%/ld-decode-main.o %D%/libigen.a + +%C%_ld_insn_SOURCES = +%C%_ld_insn_LDADD = %D%/ld-insn-main.o %D%/libigen.a + +%C%_table_SOURCES = +%C%_table_LDADD = %D%/table-main.o %D%/libigen.a + +%C%_IGEN_TOOLS = \ + %D%/igen \ + %D%/filter \ + %D%/gen \ + %D%/ld-cache \ + %D%/ld-decode \ + %D%/ld-insn \ + %D%/table +EXTRA_PROGRAMS += $(%C%_IGEN_TOOLS) +MOSTLYCLEANFILES += $(%C%_IGEN_TOOLS) |