Skip to content

Commit ade45ae

Browse files
committed
embrace Kbuild
Closes: v4l2loopback#388
1 parent 10e1c61 commit ade45ae

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Kbuild

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
obj-m := v4l2loopback.o

Makefile

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1+
ifneq ($(KERNELRELEASE),)
2+
# (only) the following line is invoked by kbuild
3+
include KBuild
4+
else # !kbuild
5+
16
KERNELRELEASE ?= `uname -r`
27
KERNEL_DIR ?= /lib/modules/$(KERNELRELEASE)/build
38
PWD := $(shell pwd)
4-
obj-m := v4l2loopback.o
59

610
PREFIX ?= /usr/local
711
BINDIR = $(PREFIX)/bin
@@ -88,3 +92,5 @@ utils/v4l2loopback-ctl: utils/v4l2loopback-ctl.c
8892
.PHONY: clang-format
8993
clang-format: .clang-format
9094
clang-format -i *.c *.h utils/*.c
95+
96+
endif # !kbuild

0 commit comments

Comments
 (0)