[MINI2440] Initial board support
[openwrt/mini2440.git] / scripts / config / Makefile
blob54c5fe25afe811e7df1cae401e7235f930b49e28
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
15 # FreeBSD
16 export CFLAGS+=-DKBUILD_NO_NLS
18 conf-objs := conf.o zconf.tab.o
19 mconf-objs := mconf.o zconf.tab.o
21 clean-files := lkc_defs.h qconf.moc .tmp_qtcheck \
22 .tmp_gtkcheck zconf.tab.c lex.zconf.c zconf.hash.c
24 all: conf mconf lxdialog/lxdialog
26 lxdialog/lxdialog:
27 $(MAKE) -C lxdialog
29 conf: $(conf-objs)
30 mconf: $(mconf-objs)
32 clean:
33 rm -f *.o $(clean-files) conf mconf
34 $(MAKE) -C lxdialog clean
36 zconf.tab.o: lex.zconf.c zconf.hash.c confdata.c
38 kconfig_load.o: lkc_defs.h
40 lkc_defs.h: $(src)/lkc_proto.h
41 sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/'
43 zconf.tab.c: zconf.y
44 lex.zconf.c: zconf.l
45 zconf.hash.c: zconf.gperf
47 %.tab.c: %.y
48 cp $@_shipped $@ || bison -l -b $* -p $(notdir $*) $<
50 lex.%.c: %.l
51 cp $@_shipped $@ || flex -L -P$(notdir $*) -o$@ $<
53 %.hash.c: %.gperf
54 cp $@_shipped $@ || gperf < $< > $@