Root/scripts/config/Makefile

1# ===========================================================================
2# OpenWrt configuration targets
3# These targets are used from top-level makefile
4
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
11
12
13# Platform specific fixes
14#
15# FreeBSD
16export CFLAGS+=-DKBUILD_NO_NLS
17
18conf-objs := conf.o zconf.tab.o
19mconf-objs := mconf.o zconf.tab.o
20
21clean-files := lkc_defs.h qconf.moc .tmp_qtcheck \
22           .tmp_gtkcheck zconf.tab.c lex.zconf.c zconf.hash.c
23
24all: conf mconf lxdialog/lxdialog
25
26lxdialog/lxdialog:
27    $(MAKE) -C lxdialog
28
29conf: $(conf-objs)
30mconf: $(mconf-objs)
31
32clean:
33    rm -f *.o $(clean-files) conf mconf
34    $(MAKE) -C lxdialog clean
35
36zconf.tab.o: lex.zconf.c zconf.hash.c confdata.c
37
38kconfig_load.o: lkc_defs.h
39
40lkc_defs.h: $(src)/lkc_proto.h
41    sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/'
42
43zconf.tab.c: zconf.y
44lex.zconf.c: zconf.l
45zconf.hash.c: zconf.gperf
46
47%.tab.c: %.y
48    cp $@_shipped $@ || bison -l -b $* -p $(notdir $*) $<
49
50lex.%.c: %.l
51    cp $@_shipped $@ || flex -L -P$(notdir $*) -o$@ $<
52
53%.hash.c: %.gperf
54    cp $@_shipped $@ || gperf < $< > $@
55

Archive Download this file



interactive