> compile NEMU
ysyx_22040000 李心杨 Linux calcite 6.1.71 #1-NixOS SMP PREEMPT_DYNAMIC Fri Jan 5 14:18:41 UTC 2024 x86_64 GNU/Linux 14:15:08 up 3:09, 2 users, load average: 0.44, 0.56, 0.61
This commit is contained in:
parent
e98c720d0b
commit
e57e2391ee
4 changed files with 14 additions and 6 deletions
|
@ -50,13 +50,21 @@
|
||||||
libllvm
|
libllvm
|
||||||
];
|
];
|
||||||
|
|
||||||
bulidPhase = ''
|
configurePhase = ''
|
||||||
make defconfig
|
echo NEMU_HOME=$NEMU_HOME
|
||||||
|
make -f scripts/config.mk rv32_defconfig
|
||||||
|
'';
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
make app
|
make app
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
cp
|
make install
|
||||||
|
'';
|
||||||
|
|
||||||
|
checkPhase = ''
|
||||||
|
make test
|
||||||
'';
|
'';
|
||||||
|
|
||||||
NEMU_HOME = src;
|
NEMU_HOME = src;
|
||||||
|
|
|
@ -43,12 +43,12 @@ $(OBJ_DIR)/%.o: %.cc
|
||||||
$(OBJ_DIR)/%.tag.c: %.y
|
$(OBJ_DIR)/%.tag.c: %.y
|
||||||
@echo + YACC $<
|
@echo + YACC $<
|
||||||
@mkdir -p $(dir $@)
|
@mkdir -p $(dir $@)
|
||||||
@$(YACC) $(YFLAGS) --header=$(<:.y=.h) -o $@ $<
|
@$(YACC) $(YFLAGS) --header=$(dir %)/$(<:.y=.h) -o $@ $<
|
||||||
|
|
||||||
$(OBJ_DIR)/%.yy.c: %.l $(OBJ_DIR)/%.tag.c
|
$(OBJ_DIR)/%.yy.c: %.l $(OBJ_DIR)/%.tag.c
|
||||||
@echo + LEX $<
|
@echo + LEX $<
|
||||||
@mkdir -p $(dir $@)
|
@mkdir -p $(dir $@)
|
||||||
@$(LEX) $(LFLAGS) --header=$(<:.l=_lex.h) -o $@ $<
|
@$(LEX) $(LFLAGS) --header=$(dir %)/$(<:.l=_lex.h) -o $@ $<
|
||||||
|
|
||||||
$(OBJ_DIR)/%.tag.o: $(OBJ_DIR)/%.tag.c
|
$(OBJ_DIR)/%.tag.o: $(OBJ_DIR)/%.tag.c
|
||||||
@echo + CC $<
|
@echo + CC $<
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
SRCS-y += src/monitor/sdb/addrexp.tag.c src/monitor/sdb/addrexp.yy.c
|
SRCS-y += src/monitor/sdb/addrexp.tag.c src/monitor/sdb/addrexp.yy.c
|
||||||
INC_PATH += src/monitor/sdb
|
INC_PATH += $(OBJ_DIR)/src/monitor/sdb
|
||||||
LFLAGS += -DYY_NO_UNPUT -DYY_NO_INPUT
|
LFLAGS += -DYY_NO_UNPUT -DYY_NO_INPUT
|
||||||
|
|
Loading…
Reference in a new issue