mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-21 04:42:53 +08:00
0a129eb19a
These rules don't depend on the target compiler settings, so hoist the build logic up to the common builds for better parallelization. We have to extend the genmloop.sh logic a bit to allow outputting to a subdir since it always assumed cwd was the right place. We leave the cgen maintainer rules in the subdirs for now as they aren't normally run, and they rely on cgen logic that has not yet been generalized.
57 lines
1.6 KiB
Makefile
57 lines
1.6 KiB
Makefile
# Makefile for Lattice Mico32 simulator.
|
|
# Contributed by Jon Beniston <jon@beniston.com>
|
|
|
|
## COMMON_PRE_CONFIG_FRAG
|
|
|
|
# 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_HW_DEVICES = lm32cpu lm32timer lm32uart
|
|
|
|
# List of extra dependencies.
|
|
# Generally this consists of simulator specific files included by sim-main.h.
|
|
SIM_EXTRA_DEPS = $(CGEN_INCLUDE_DEPS) $(srcdir)/../../opcodes/lm32-desc.h \
|
|
eng.h
|
|
|
|
# List of flags to always pass to $(CC).
|
|
#SIM_EXTRA_CFLAGS =
|
|
|
|
SIM_EXTRA_CLEAN = lm32-clean
|
|
|
|
# Some modules don't build cleanly yet.
|
|
dv-lm32cpu.o mloop.o sem.o traps.o user.o: SIM_WERROR_CFLAGS =
|
|
|
|
## COMMON_POST_CONFIG_FRAG
|
|
|
|
arch = lm32
|
|
|
|
LM32BF_INCLUDE_DEPS = \
|
|
$(CGEN_MAIN_CPU_DEPS) \
|
|
cpu.h decode.h eng.h
|
|
|
|
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
|