NJU-ProjectN/nemu ics2023 initialized
NJU-ProjectN/nemu eb63cf3568dbf4e0c3c6ef462e6ec685550fabbc Merge pull request #76 from rijuyuezhu/master
This commit is contained in:
parent
1efe03efb9
commit
2824efad33
141 changed files with 19573 additions and 0 deletions
40
nemu/tools/kconfig/Makefile
Normal file
40
nemu/tools/kconfig/Makefile
Normal file
|
@ -0,0 +1,40 @@
|
|||
NAME = conf
|
||||
obj := build
|
||||
SRCS += confdata.c expr.c preprocess.c symbol.c util.c
|
||||
SRCS += $(obj)/lexer.lex.c $(obj)/parser.tab.c
|
||||
CC = gcc
|
||||
CFLAGS += -DYYDEBUG
|
||||
INC_PATH += .
|
||||
DISTRO = $(shell cat /etc/os-release | grep PRETTY_NAME | sed 's/PRETTY_NAME=//')
|
||||
|
||||
ifeq ($(DISTRO),"Gentoo Linux")
|
||||
LIBS += -ltinfo
|
||||
endif
|
||||
|
||||
ifeq ($(NAME),conf)
|
||||
SRCS += conf.c
|
||||
else ifeq ($(NAME),mconf)
|
||||
SRCS += mconf.c $(shell find lxdialog/ -name "*.c")
|
||||
LIBS += -lncurses
|
||||
else
|
||||
$(error bad target=$(NAME))
|
||||
endif
|
||||
|
||||
include $(NEMU_HOME)/scripts/build.mk
|
||||
|
||||
$(obj)/lexer.lex.o: $(obj)/parser.tab.h
|
||||
$(obj)/lexer.lex.c: lexer.l $(obj)/parser.tab.h
|
||||
@echo + LEX $@
|
||||
@flex -o $@ $<
|
||||
|
||||
$(obj)/parser.tab.c $(obj)/parser.tab.h: parser.y
|
||||
@echo + YACC $@
|
||||
@bison -v $< --defines=$(obj)/parser.tab.h -o $(obj)/parser.tab.c
|
||||
|
||||
conf:
|
||||
@$(MAKE) -s
|
||||
|
||||
mconf:
|
||||
@$(MAKE) -s NAME=mconf
|
||||
|
||||
.PHONY: conf mconf
|
Loading…
Add table
Add a link
Reference in a new issue