TODO: Add temporary debugs in firmware calls
[wave300.git] / Makefile.am.kbuild
blob84eeca6fa01dcb01e20e3a2c920a197cdd43d666
1 # $Id$
3 include $(abs_top_srcdir)/Makefile.am.common
5 EXTRA_CFLAGS+=$(MTLK_COMMON_CPP_FLAGS) $(MTLK_COMMON_KERNEL_C_FLAGS)
7 .PHONY: always
8 .PRECIOUS: %drv_info.c
10 %drv_info.c: always
11         @echo Generating drv_info.c...
12         @mkdir -p `dirname $@`
13         @echo "const char *mtlk_drv_info[] = {" > $@.new
14         @echo -n "  \"CONFIG=" >> $@.new
15         @echo -n "$(MTLK_COMPRESSED_CONFIG)" >> $@.new
16         @echo "\"," >> $@.new
17         @echo "  \"CFLAGS=$(subst \",',$(CFLAGS))\"," >> $@.new
18         @echo "  \"MTLK_KERNEL_CFLAGS=$(subst \",',$(MTLK_KERNEL_CFLAGS))\"," >> $@.new
19         @echo "  \"KERNELDIR=$(KERNELDIR)\"," >> $@.new
20         @echo "  \"CROSS_COMPILE=$(CROSS_COMPILE)\"," >> $@.new
21         @echo "  \"HOSTNAME=$(HOSTNAME)\"," >> $@.new
22 ifneq ($(CUSTOM_DRV_ENV_INFO), )
23         @echo "$(CUSTOM_DRV_ENV_INFO)" | awk '{for (i=1; i<=NF; i++){ print "  \"" $$i "\","; }}' >> $@.new
24 endif
25         @echo "  (const char *)0" >> $@.new
26         @echo "};" >> $@.new
27         @echo "" >> $@.new
28         @diff -q $@.new $@ >/dev/null 2>&1 || cp -f $@.new $@
29         @rm -f $@.new
30         @echo Generating drv_toolchain_info...
31         @cat $@ | $(TOOLCHAIN_INFO_FILTER_CMD) > $(abs_builddir)/drv_toolchain_info