> 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:23:41  up   3:18,  2 users,  load average: 1.90, 1.06, 0.79
This commit is contained in:
tracer-ysyx 2024-01-13 14:23:41 +08:00 committed by xinyangli
parent 1b6da73d6c
commit 8190bd4c1f
2 changed files with 5 additions and 6 deletions

View file

@ -10,7 +10,7 @@ endif
WORK_DIR = $(shell pwd)
BUILD_DIR = $(WORK_DIR)/build
INC_PATH := $(WORK_DIR)/include $(INC_PATH)
INC_PATH := $(WORK_DIR)/include $(BUILD_DIR)/include $(INC_PATH)
OBJ_DIR = $(BUILD_DIR)/obj-$(NAME)$(SO)
BINARY = $(BUILD_DIR)/$(NAME)$(SO)
@ -42,13 +42,13 @@ $(OBJ_DIR)/%.o: %.cc
$(OBJ_DIR)/%.tag.c: %.y
@echo + YACC $<
@mkdir -p $(dir $@)
@$(YACC) $(YFLAGS) --header=$(dir %)/$(<:.y=.h) -o $@ $<
@mkdir -p $(dir $@) $(BUILD_DIR)/include
@$(YACC) $(YFLAGS) --header=$(BUILD_DIR)/include/$(notdir $(<:.y=.h)) -o $@ $<
$(OBJ_DIR)/%.yy.c: %.l $(OBJ_DIR)/%.tag.c
@echo + LEX $<
@mkdir -p $(dir $@)
@$(LEX) $(LFLAGS) --header=$(dir %)/$(<:.l=_lex.h) -o $@ $<
@mkdir -p $(dir $@) $(BUILD_DIR)/include
@$(LEX) $(LFLAGS) --header=$(BUILD_DIR)/include/$(notdir $(<:.l=_lex.h)) -o $@ $<
$(OBJ_DIR)/%.tag.o: $(OBJ_DIR)/%.tag.c
@echo + CC $<

View file

@ -1,3 +1,2 @@
SRCS-y += src/monitor/sdb/addrexp.tag.c src/monitor/sdb/addrexp.yy.c
INC_PATH += $(OBJ_DIR)/src/monitor/sdb
LFLAGS += -DYY_NO_UNPUT -DYY_NO_INPUT