-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathMakefile
More file actions
26 lines (18 loc) · 748 Bytes
/
Makefile
File metadata and controls
26 lines (18 loc) · 748 Bytes
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
# SPDX-License-Identifier: GPL-2.0-only
M := $(shell pwd)
KBUILD_OPTIONS += VIDEO_KERNEL_ROOT=$(M)
VIDEO_COMPILE_TIME = $(shell date)
VIDEO_COMPILE_HOST = $(shell uname -n)
vidc_generated_h: $(shell find . -iname "*.c") $(shell find . -iname "*.h") $(shell find . -iname "*.mk")
echo '#define VIDEO_COMPILE_TIME "$(VIDEO_COMPILE_TIME)"' > vidc_generated_h
echo '#define VIDEO_COMPILE_HOST "$(VIDEO_COMPILE_HOST)"' >> vidc_generated_h
all:
$(MAKE) -C $(KERNEL_SRC) M=$(M) modules $(KBUILD_OPTIONS)
modules: vidc_generated_h
modules_install:
$(MAKE) INSTALL_MOD_STRIP=1 -C $(KERNEL_SRC) M=$(M) modules_install
%:
$(MAKE) -C $(KERNEL_SRC) M=$(M) $@ $(KBUILD_OPTIONS)
clean:
rm -f *.o *.ko *.mod.c *.mod.o *~ .*.cmd
rm -rf .tmp_versions