-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile.am.kbuild
31 lines (27 loc) · 1.07 KB
/
Makefile.am.kbuild
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# $Id$
include $(abs_top_srcdir)/Makefile.am.common
EXTRA_CFLAGS+=$(MTLK_COMMON_CPP_FLAGS) $(MTLK_COMMON_KERNEL_C_FLAGS)
.PHONY: always
.PRECIOUS: %drv_info.c
%drv_info.c: always
@echo Generating drv_info.c...
@mkdir -p `dirname $@`
@echo "const char *mtlk_drv_info[] = {" > [email protected]
@echo -n " \"CONFIG=" >> [email protected]
@echo -n "$(MTLK_COMPRESSED_CONFIG)" >> [email protected]
@echo "\"," >> [email protected]
@echo " \"CFLAGS=$(subst \",',$(CFLAGS))\"," >> [email protected]
@echo " \"MTLK_KERNEL_CFLAGS=$(subst \",',$(MTLK_KERNEL_CFLAGS))\"," >> [email protected]
@echo " \"KERNELDIR=$(KERNELDIR)\"," >> [email protected]
@echo " \"CROSS_COMPILE=$(CROSS_COMPILE)\"," >> [email protected]
@echo " \"HOSTNAME=$(HOSTNAME)\"," >> [email protected]
ifneq ($(CUSTOM_DRV_ENV_INFO), )
@echo "$(CUSTOM_DRV_ENV_INFO)" | awk '{for (i=1; i<=NF; i++){ print " \"" $$i "\","; }}' >> [email protected]
endif
@echo " (const char *)0" >> [email protected]
@echo "};" >> [email protected]
@echo "" >> [email protected]
@diff -q [email protected] $@ >/dev/null 2>&1 || cp -f [email protected] $@
@rm -f [email protected]
@echo Generating drv_toolchain_info...
@cat $@ | $(TOOLCHAIN_INFO_FILTER_CMD) > $(abs_builddir)/drv_toolchain_info