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
16 ifeq ($(shell uname
-s
),FreeBSD
)
17 export CFLAGS
+=-I
/usr
/local
/include
18 export LDFLAGS
+=-L
/usr
/local
/lib
-lintl
21 conf-objs
:= conf.o zconf.tab.o
22 mconf-objs
:= mconf.o zconf.tab.o
24 clean-files
:= lkc_defs.h qconf.moc .tmp_qtcheck \
25 .tmp_gtkcheck zconf.tab.c
lex.zconf.c zconf.hash.c
27 all: conf mconf lxdialog
37 rm -f
*.o
$(clean-files
) conf mconf
38 $(MAKE
) -C lxdialog
clean
40 zconf.tab.o
: lex.zconf.c zconf.hash.c
42 kconfig_load.o
: lkc_defs.h
44 lkc_defs.h
: $(src
)/lkc_proto.h
45 sed
< $< > $@
's/P(\([^,]*\),.*/#define \1 (\*\1_p)/'
49 zconf.hash.c
: zconf.gperf
52 cp
$@_shipped
$@ || bison
-l
-b
$* -p
$(notdir $*) $<
55 cp
$@_shipped
$@ || flex
-L
-P
$(notdir $*) -o
$@
$<
58 cp
$@_shipped
$@ || gperf
< $< > $@