From 8852947daad111938ba951471566e634e8c2e2c9 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Fri, 25 Nov 2005 21:46:08 +0000 Subject: Convert configuration to new build system --- extra/config/Makefile | 115 ++------------------------------------------------ 1 file changed, 4 insertions(+), 111 deletions(-) (limited to 'extra/config/Makefile') diff --git a/extra/config/Makefile b/extra/config/Makefile index e2e637aa8..519d55844 100644 --- a/extra/config/Makefile +++ b/extra/config/Makefile @@ -5,116 +5,9 @@ # Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. # +top_srcdir=../../ top_builddir=../../ include $(top_builddir)Rules.mak - -all: ncurses conf mconf - -ifeq ($(shell uname),SunOS) -LIBS = -lcurses -else -LIBS = -lncurses -endif -ifeq (/usr/include/ncurses/ncurses.h, $(wildcard /usr/include/ncurses/ncurses.h)) - HOSTNCURSES += -I/usr/include/ncurses -DCURSES_LOC="" -else -ifeq (/usr/include/ncurses/curses.h, $(wildcard /usr/include/ncurses/curses.h)) - HOSTNCURSES += -I/usr/include/ncurses -DCURSES_LOC="" -else -ifeq (/usr/local/include/ncurses/ncurses.h, $(wildcard /usr/local/include/ncurses/ncurses.h)) - HOSTCFLAGS += -I/usr/local/include/ncurses -DCURSES_LOC="" -else -ifeq (/usr/local/include/ncurses/curses.h, $(wildcard /usr/local/include/ncurses/curses.h)) - HOSTCFLAGS += -I/usr/local/include/ncurses -DCURSES_LOC="" -else -ifeq (/usr/include/ncurses.h, $(wildcard /usr/include/ncurses.h)) - HOSTNCURSES += -DCURSES_LOC="" -else - HOSTNCURSES += -DCURSES_LOC="" -endif -endif -endif -endif -endif - -CONF_SRC = conf.c -MCONF_SRC = mconf.c -LXD_SRC = lxdialog/checklist.c lxdialog/menubox.c lxdialog/textbox.c \ - lxdialog/yesno.c lxdialog/inputbox.c lxdialog/util.c \ - lxdialog/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)) -MCONF_OBJS = $(patsubst %.c,%.o, $(MCONF_SRC) $(LXD_SRC)) -SHARED_OBJS = $(patsubst %.c,%.o, $(SHARED_SRC)) - -conf: $(CONF_OBJS) $(SHARED_OBJS) - $(HOSTCC) $(NATIVE_LDFLAGS) $^ -o $@ - -mconf: $(MCONF_OBJS) $(SHARED_OBJS) - $(HOSTCC) $(NATIVE_LDFLAGS) $^ -o $@ $(LIBS) - -$(CONF_OBJS): %.o : %.c $(SHARED_DEPS) - $(HOSTCC) $(HOSTCFLAGS) -I. -c $< -o $@ - -$(MCONF_OBJS): %.o : %.c $(SHARED_DEPS) - $(HOSTCC) $(HOSTCFLAGS) $(HOSTNCURSES) -I. -c $< -o $@ - -lkc_defs.h: 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 := 1 - -ifdef LKC_GENPARSER - -%.tab.c %.tab.h: %.y - bison -t -d -v -b $* -p $(notdir $*) $< - -lex.%.c: %.l - flex -P$(notdir $*) -o$@ $< -else - -lex.zconf.o: lex.zconf.c $(SHARED_DEPS) - $(HOSTCC) $(HOSTCFLAGS) -I. -c $< -o $@ - -lex.zconf.c: lex.zconf.c_shipped - 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 - cp zconf.tab.c_shipped zconf.tab.c - -zconf.tab.h: zconf.tab.h_shipped - cp zconf.tab.h_shipped zconf.tab.h -endif - -.PHONY: ncurses - -ncurses: - @echo "main() {}" > lxtemp.c - @if $(HOSTCC) lxtemp.c $(LIBS) ; then \ - $(RM) lxtemp.c a.out; \ - else \ - $(RM) 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 ">>" ;\ - echo ">> Maybe you want to try 'make config', which" ;\ - echo ">> doesn't depend on the Ncurses libraries." ;\ - echo ;\ - exit 1 ;\ - fi - -clean: - $(RM) *.o *~ core $(TARGETS) $(MCONF_OBJS) $(CONF_OBJS) \ - conf mconf zconf.tab.c zconf.tab.h lex.zconf.c lkc_defs.h - +all: objs +include Makefile.in +include $(top_srcdir)Makerules -- cgit v1.2.3