mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-02-17 13:10:12 +08:00
We need these in the top-level to generate libsim.a, but also in the subdirs to generate hw-config.h. Move it to the local.mk, and pass it down when running recursive make. This avoids duplication, and makes it available to both. We can simplify this once we move the various steps up to the top-level too.
40 lines
1.1 KiB
Makefile
40 lines
1.1 KiB
Makefile
# Makefile for Lattice Mico32 simulator.
|
|
# Contributed by Jon Beniston <jon@beniston.com>
|
|
|
|
## COMMON_PRE_CONFIG_FRAG
|
|
|
|
arch = lm32
|
|
|
|
# List of object files, less common parts.
|
|
SIM_OBJS = \
|
|
$(SIM_NEW_COMMON_OBJS) \
|
|
cgen-utils.o cgen-trace.o cgen-scache.o \
|
|
cgen-run.o \
|
|
sim-if.o arch.o \
|
|
cpu.o decode.o sem.o model.o mloop.o \
|
|
lm32.o traps.o user.o
|
|
|
|
SIM_EXTRA_CLEAN = lm32-clean
|
|
|
|
## COMMON_POST_CONFIG_FRAG
|
|
|
|
lm32-clean:
|
|
rm -f stamp-arch stamp-cpu
|
|
rm -f tmp-*
|
|
|
|
stamp-arch: $(CGEN_READ_SCM) $(CGEN_ARCH_SCM) $(CPU_DIR)/lm32.cpu
|
|
$(MAKE) cgen-arch $(CGEN_FLAGS_TO_PASS) mach=all \
|
|
archfile=$(CPU_DIR)/lm32.cpu \
|
|
FLAGS="with-scache with-profile=fn"
|
|
$(SILENCE) touch $@
|
|
arch.h arch.c cpuall.h: $(CGEN_MAINT) stamp-arch
|
|
|
|
stamp-cpu: $(CGEN_READ_SCM) $(CGEN_CPU_SCM) $(CGEN_DECODE_SCM) $(CPU_DIR)/lm32.cpu
|
|
$(MAKE) cgen-cpu-decode $(CGEN_FLAGS_TO_PASS) \
|
|
cpu=lm32bf mach=lm32 SUFFIX= \
|
|
archfile=$(CPU_DIR)/lm32.cpu \
|
|
FLAGS="with-scache with-profile=fn" \
|
|
EXTRAFILES="$(CGEN_CPU_SEM) $(CGEN_CPU_SEMSW)"
|
|
$(SILENCE) touch $@
|
|
cpu.h sem.c sem-switch.c model.c decode.c decode.h: $(CGEN_MAINT) stamp-cpu
|