summaryrefslogtreecommitdiff
path: root/package/config/Makefile
diff options
context:
space:
mode:
authorAlper Yildirim <ayildirim@aselsan.com>2009-07-20 19:17:10 +0200
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2009-07-27 16:07:00 +0200
commitb0df9df39ad76bdf89d1f58996cd4a1c2632b47c (patch)
treeb7c7c6150b093b7eb34e6b46e4383491d9bb21bb /package/config/Makefile
parent4b3e11b3e7d00881878f45cddbfe8f4bf07d1ebe (diff)
config: Add support for xconfig
It involved: * Modifying the top-level Makefile to create the xconfig target, and the $(CONFIG)/qconf target to compile the qconf utility * Modifying the package/config/Makefile magic so that C++ files and binaries gets linked properly, re-using the package/config/Makefile.kconfig logic inherited from the kernel * Hacking a little bit package/config/Makefile.kconfig in a way similar to the modifications done for the mconf (menuconfig interface) Signed-off-by: Alper Yildirim <ayildirim@aselsan.com>
Diffstat (limited to 'package/config/Makefile')
-rw-r--r--package/config/Makefile9
1 files changed, 9 insertions, 0 deletions
diff --git a/package/config/Makefile b/package/config/Makefile
index 3af4bd8de..a2184fa3c 100644
--- a/package/config/Makefile
+++ b/package/config/Makefile
@@ -14,7 +14,10 @@ __hostprogs := $(sort $(hostprogs-y) $(hostprogs-m))
host-csingle := $(foreach m,$(__hostprogs),$(if $($(m)-objs),,$(m)))
host-cmulti := $(foreach m,$(__hostprogs),\
$(if $($(m)-cxxobjs),,$(if $($(m)-objs),$(m))))
+host-cxxmulti := $(foreach m,$(__hostprogs),\
+ $(if $($(m)-cxxobjs),$(m),$(if $($(m)-objs),)))
host-cobjs := $(sort $(foreach m,$(__hostprogs),$($(m)-objs)))
+host-cxxobjs := $(sort $(foreach m,$(__hostprogs),$($(m)-cxxobjs)))
$(host-csingle): %: %.c
$(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $< $(HOST_LOADLIBES) -o $@
@@ -22,9 +25,15 @@ $(host-csingle): %: %.c
$(host-cmulti): %: $(host-cobjs) $(host-cshlib)
$(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $($@-objs) $(HOST_LOADLIBES) -o $@
+$(host-cxxmulti): %: $(host-cxxobjs) $(host-cobjs) $(host-cshlib)
+ $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $($@-objs) $($@-cxxobjs) $(HOSTLOADLIBES_$@) -o $@
+
$(host-cobjs): %.o: %.c
$(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) -c $< -o $@
+$(host-cxxobjs): %.o: %.cc
+ $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCXXFLAGS_$@) -c $< -o $@
+
$(obj)/%:: $(src)/%_shipped
$(Q)cat $< > $@