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
|
|
|
|
|
2006-08-02 13:36:20 +00:00
|
|
|
|
|
|
|
# Platform specific fixes
|
|
|
|
#
|
|
|
|
# FreeBSD
|
2013-04-18 12:05:16 +00:00
|
|
|
|
|
|
|
check_lxdialog = $(shell $(SHELL) $(CURDIR)/lxdialog/check-lxdialog.sh -$(1))
|
|
|
|
export CFLAGS += -DKBUILD_NO_NLS -I. $(call check_lxdialog,ccflags)
|
2017-10-29 16:15:49 +00:00
|
|
|
export CXXFLAGS += -DKBUILD_NO_NLS
|
2006-08-02 13:36:20 +00:00
|
|
|
|
2006-04-20 20:17:34 +00:00
|
|
|
conf-objs := conf.o zconf.tab.o
|
|
|
|
mconf-objs := mconf.o zconf.tab.o
|
2013-04-18 12:05:16 +00:00
|
|
|
lxdialog-objs := \
|
|
|
|
lxdialog/checklist.o lxdialog/util.o lxdialog/inputbox.o \
|
|
|
|
lxdialog/textbox.o lxdialog/yesno.o lxdialog/menubox.o
|
2006-04-20 20:17:34 +00:00
|
|
|
|
2013-04-18 12:05:16 +00:00
|
|
|
clean-files := zconf.tab.c lex.zconf.c zconf.hash.c
|
2006-04-20 20:17:34 +00:00
|
|
|
|
2013-04-18 12:05:16 +00:00
|
|
|
all: conf mconf
|
2006-04-20 20:17:34 +00:00
|
|
|
|
|
|
|
conf: $(conf-objs)
|
2013-04-18 12:05:16 +00:00
|
|
|
mconf: $(mconf-objs) $(lxdialog-objs)
|
|
|
|
$(CC) -o $@ $^ $(call check_lxdialog,ldflags $(CC))
|
2006-04-20 20:17:34 +00:00
|
|
|
|
|
|
|
clean:
|
2013-04-18 12:05:16 +00:00
|
|
|
rm -f *.o lxdialog/*.o $(clean-files) conf mconf
|
2006-04-20 20:17:34 +00:00
|
|
|
|
2013-04-18 12:05:16 +00:00
|
|
|
zconf.tab.o: zconf.lex.c zconf.hash.c confdata.c
|
2006-04-20 20:17:34 +00:00
|
|
|
|
|
|
|
kconfig_load.o: lkc_defs.h
|
|
|
|
|
|
|
|
zconf.tab.c: zconf.y
|
2013-04-18 12:05:16 +00:00
|
|
|
zconf.lex.c: zconf.l
|
2006-04-20 20:17:34 +00:00
|
|
|
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
|
|
|
|
2013-04-18 12:05:16 +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 < $< > $@
|