9 include $(top_srcdir
)Rules.mak
10 include $(top_srcdir
)Makerules
13 top_srcdir
:=$(shell cd
$(top_srcdir
) && pwd
)/
16 obj
:= $(top_builddir
)$(src
)
18 generated
:= $(patsubst %_shipped
,%,$(wildcard *_shipped
))
19 generated
:= $(addprefix $(obj
)/,$(generated
:.c
=.o
))
21 include $(top_srcdir
)extra
/config
/Makefile.kconfig
22 HOST_EXTRACFLAGS
+= -DCONFIG_
='""'
24 # do not create temporary object in the readonly srctree
25 $(obj
)/dochecklxdialog
: CONFIG_SHELL
:=cd
$(obj
) && $(CONFIG_SHELL
)
26 HOSTCFLAGS_zconf.
lex.o
:= -I
$(top_srcdir
)$(src
)
27 HOSTCFLAGS_zconf.tab.o
:= -I
$(top_srcdir
)$(src
)
28 conf-objs
:= $(addprefix $(obj
)/,$(conf-objs
))
29 mconf-objs
:= $(addprefix $(obj
)/,$(mconf-objs
))
30 nconf-objs
:= $(addprefix $(obj
)/,$(nconf-objs
))
31 kxgettext-objs
:= $(addprefix $(obj
)/,$(kxgettext-objs
))
33 ifeq ($(findstring mconf
,$(MAKECMDGOALS
)),mconf
)
36 ifeq ($(findstring nconf
,$(MAKECMDGOALS
)),nconf
)
40 __hostprogs
:= $(sort $(hostprogs-y
) $(hostprogs-m
))
41 host-csingle
:= $(foreach m
,$(__hostprogs
),$(if
$($(m
)-objs
),,$(m
)))
42 host-cmulti
:= $(foreach m
,$(__hostprogs
),\
43 $(if
$($(m
)-cxxobjs
),,$(if
$($(m
)-objs
),$(m
))))
44 host-cobjs
:= $(sort $(foreach m
,$(__hostprogs
),$($(m
)-objs
)))
46 conf mconf nconf kxgettext
: %: $(obj
)/%
47 $(obj
)/conf
$(obj
)/mconf
$(obj
)/nconf
$(obj
)/kxgettext
: BUILD_LDFLAGS
=$(HOSTLOADLIBES_
$(@F
))
48 $(obj
)/conf
: $(conf-objs
)
50 $(obj
)/mconf
: $(mconf-objs
)
52 $(obj
)/nconf
: $(nconf-objs
)
54 $(obj
)/kxgettext
: $(kxgettext-objs
)
57 $(host-csingle
) $(host-cmulti
) $(host-cobjs
): BUILD_CFLAGS
+=$(HOST_EXTRACFLAGS
) \
58 $(HOSTCFLAGS
) $(HOSTCFLAGS_
$(@F
))
60 host-cobjs.nogen
:= $(filter-out $(generated
),$(host-cobjs
))
61 host-cobjs.generated
:= $(filter $(generated
),$(host-cobjs
))
63 $(host-cobjs.nogen
): $(obj
)/%.o
: $(top_srcdir
)$(src
)/%.c
65 $(host-cobjs.generated
): $(obj
)/%.o
: $(obj
)/%.c
68 # we use the pre-generated always
69 $(obj
)/%:: $(top_srcdir
)$(src
)/%_shipped
73 CLEAN_extra
/config menuconfig_clean
:
74 $(do_rm
) $(clean-files
) $(lxdialog
) conf
$(wildcard *.o
)
75 distclean: CLEAN_extra
/config
76 $(Q
)$(RM
) -r
$(lxdialog
) $(conf-objs
) $(mconf-objs
) $(nconf-objs
) \
78 $(hostprogs-y
) $(qconf-cxxobjs
) $(qconf-objs
) $(gconf-objs
) \
80 $(top_builddir
)include/config
$(top_builddir
)include/generated
82 .PHONY
: clean distclean $(PHONY
)