Don't build the ncurses stuff unless it is specifically asked for

-Erik
This commit is contained in:
Eric Andersen 2002-12-13 22:53:28 +00:00
parent c118f99f73
commit 068b6b07ff
4 changed files with 38 additions and 36 deletions

View File

@ -31,7 +31,7 @@ DIRS:=applets archival archival/libunarchive console-tools debianutils \
networking/libiproute networking/udhcp procps loginutils shell \ networking/libiproute networking/udhcp procps loginutils shell \
shellutils sysklogd textutils util-linux libbb libpwdgrp shellutils sysklogd textutils util-linux libbb libpwdgrp
ifdef include_config ifeq ($(strip $(HAVE_DOT_CONFIG)),y)
all: busybox busybox.links #doc all: busybox busybox.links #doc
@ -142,7 +142,7 @@ include/config/MARKER: depend scripts/split-include
include/config.h: .config include/config.h: .config
@if [ ! -x ./scripts/config/conf ] ; then \ @if [ ! -x ./scripts/config/conf ] ; then \
make -C scripts/config; \ make -C scripts/config conf; \
fi; fi;
@./scripts/config/conf -o sysdeps/$(TARGET_OS)/Config.in @./scripts/config/conf -o sysdeps/$(TARGET_OS)/Config.in
@ -154,18 +154,20 @@ finished2:
@echo Finished installing... @echo Finished installing...
@echo @echo
else # ifdef include_config else # ifeq ($(strip $(HAVE_DOT_CONFIG)),y)
all: menuconfig all: menuconfig
ifeq ($(filter-out $(noconfig_targets),$(MAKECMDGOALS)),)
# Targets which don't need .config
# configuration # configuration
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
scripts/config/conf scripts/config/mconf: scripts/config/conf:
make -C scripts/config make -C scripts/config conf
-@if [ ! -f .config ] ; then \
cp sysdeps/$(TARGET_OS)/defconfig .config; \
fi
scripts/config/mconf:
make -C scripts/config ncurses conf mconf
-@if [ ! -f .config ] ; then \ -@if [ ! -f .config ] ; then \
cp sysdeps/$(TARGET_OS)/defconfig .config; \ cp sysdeps/$(TARGET_OS)/defconfig .config; \
fi fi
@ -239,8 +241,7 @@ tags:
ctags -R . ctags -R .
endif # ifeq ($(filter-out $(noconfig_targets),$(MAKECMDGOALS)),) endif # ifeq ($(strip $(HAVE_DOT_CONFIG)),y)
endif # ifdef include_config
.PHONY: dummy subdirs release distclean clean config oldconfig \ .PHONY: dummy subdirs release distclean clean config oldconfig \
menuconfig tags check test tests depend menuconfig tags check test tests depend

View File

@ -103,7 +103,6 @@ endif
# Pull in the user's uClibc configuration # Pull in the user's uClibc configuration
ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),) ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)
include_config := 1
-include $(TOPDIR).config -include $(TOPDIR).config
endif endif

View File

@ -5,52 +5,44 @@
TOPDIR=../../ TOPDIR=../../
include $(TOPDIR)Rules.mak include $(TOPDIR)Rules.mak
all: ncurses conf mconf all: ncurses conf mconf
#HOSTCFLAGS=-Wall -g -O0
LIBS = -lncurses LIBS = -lncurses
ifeq (/usr/include/ncurses/ncurses.h, $(wildcard /usr/include/ncurses/ncurses.h)) ifeq (/usr/include/ncurses/ncurses.h, $(wildcard /usr/include/ncurses/ncurses.h))
HOSTCFLAGS += -I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>" HOSTNCURSES += -I/usr/include/ncurses -DCURSES_LOC="<ncurses.h>"
else else
ifeq (/usr/include/ncurses/curses.h, $(wildcard /usr/include/ncurses/curses.h)) ifeq (/usr/include/ncurses/curses.h, $(wildcard /usr/include/ncurses/curses.h))
HOSTCFLAGS += -I/usr/include/ncurses -DCURSES_LOC="<ncurses/curses.h>" HOSTNCURSES += -I/usr/include/ncurses -DCURSES_LOC="<ncurses/curses.h>"
else else
ifeq (/usr/include/ncurses.h, $(wildcard /usr/include/ncurses.h)) ifeq (/usr/include/ncurses.h, $(wildcard /usr/include/ncurses.h))
HOSTCFLAGS += -DCURSES_LOC="<ncurses.h>" HOSTNCURSES += -DCURSES_LOC="<ncurses.h>"
else else
HOSTCFLAGS += -DCURSES_LOC="<curses.h>" HOSTNCURSES += -DCURSES_LOC="<curses.h>"
endif endif
endif endif
endif endif
CONF_SRC =conf.c zconf.tab.c CONF_SRC =conf.c
MCONF_SRC =mconf.c zconf.tab.c MCONF_SRC =mconf.c checklist.c menubox.c textbox.c yesno.c inputbox.c util.c msgbox.c
LXDLG_SRC =checklist.c menubox.c textbox.c yesno.c inputbox.c util.c msgbox.c SHARED_SRC=zconf.tab.c
SHARED_DEPS:=lkc.h lkc_proto.h lkc_defs.h expr.h zconf.tab.h
CONF_OBJS =$(patsubst %.c,%.o, $(CONF_SRC)) CONF_OBJS =$(patsubst %.c,%.o, $(CONF_SRC))
MCONF_OBJS=$(patsubst %.c,%.o, $(MCONF_SRC)) MCONF_OBJS=$(patsubst %.c,%.o, $(MCONF_SRC))
LXDLG_OBJS=$(patsubst %.c,%.o, $(LXDLG_SRC)) SHARED_OBJS=$(patsubst %.c,%.o, $(SHARED_SRC))
conf: $(CONF_OBJS) conf: $(CONF_OBJS) $(SHARED_OBJS)
$(HOSTCC) $(HOSTCFLAGS) $(NATIVE_LDFLAGS) $^ -o $@ $(HOSTCC) $(NATIVE_LDFLAGS) $^ -o $@
mconf: $(MCONF_OBJS) $(LXDLG_OBJS) mconf: $(MCONF_OBJS) $(SHARED_OBJS)
$(HOSTCC) $(HOSTCFLAGS) $(NATIVE_LDFLAGS) $^ -o $@ $(LIBS) $(HOSTCC) $(NATIVE_LDFLAGS) $^ -o $@ $(LIBS)
lkc_deps:=lkc.h lkc_proto.h lkc_defs.h expr.h zconf.tab.h $(CONF_OBJS): %.o : %.c $(SHARED_DEPS)
conf.o: conf.c $(lkc_deps)
mconf.o: mconf.c $(lkc_deps)
zconf.tab.o: zconf.tab.c lex.zconf.c confdata.c expr.c symbol.c menu.c $(lkc_deps)
lex.zconf.o: lex.zconf.c $(lkc_deps)
%.o : %.c
$(HOSTCC) $(HOSTCFLAGS) -I. -c $< -o $@ $(HOSTCC) $(HOSTCFLAGS) -I. -c $< -o $@
$(MCONF_OBJS): %.o : %.c $(SHARED_DEPS)
$(HOSTCC) $(HOSTCFLAGS) $(HOSTNCURSES) -I. -c $< -o $@
lkc_defs.h: lkc_proto.h lkc_defs.h: lkc_proto.h
@sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/' @sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/'
@ -69,9 +61,15 @@ lex.%.c: %.l
flex -P$(notdir $*) -o$@ $< flex -P$(notdir $*) -o$@ $<
else else
lex.zconf.o: lex.zconf.c $(SHARED_DEPS)
$(HOSTCC) $(HOSTCFLAGS) -I. -c $< -o $@
lex.zconf.c: lex.zconf.c_shipped lex.zconf.c: lex.zconf.c_shipped
cp lex.zconf.c_shipped lex.zconf.c cp lex.zconf.c_shipped lex.zconf.c
zconf.tab.o: zconf.tab.c lex.zconf.c confdata.c expr.c symbol.c menu.c $(SHARED_DEPS)
$(HOSTCC) $(HOSTCFLAGS) -I. -c $< -o $@
zconf.tab.c: zconf.tab.c_shipped zconf.tab.c: zconf.tab.c_shipped
cp zconf.tab.c_shipped zconf.tab.c cp zconf.tab.c_shipped zconf.tab.c

View File

@ -5,6 +5,10 @@
mainmenu "BusyBox Configuration" mainmenu "BusyBox Configuration"
config HAVE_DOT_CONFIG
bool
default y
menu "General Configuration" menu "General Configuration"
choice choice