2010-08-21 15:59:10 +02:00
|
|
|
---
|
|
|
|
Makefile.br | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
|
|
|
|
foo.h | 12 ++++++++++++
|
|
|
|
2 files changed, 65 insertions(+)
|
|
|
|
|
2013-04-04 13:24:24 +02:00
|
|
|
Index: b/Makefile.br
|
2010-08-21 15:59:10 +02:00
|
|
|
===================================================================
|
|
|
|
--- /dev/null
|
2013-04-04 13:24:24 +02:00
|
|
|
+++ b/Makefile.br
|
2010-08-21 15:59:10 +02:00
|
|
|
@@ -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))))
|
|
|
|
+
|
2013-04-14 04:53:17 +02:00
|
|
|
+HOST_EXTRACFLAGS += -I$(obj) -DCONFIG_=\"\"
|
2010-08-21 15:59:10 +02:00
|
|
|
+
|
|
|
|
+$(host-csingle): %: %.c
|
2012-04-17 16:45:16 +02:00
|
|
|
+ $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $< -o $(obj)/$@
|
2010-08-21 15:59:10 +02:00
|
|
|
+
|
|
|
|
+$(host-cmulti): %: $(host-cobjs) $(host-cshlib)
|
2012-04-17 16:45:16 +02:00
|
|
|
+ $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $(addprefix $(obj)/,$($(@F)-objs)) $(HOSTLOADLIBES_$(@F)) -o $(obj)/$@
|
2010-08-21 15:59:10 +02:00
|
|
|
+
|
|
|
|
+$(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
|
2013-04-04 13:24:24 +02:00
|
|
|
Index: b/foo.h
|
2010-08-21 15:59:10 +02:00
|
|
|
===================================================================
|
|
|
|
--- /dev/null
|
2013-04-04 13:24:24 +02:00
|
|
|
+++ b/foo.h
|
2010-08-21 15:59:10 +02:00
|
|
|
@@ -0,0 +1,12 @@
|
|
|
|
+#ifndef __KCONFIG_FOO_H
|
|
|
|
+#define __KCONFIG_FOO_H
|
|
|
|
+
|
|
|
|
+#ifndef __APPLE__
|
|
|
|
+#include <features.h>
|
|
|
|
+#endif
|
|
|
|
+#include <limits.h>
|
|
|
|
+
|
|
|
|
+#ifndef PATH_MAX
|
|
|
|
+#define PATH_MAX 1024
|
|
|
|
+#endif
|
|
|
|
+#endif /* __KCONFIG_FOO_H */
|