30 lines
754 B
Makefile
30 lines
754 B
Makefile
|
hrtimerdir = $(prefix)/hrtimer
|
||
|
hrtimer_CFLAGS = -Werror
|
||
|
dist_hrtimer_SCRIPTS = hrtimer_test.sh run.sh
|
||
|
|
||
|
|
||
|
KERNEL_FLAGS ?= ARCH=arm
|
||
|
|
||
|
module = hrtimer_test_module.ko
|
||
|
hrtimer_test_module.ko: hrtimer_test_module.c
|
||
|
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_hrtimer_DATA = README.txt $(module)
|
||
|
|
||
|
# "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
|
||
|
|
||
|
|