mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-15 04:31:49 +08:00
e7d8f1da71
Some spots in the sim build used manual dependencies, and some spots did a compilation by hand but did not use the automatic dependency tracking code. This patch fixes these spots. I didn't touch ppc, because it doesn't use the common Makefile code. I also didn't touch objects that are for the build machine, because automatic dependencies don't work for those. sim/arm/ChangeLog 2021-04-22 Tom Tromey <tom@tromey.com> * Makefile.in (armemu26.o, armemu32.o): Use COMPILE and POSTCOMPILE. sim/bpf/ChangeLog 2021-04-22 Tom Tromey <tom@tromey.com> * Makefile.in (arch.o, cpu.o, sim-if.o, traps.o): Remove. (mloop-le.o, mloop-be.o, decode-le.o, decode-be.o, sim-le.o) (sim-be.o): Use COMPILE and POSTCOMPILE. (SIM_EXTRA_DEPS): Add eng-le.h, eng-be.h. sim/cr16/ChangeLog 2021-04-22 Tom Tromey <tom@tromey.com> * Makefile.in (SIM_EXTRA_DEPS): New variable. (simops.o): Remove. sim/cris/ChangeLog 2021-04-22 Tom Tromey <tom@tromey.com> * Makefile.in (sim-if.o, dv-cris.o, dv-rv.o, arch.o, traps.o) (devices.o, crisv10f.o, mloopv10f.o, cpuv10.o, decodev10.o) (modelv10.o, crisv32f.o, mloopv32f.o, cpuv32.o, decodev32.o) (modelv32.o): Remove. (SIM_EXTRA_DEPS): Add engv10.h. sim/d10v/ChangeLog 2021-04-22 Tom Tromey <tom@tromey.com> * Makefile.in (SIM_EXTRA_DEPS): New variable. (simops.o): Remove. sim/frv/ChangeLog 2021-04-22 Tom Tromey <tom@tromey.com> * Makefile.in (arch.o, devices.o, frv.o, traps.o, pipeline.o) (interrupts.o, memory.o, cache.o, options.o, reset.o) (registers.o, profile.o, profile-fr400.o, profile-fr450.o) (profile-fr500.o, profile-fr550.o, sim-if.o, mloop.o, cpu.o) (decode.o, sem.o, model.o): Remove. (SIM_EXTRA_DEPS): Add eng.h. sim/iq2000/ChangeLog 2021-04-22 Tom Tromey <tom@tromey.com> * Makefile.in (sim-if.o): Remove. (arch.o): Use COMPILE and POSTCOMPILE. (devices.o, iq2000.o, mloop.o, cpu.o, decode.o, sem.o, model.o): Remove. (SIM_EXTRA_DEPS): Add eng.h. sim/lm32/ChangeLog 2021-04-22 Tom Tromey <tom@tromey.com> * Makefile.in (arch.o, traps.o, sim-if.o, lm32.o, mloop.o) (cpu.o, decode.o, sem.o, model.o): Remove. (SIM_EXTRA_DEPS): Add eng.h. sim/m32r/ChangeLog 2021-04-22 Tom Tromey <tom@tromey.com> * Makefile.in (sim-if.o, arch.o, traps.o, traps-linux.o) (devices.o, m32r.o, mloop.o, cpu.o, decode.o, sem.o, model.o) (m32rx.o, mloopx.o, cpux.o, decodex.o, semx.o, modelx.o) (m32r2.o, mloop2.o, cpu2.o, decode2.o, sem2.o, model2.o): Remove. (SIM_EXTRA_DEPS): Add eng.h, engx.h, eng2.h. sim/m68hc11/ChangeLog 2021-04-22 Tom Tromey <tom@tromey.com> * Makefile.in (interp.o): Remove. sim/mips/ChangeLog 2021-04-22 Tom Tromey <tom@tromey.com> * Makefile.in (interp.o, m16run.o, micromipsrun.o, multi-run.o): Remove. (SIM_EXTRA_DEPS): New variable. sim/mn10300/ChangeLog 2021-04-22 Tom Tromey <tom@tromey.com> * Makefile.in (interp.o): Remove. (idecode.o op_utils.o semantics.o): Remove. sim/or1k/ChangeLog 2021-04-22 Tom Tromey <tom@tromey.com> * Makefile.in (mloop.o, arch.o, cpu.o, decode.o, sem.o) (sem-switch.o, model.o): Remove. sim/rl78/ChangeLog 2021-04-22 Tom Tromey <tom@tromey.com> * Makefile.in (err.o, fpu.o, gdb-if.o, load.o, main.o, mem.o) (reg.o, rl78.o): Remove. sim/rx/ChangeLog 2021-04-22 Tom Tromey <tom@tromey.com> * Makefile.in (err.o, fpu.o, gdb-if.o, load.o, main.o, mem.o) (misc.o, reg.o, rx.o, syscalls.o, trace.o): Remove. sim/sh/ChangeLog 2021-04-22 Tom Tromey <tom@tromey.com> * Makefile.in (SIM_EXTRA_DEPS): New variable. (interp.o): Remove. sim/v850/ChangeLog 2021-04-22 Tom Tromey <tom@tromey.com> * Makefile.in (interp.o, simops.o, semantics.o): Remove.
198 lines
5.7 KiB
Makefile
198 lines
5.7 KiB
Makefile
# Makefile template for configure for the eBPF simulator
|
|
# Copyright (C) 2020-2021 Free Software Foundation, Inc.
|
|
#
|
|
# This file is part of GDB, the GNU debugger.
|
|
#
|
|
# 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/>.
|
|
|
|
## COMMON_PRE_CONFIG_FRAG
|
|
|
|
CGEN_STD_OBJS = cgen-run.o cgen-scache.o cgen-trace.o cgen-utils.o
|
|
BPF_GEN_OBJS = arch.o cpu.o \
|
|
decode-le.o decode-be.o \
|
|
sem-le.o sem-be.o \
|
|
mloop-le.o mloop-be.o
|
|
BPF_HAND_OBJS = bpf.o sim-if.o traps.o bpf-helpers.o
|
|
|
|
SIM_OBJS = \
|
|
$(SIM_NEW_COMMON_OBJS) \
|
|
$(CGEN_STD_OBJS) \
|
|
$(BPF_GEN_OBJS) \
|
|
$(BPF_HAND_OBJS)
|
|
|
|
SIM_EXTRA_DEPS = \
|
|
$(CGEN_INCLUDE_DEPS) \
|
|
arch.h \
|
|
bpf-sim.h \
|
|
eng-le.h eng-be.h \
|
|
$(srcdir)/../../opcodes/bpf-desc.h \
|
|
$(srcdir)/../../opcodes/bpf-opc.h
|
|
|
|
SIM_EXTRA_CLEAN = bpf-clean
|
|
|
|
## COMMON_POST_CONFIG_FRAG
|
|
|
|
# cgen support, enable with --enable-cgen-maint
|
|
CGEN_MAINT = ; @true
|
|
# The following line is commented in or out depending upon --enable-cgen-maint.
|
|
@CGEN_MAINT@CGEN_MAINT =
|
|
|
|
# BPF headers
|
|
|
|
BPF_INCLUDE_DEPS = \
|
|
$(CGEN_MAIN_CPU_DEPS) \
|
|
$(SIM_EXTRA_DEPS) \
|
|
cpu.h cpuall.h \
|
|
decode-le.h decode-be.h \
|
|
defs-le.h defs-be.h \
|
|
eng-le.h eng-be.h \
|
|
config.h
|
|
|
|
# Dependencies for binaries from CGEN generated source
|
|
|
|
mloop-le.o: mloop-le.c
|
|
$(COMPILE) -DWANT_ISA_EBPFLE mloop-le.c
|
|
$(POSTCOMPILE)
|
|
mloop-be.o: mloop-be.c
|
|
$(COMPILE) -DWANT_ISA_EBPFBE mloop-be.c
|
|
$(POSTCOMPILE)
|
|
|
|
decode-le.o: decode-le.c
|
|
$(COMPILE) -DWANT_ISA_EBPFLE $(srcdir)/decode-le.c
|
|
$(POSTCOMPILE)
|
|
decode-be.o: decode-be.c $(BPF_INCLUDE_DEPS)
|
|
$(COMPILE) -DWANT_ISA_EBPFBE $(srcdir)/decode-be.c
|
|
$(POSTCOMPILE)
|
|
|
|
sem-le.o: sem-le.c
|
|
$(COMPILE) -DWANT_ISA_EBPFLE $(srcdir)/sem-le.c
|
|
$(POSTCOMPILE)
|
|
sem-be.o: sem-be.c
|
|
$(COMPILE) -DWANT_ISA_EBPFBE $(srcdir)/sem-be.c
|
|
$(POSTCOMPILE)
|
|
|
|
arch = bpf
|
|
|
|
CGEN_COMMON_DEPS = \
|
|
$(CGEN_READ_SCM) \
|
|
$(srcdir)/../../cpu/bpf.cpu \
|
|
$(srcdir)/../../cpu/bpf.opc \
|
|
Makefile
|
|
|
|
stamp-arch: $(CGEN_COMMON_DEPS) $(CGEN_ARCH_SCM)
|
|
$(MAKE) cgen-arch $(CGEN_FLAGS_TO_PASS) \
|
|
mach=bpf cpu=bpfbf \
|
|
archfile=$(srcdir)/../../cpu/bpf.cpu \
|
|
FLAGS="with-scache"
|
|
touch $@
|
|
$(srcdir)/arch.h $(srcdir)/arch.c $(srcdir)/cpuall.h: $(CGEN_MAINT) stamp-arch
|
|
@true
|
|
|
|
stamp-cpu: $(CGEN_COMMON_DEPS) $(CGEN_CPU_SCM)
|
|
$(MAKE) cgen-cpu $(CGEN_FLAGS_TO_PASS) \
|
|
isa=ebpfle,ebpfbe cpu=bpfbf mach=bpf \
|
|
archfile=$(srcdir)/../../cpu/bpf.cpu \
|
|
FLAGS="with-multiple-isa with-scache"
|
|
rm -f $(srcdir)/model.c
|
|
touch $@
|
|
$(srcdir)/cpu.h $(srcdir)/cpu.c $(srcdir)/model.c: $(CGEN_MAINT) stamp-cpu
|
|
@true
|
|
|
|
# We need to generate a group of files per ISA.
|
|
# For eBPF little-endian:
|
|
# defs-le.h
|
|
# sem-le.c, decode-le.c, decode-le.h
|
|
# $(objdir)/mloop-le.c $(objdir)/eng-le.h
|
|
# For eBPF big-endian:
|
|
# defs-be.h
|
|
# sem-be.c, decode-be.c, decode-be.h
|
|
# $(objdir)/mloop-be.c $(objdir)/eng-le.h
|
|
#
|
|
# The rules below take care of that.
|
|
|
|
stamp-defs-le: $(CGEN_COMMON_DEPS) $(CGEN_CPU_SCM)
|
|
$(MAKE) cgen-defs $(CGEN_FLAGS_TO_PASS) \
|
|
isa=ebpfle cpu=bpfbf mach=bpf \
|
|
archfile=$(srcdir)/../../cpu/bpf.cpu \
|
|
FLAGS="with-scache" \
|
|
SUFFIX="-le"
|
|
touch $@
|
|
$(srcdir)/defs-le.h: $(CGEN_MAINT) stamp-defs-le
|
|
@true
|
|
|
|
|
|
stamp-defs-be: $(CGEN_COMMON_DEPS) $(CGEN_CPU_SCM)
|
|
$(MAKE) cgen-defs $(CGEN_FLAGS_TO_PASS) \
|
|
isa=ebpfbe cpu=bpfbf mach=bpf \
|
|
archfile=$(srcdir)/../../cpu/bpf.cpu \
|
|
FLAGS="with-scache" \
|
|
SUFFIX="-be"
|
|
touch $@
|
|
$(srcdir)/defs-be.h: $(CGEN_MAINT) stamp-defs-be
|
|
@true
|
|
|
|
stamp-decode-le: $(CGEN_COMMON_DEPS) $(CGEN_CPU_SCM) $(GEN_DECODE_SCM)
|
|
$(MAKE) cgen-decode $(CGEN_FLAGS_TO_PASS) \
|
|
isa=ebpfle cpu=bpfbf mach=bpf \
|
|
archfile=$(srcdir)/../../cpu/bpf.cpu \
|
|
FLAGS="with-scache" \
|
|
SUFFIX="-le" \
|
|
EXTRAFILES="$(CGEN_CPU_SEM)"
|
|
touch $@
|
|
$(srcdir)/sem-le.c $(srcdir)/decode-le.c $(srcdir)/decode-le.h: \
|
|
$(CGEN_MAINT) stamp-decode-le
|
|
@true
|
|
|
|
|
|
stamp-decode-be: $(CGEN_COMMON_DEPS) $(CGEN_CPU_SCM) $(GEN_DECODE_SCM)
|
|
$(MAKE) cgen-decode $(CGEN_FLAGS_TO_PASS) \
|
|
isa=ebpfbe cpu=bpfbf mach=bpf \
|
|
archfile=$(srcdir)/../../cpu/bpf.cpu \
|
|
FLAGS="with-scache" \
|
|
SUFFIX="-be" \
|
|
EXTRAFILES="$(CGEN_CPU_SEM)"
|
|
touch $@
|
|
$(srcdir)/sem-be.c $(srcdir)/decode-be.c $(srcdir)/decode-be.h: \
|
|
$(CGEN_MAINT) stamp-decode-be
|
|
@true
|
|
|
|
# Note the following files are generated in objdir, not srcdir.
|
|
|
|
stamp-mloop: stamp-mloop-le stamp-mloop-be
|
|
|
|
stamp-mloop-le: $(srcdir)/../common/genmloop.sh mloop.in Makefile
|
|
$(SHELL) $(srccom)/genmloop.sh -shell $(SHELL) \
|
|
-mono -scache -prefix bpfbf_ebpfle -cpu bpfbf \
|
|
-infile $(srcdir)/mloop.in -outfile-suffix -le
|
|
$(SHELL) $(srcroot)/move-if-change eng-le.hin eng-le.h
|
|
$(SHELL) $(srcroot)/move-if-change mloop-le.cin mloop-le.c
|
|
touch $@
|
|
mloop-le.c eng-le.h: stamp-mloop-le
|
|
@true
|
|
|
|
stamp-mloop-be: $(srcdir)/../common/genmloop.sh mloop.in Makefile
|
|
$(SHELL) $(srccom)/genmloop.sh -shell $(SHELL) \
|
|
-mono -scache -prefix bpfbf_ebpfbe -cpu bpfbf \
|
|
-infile $(srcdir)/mloop.in -outfile-suffix -be
|
|
$(SHELL) $(srcroot)/move-if-change eng-be.hin eng-be.h
|
|
$(SHELL) $(srcroot)/move-if-change mloop-be.cin mloop-be.c
|
|
touch $@
|
|
mloop-be.c eng-be.h: stamp-mloop-be
|
|
@true
|
|
|
|
.PHONY = bpf-clean
|
|
|
|
bpf-clean:
|
|
rm -f stamp-arch stamp-cpu stamp-decode stamp-defs stamp-mloop
|