board/csky: fixup gdb instructions in readme.txt
[buildroot-gz.git] / support / kconfig / patches / 10-br-build-system.patch
blobbe6fda07af9994c999a3e7a7557b21c47c19ff6b
1 ---
2 Makefile.br | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
3 foo.h | 12 ++++++++++++
4 2 files changed, 65 insertions(+)
6 Index: b/Makefile.br
7 ===================================================================
8 --- /dev/null
9 +++ b/Makefile.br
10 @@ -0,0 +1,53 @@
11 +src := .
12 +top_srcdir=../../
13 +top_builddir=../../
14 +srctree := .
15 +obj ?= .
17 +include Makefile
18 +#HOSTCFLAGS+=-Dinline="" -include foo.h
19 +-include $(obj)/.depend
20 +$(obj)/.depend: $(wildcard *.h *.c)
21 + $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) -MM *.c > $@ 2>/dev/null || :
23 +__hostprogs := $(sort $(hostprogs-y) $(hostprogs-m))
24 +host-csingle := $(foreach m,$(__hostprogs),$(if $($(m)-objs),,$(m)))
25 +host-cmulti := $(foreach m,$(__hostprogs),\
26 + $(if $($(m)-cxxobjs),,$(if $($(m)-objs),$(m))))
27 +host-cxxmulti := $(foreach m,$(__hostprogs),\
28 + $(if $($(m)-cxxobjs),$(m),$(if $($(m)-objs),)))
29 +host-cobjs := $(addprefix $(obj)/,$(sort $(foreach m,$(__hostprogs),$($(m)-objs))))
30 +host-cxxobjs := $(addprefix $(obj)/,$(sort $(foreach m,$(__hostprogs),$($(m)-cxxobjs))))
32 +HOST_EXTRACFLAGS += -I$(obj) -DCONFIG_=\"\"
34 +$(host-csingle): %: %.c
35 + $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $< -o $(obj)/$@
37 +$(host-cmulti): %: $(host-cobjs) $(host-cshlib)
38 + $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$@) $(addprefix $(obj)/,$($(@F)-objs)) $(HOSTLOADLIBES_$(@F)) -o $(obj)/$@
40 +$(host-cxxmulti): %: $(host-cxxobjs) $(host-cobjs) $(host-cshlib)
41 + $(HOSTCXX) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCXXFLAGS_$@) $(addprefix $(obj)/,$($(@F)-objs) $($(@F)-cxxobjs)) $(HOSTLOADLIBES_$(@F)) -o $(obj)/$@
43 +$(obj)/%.o: %.c
44 + $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$(@F)) -c $< -o $@
46 +$(obj)/%.o: $(obj)/%.c
47 + $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCFLAGS_$(@F)) -c $< -o $@
49 +$(obj)/%.o: %.cc
50 + $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTCFLAGS) $(HOSTCXXFLAGS_$(@F)) -c $< -o $@
52 +$(obj)/%:: $(src)/%_shipped
53 + $(Q)cat $< > $@
55 +clean:
56 + $(Q)rm -f $(addprefix $(obj)/,$(clean-files))
57 +distclean: clean
58 + $(Q)rm -f $(addprefix $(obj)/,$(lxdialog) $(conf-objs) $(mconf-objs) $(kxgettext-objs) \
59 + $(hostprogs-y) $(qconf-cxxobjs) $(qconf-objs) $(gconf-objs) \
60 + mconf .depend)
62 +FORCE:
63 +.PHONY: FORCE clean distclean
64 Index: b/foo.h
65 ===================================================================
66 --- /dev/null
67 +++ b/foo.h
68 @@ -0,0 +1,12 @@
69 +#ifndef __KCONFIG_FOO_H
70 +#define __KCONFIG_FOO_H
72 +#ifndef __APPLE__
73 +#include <features.h>
74 +#endif
75 +#include <limits.h>
77 +#ifndef PATH_MAX
78 +#define PATH_MAX 1024
79 +#endif
80 +#endif /* __KCONFIG_FOO_H */