# Shared makefile code providing support for Kbuild make. It is included # by every `Makefile.am` that needs Kbuild support with: # ``` # include $(top_srcdir)/Makefile.kbuild # ``` KBUILD = $(MAKE) -C "$(LINUX_SOURCE_DIR)" M="$(abs_srcdir)" INSTALL_MOD_DIR="$(INSTALL_MOD_DIR)" modules: $(KBUILD) modules modules_install: $(KBUILD) modules_install # Call Kbuild clean *before* automake `clean` (see #5 for the rationale) # by adding `kbuild-clean` to the clean prerequisites. Having targets # with the same name will result in merging the prerequisites, i.e.: # ``` # # Equivalent to 'clean: prerequisite1 prerequisite2' # clean: prerequisite1 # clean: prerequisite2 # ``` clean: kbuild-clean kbuild-clean: $(KBUILD) clean .PHONY: kbuild-clean