2006-04-20 20:17:34 +00:00
|
|
|
# ===========================================================================
|
2006-04-20 21:00:14 +00:00
|
|
|
# OpenWrt configuration targets
|
2006-04-20 20:17:34 +00:00
|
|
|
# These targets are used from top-level makefile
|
|
|
|
|
|
|
|
# ===========================================================================
|
|
|
|
# Shared Makefile for the various kconfig executables:
|
|
|
|
# conf: Used for defconfig, oldconfig and related targets
|
|
|
|
# mconf: Used for the mconfig target.
|
|
|
|
# Utilizes the lxdialog package
|
|
|
|
# object files used by all kconfig flavours
|
|
|
|
|
|
|
|
conf-objs := conf.o zconf.tab.o
|
|
|
|
mconf-objs := mconf.o zconf.tab.o
|
|
|
|
|
|
|
|
clean-files := lkc_defs.h qconf.moc .tmp_qtcheck \
|
|
|
|
.tmp_gtkcheck zconf.tab.c lex.zconf.c zconf.hash.c
|
|
|
|
|
|
|
|
all: conf mconf lxdialog
|
|
|
|
|
|
|
|
.PHONY: lxdialog
|
|
|
|
lxdialog:
|
|
|
|
$(MAKE) -C lxdialog
|
|
|
|
|
|
|
|
conf: $(conf-objs)
|
|
|
|
mconf: $(mconf-objs)
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f *.o $(clean-files) conf mconf
|
|
|
|
$(MAKE) -C lxdialog clean
|
|
|
|
|
|
|
|
zconf.tab.o: lex.zconf.c zconf.hash.c
|
|
|
|
|
|
|
|
kconfig_load.o: lkc_defs.h
|
|
|
|
|
|
|
|
lkc_defs.h: $(src)/lkc_proto.h
|
|
|
|
sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/'
|
|
|
|
|
|
|
|
zconf.tab.c: zconf.y
|
|
|
|
lex.zconf.c: zconf.l
|
|
|
|
zconf.hash.c: zconf.gperf
|
|
|
|
|
|
|
|
%.tab.c: %.y
|
2006-04-20 21:00:14 +00:00
|
|
|
cp $@_shipped $@ || bison -l -b $* -p $(notdir $*) $<
|
2006-04-20 20:17:34 +00:00
|
|
|
|
|
|
|
lex.%.c: %.l
|
2006-04-20 21:00:14 +00:00
|
|
|
cp $@_shipped $@ || flex -L -P$(notdir $*) -o$@ $<
|
2006-04-20 20:17:34 +00:00
|
|
|
|
|
|
|
%.hash.c: %.gperf
|
2006-04-20 21:00:14 +00:00
|
|
|
cp $@_shipped $@ || gperf < $< > $@
|