blob: a2bfe315923057f588ee6363a878f82cf3291a37 [file] [log] [blame]
watchdogdir = $(prefix)/watchdog
KERNEL_FLAGS ?= ARCH=arm
dist_watchdog_SCRIPTS = msm_watchdog_test.sh run.sh
module = msm_watchdog_test_module.ko
kmake = $(MAKE) $(KERNEL_FLAGS) -C $(KERNEL_DIR) M=$(CURDIR)
$(module):
$(kmake) modules
all-local: $(module)
install-exec-local: $(module)
$(kmake) INSTALL_MOD_PATH=$(DESTDIR)$(prefix)/modules modules_install
dist_watchdog_DATA = README.txt
# "make distclean" will always run clean-local in this directory,
# regardless of the KERNELMODULES conditional. Therefore, ensure
# KERNEL_DIR exists before running clean. Further, don't fail even
# if there is a problem.
clean-local:
-test ! -d "$(KERNEL_DIR)" || $(kmake) clean