Skip to content
Browse files

Makefile fixes for debian

  • Loading branch information...
1 parent a3672f0 commit aa0d0d948a74dc6ca712796a09bb0c24c4e440e3 @umlaeute committed
Showing with 22 additions and 3 deletions.
  1. +22 −3 Makefile
View
25 Makefile
@@ -14,17 +14,34 @@ INSTALL_DATA = $(INSTALL) -m 644
MODULE_OPTIONS = devices=2
-.PHONY: all install install-utils clean modprobe
+##########################################
+# note on build targets
+#
+# module-assistant makes some assumptions about targets, namely
+# <modulename>: must be present and build the module <modulename>
+# <modulename>.ko is not enough
+# install: must be present (and should only install the module)
+#
+# we therefore make <modulename> a .PHONY alias to <modulename>.ko
+# and remove utils-installation from 'install'
+# call 'make install-all' if you want to install everything
+##########################################
+.PHONY: all install clean distclean
+.PHONY: install-all install-utils install-man
+.PHONY: modprobe v4l2loopback
+
all: v4l2loopback.ko
+v4l2loopback: v4l2loopback.ko
v4l2loopback.ko:
@echo "Building v4l2-loopback driver..."
$(MAKE) -C $(KERNEL_DIR) M=$(PWD) modules
-install: install-utils install-man
+install-all: install install-utils install-man
+install:
$(MAKE) -C $(KERNEL_DIR) M=$(PWD) modules_install
depmod -ae
-install-utils: utils/v4l2loopback-ctl
+install-utils: utils/v4l2loopback-ctl
$(INSTALL_DIR) "$(DESTDIR)$(BINDIR)"
$(INSTALL_PROGRAM) $< "$(DESTDIR)$(BINDIR)"
install-man: man/v4l2loopback-ctl.1
@@ -34,6 +51,8 @@ clean:
rm -f *~
rm -f Module.symvers Module.markers modules.order
$(MAKE) -C $(KERNEL_DIR) M=$(PWD) clean
+distclean: clean
+ rm -f man/v4l2loopback-ctl.1
modprobe: v4l2loopback.ko
chmod a+r v4l2loopback.ko

0 comments on commit aa0d0d9

Please sign in to comment.
Something went wrong with that request. Please try again.