summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2014-11-23 23:25:23 (EST)
committer P. J. McDermott <pj@pehjota.net>2014-11-23 23:25:23 (EST)
commita83c6855033dd5fa178a7b4fdc793be390a4b5b6 (patch)
treebd08891c8bdce90a89784c4d9aef1a9754acb17f
parent58c4c89a46e6a5502c21362b39467be3f47d671e (diff)
Makefile.br: New file
This is support/kconfig/Makefile.br from commit b58bf60 in Buildroot.
-rw-r--r--Makefile.br53
1 files changed, 53 insertions, 0 deletions
diff --git a/Makefile.br b/Makefile.br
new file mode 100644
index 0000000..41c5ce1
--- /dev/null
+++ b/Makefile.br
@@ -0,0 +1,53 @@
+src := .
+top_srcdir=../../
+top_builddir=../../
+srctree := .
+obj ?= .
+
+include Makefile
+#HOSTCFLAGS+=-Dinline="" -include foo.h
+-include $(obj)/.depend
+$(obj)/.depend: $(wildcard *.h *.c)
+ $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) -MM *.c > $@ 2>/dev/null || :
+
+__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 := $(addprefix $(obj)/,$(sort $(foreach m,$(__hostprogs),$($(m)-objs))))
+host-cxxobjs := $(addprefix $(obj)/,$(sort $(foreach m,$(__hostprogs),$($(m)-cxxobjs))))
+
+HOST_EXTRACFLAGS += -I$(obj) -DCONFIG_=\"\"
+
+$(host-csingle): %: %.c
+ $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $< -o $(obj)/$@
+
+$(host-cmulti): %: $(host-cobjs) $(host-cshlib)
+ $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $(addprefix $(obj)/,$($(@F)-objs)) $(HOSTLOADLIBES_$(@F)) -o $(obj)/$@
+
+$(host-cxxmulti): %: $(host-cxxobjs) $(host-cobjs) $(host-cshlib)
+ $(HOSTCXX) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCXXFLAGS_$@) $(addprefix $(obj)/,$($(@F)-objs) $($(@F)-cxxobjs)) $(HOSTLOADLIBES_$(@F)) -o $(obj)/$@
+
+$(obj)/%.o: %.c
+ $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$(@F)) -c $< -o $@
+
+$(obj)/%.o: $(obj)/%.c
+ $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$(@F)) -c $< -o $@
+
+$(obj)/%.o: %.cc
+ $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCXXFLAGS_$(@F)) -c $< -o $@
+
+$(obj)/%:: $(src)/%_shipped
+ $(Q)cat $< > $@
+
+clean:
+ $(Q)rm -f $(addprefix $(obj)/,$(clean-files))
+distclean: clean
+ $(Q)rm -f $(addprefix $(obj)/,$(lxdialog) $(conf-objs) $(mconf-objs) $(kxgettext-objs) \
+ $(hostprogs-y) $(qconf-cxxobjs) $(qconf-objs) $(gconf-objs) \
+ mconf .depend)
+
+FORCE:
+.PHONY: FORCE clean distclean