sim: cgen: unify the genmloop logic a bit

Pull out the common parts of the genmloop invocation into the common
code.  This will make it easier to add more, and make the per-port
differences a little more obvious.
This commit is contained in:
Mike Frysinger
2023-12-19 19:54:13 -05:00
parent 515603a732
commit 09d4e6bb2f
8 changed files with 64 additions and 72 deletions

View File

@@ -72,11 +72,10 @@ BUILT_SOURCES += %D%/eng.h
## FIXME: Use of `mono' is wip.
%D%/mloop.c %D%/eng.h: %D%/stamp-mloop ; @true
%D%/stamp-mloop: $(srccom)/genmloop.sh %D%/mloop.in
$(AM_V_GEN)$(SHELL) $(srccom)/genmloop.sh -shell $(SHELL) \
%D%/stamp-mloop: %D%/mloop.in $(srccom)/genmloop.sh
$(AM_V_GEN)$(CGEN_GEN_MLOOP) \
-mono -fast -pbb -switch sem-switch.c \
-cpu lm32bf \
-infile $(srcdir)/%D%/mloop.in -outfile-prefix %D%/
-cpu lm32bf
$(AM_V_at)$(SHELL) $(srcroot)/move-if-change %D%/eng.hin %D%/eng.h
$(AM_V_at)$(SHELL) $(srcroot)/move-if-change %D%/mloop.cin %D%/mloop.c
$(AM_V_at)touch $@