📄 makefile
字号:
# Makefile for BusyBox## Copyright (C) 2002 Erik Andersen <andersen@codepoet.org>top_srcdir=../..top_builddir=../..srcdir=$(top_srcdir)/scripts/configinclude $(top_srcdir)/Rules.makall: ncurses conf mconfifeq ($(shell uname),SunOS)LIBS = -lcurseselseLIBS = -lncursesendififeq (/usr/include/ncurses/ncurses.h, $(wildcard /usr/include/ncurses/ncurses.h)) HOSTNCURSES += -I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>"elseifeq (/usr/include/ncurses/curses.h, $(wildcard /usr/include/ncurses/curses.h)) HOSTNCURSES += -I/usr/include/ncurses -DCURSES_LOC="<ncurses/curses.h>"elseifeq (/usr/local/include/ncurses/ncurses.h, $(wildcard /usr/local/include/ncurses/ncurses.h)) HOSTCFLAGS += -I/usr/local/include/ncurses -DCURSES_LOC="<ncurses.h>"elseifeq (/usr/local/include/ncurses/curses.h, $(wildcard /usr/local/include/ncurses/curses.h)) HOSTCFLAGS += -I/usr/local/include/ncurses -DCURSES_LOC="<ncurses/curses.h>"elseifeq (/usr/include/ncurses.h, $(wildcard /usr/include/ncurses.h)) HOSTNCURSES += -DCURSES_LOC="<ncurses.h>"else HOSTNCURSES += -DCURSES_LOC="<curses.h>"endifendifendifendifendifCONF_SRC = conf.cMCONF_SRC = mconf.cLXD_SRC = lxdialog/checklist.c lxdialog/menubox.c lxdialog/textbox.c \ lxdialog/yesno.c lxdialog/inputbox.c lxdialog/util.c \ lxdialog/msgbox.cSHARED_SRC = zconf.tab.cSHARED_DEPS := $(srcdir)/lkc.h $(srcdir)/lkc_proto.h \ lkc_defs.h $(srcdir)/expr.h zconf.tab.hCONF_OBJS = $(patsubst %.c,%.o, $(CONF_SRC))MCONF_OBJS = $(patsubst %.c,%.o, $(MCONF_SRC) $(LXD_SRC))SHARED_OBJS = $(patsubst %.c,%.o, $(SHARED_SRC))conf: $(CONF_OBJS) $(SHARED_OBJS) $(SECHO) " "HOSTCC $@ ; true $(Q)$(HOSTCC) $(NATIVE_LDFLAGS) $^ -o $@mconf: $(MCONF_OBJS) $(SHARED_OBJS) $(SECHO) " "HOSTCC $@ ; true $(Q)$(HOSTCC) $(NATIVE_LDFLAGS) $^ -o $@ $(LIBS)$(CONF_OBJS): %.o : $(srcdir)/%.c $(SHARED_DEPS) $(compile.h) -I.$(MCONF_OBJS): %.o : $(srcdir)/%.c $(SHARED_DEPS) @[ -d $(@D) ] || mkdir $(@D) $(compile.h) $(HOSTNCURSES) -I.lkc_defs.h: $(srcdir)/lkc_proto.h @$(SED) < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/'#### The following requires flex/bison# By default we use the _shipped versions, uncomment the# following line if you are modifying the flex/bison src.#LKC_GENPARSER := 1ifdef LKC_GENPARSER%.tab.c %.tab.h: $(srcdir)/%.y bison -t -d -v -b $* -p $(notdir $*) $<lex.%.c: $(srcdir)/%.l flex -P$(notdir $*) -o$@ $<elselex.zconf.o: lex.zconf.c $(SHARED_DEPS) $(compile.h) -I$(srcdir)lex.zconf.c: $(srcdir)/lex.zconf.c_shipped $(Q)cp $< $@zconf.tab.c: $(srcdir)/zconf.tab.c_shipped $(Q)cp $< $@zconf.tab.h: $(srcdir)/zconf.tab.h_shipped $(Q)cp $< $@endifzconf.tab.o: zconf.tab.c lex.zconf.c $(srcdir)/confdata.c $(srcdir)/expr.c \ $(srcdir)/symbol.c $(srcdir)/menu.c $(SHARED_DEPS) $(compile.h) -I$(srcdir) -I..PHONY: ncursesncurses: @echo "main() {}" > lxtemp.c @if $(HOSTCC) lxtemp.c $(LIBS) ; then \ rm -f lxtemp.c a.out; \ else \ rm -f lxtemp.c; \ echo -e "\007" ;\ echo ">> Unable to find the Ncurses libraries." ;\ echo ">>" ;\ echo ">> You must have Ncurses installed in order" ;\ echo ">> to use 'make menuconfig'" ;\ echo ;\ exit 1 ;\ ficlean: rm -f *.o *~ core $(TARGETS) $(MCONF_OBJS) $(CONF_OBJS) \ conf mconf zconf.tab.c zconf.tab.h lex.zconf.c lkc_defs.h
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -