1 # ===========================================================================
2 # OpenWrt configuration targets
3 # These targets are used from top-level makefile
5 # ===========================================================================
6 # Shared Makefile for the various kconfig executables:
7 # conf: Used for defconfig, oldconfig and related targets
8 # mconf: Used for the mconfig target.
9 # Utilizes the lxdialog package
10 # object files used by all kconfig flavours
13 # Platform specific fixes
17 check_lxdialog = $(shell $(SHELL) $(CURDIR)/lxdialog/check-lxdialog.sh -$(1))
18 export CFLAGS += -DKBUILD_NO_NLS -I. $(call check_lxdialog,ccflags)
20 conf-objs := conf.o zconf.tab.o
21 mconf-objs := mconf.o zconf.tab.o
23 lxdialog/checklist.o lxdialog/util.o lxdialog/inputbox.o \
24 lxdialog/textbox.o lxdialog/yesno.o lxdialog/menubox.o
26 clean-files := zconf.tab.c lex.zconf.c zconf.hash.c
31 mconf: $(mconf-objs) $(lxdialog-objs)
32 $(CC) -o $@ $^ $(call check_lxdialog,ldflags $(CC))
35 rm -f *.o lxdialog/*.o $(clean-files) conf mconf
37 zconf.tab.o: zconf.lex.c zconf.hash.c confdata.c
39 kconfig_load.o: lkc_defs.h
43 zconf.hash.c: zconf.gperf
46 cp $@_shipped $@ || bison -l -b $* -p $(notdir $*) $<
49 cp $@_shipped $@ || flex -L -P$(notdir $*) -o$@ $<
52 cp $@_shipped $@ || gperf < $< > $@