11c562e8162363513399d626aff4caa7a6691767dsubrata_modakifneq ($(KERNELRELEASE),)
21c562e8162363513399d626aff4caa7a6691767dsubrata_modak         obj-m += test-cmpxchg-nolock.o
31c562e8162363513399d626aff4caa7a6691767dsubrata_modakelse
41c562e8162363513399d626aff4caa7a6691767dsubrata_modakKERNELDIR ?= /lib/modules/$(shell uname -r)/build
51c562e8162363513399d626aff4caa7a6691767dsubrata_modakPWD := $(shell pwd)
61c562e8162363513399d626aff4caa7a6691767dsubrata_modakKERNELRELEASE = $(shell cat $(KERNELDIR)/$(KBUILD_OUTPUT)/include/linux/version.h | sed -n 's/.*UTS_RELEASE.*\"\(.*\)\".*/\1/p')
71c562e8162363513399d626aff4caa7a6691767dsubrata_modakifneq ($(INSTALL_MOD_PATH),)
81c562e8162363513399d626aff4caa7a6691767dsubrata_modak         DEPMOD_OPT := -b $(INSTALL_MOD_PATH)
91c562e8162363513399d626aff4caa7a6691767dsubrata_modakendif
1037550cf5a86c7ca7424a2a318dd64e550f13f5dfChris Dearman
111c562e8162363513399d626aff4caa7a6691767dsubrata_modakdefault:
121c562e8162363513399d626aff4caa7a6691767dsubrata_modak	$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
1337550cf5a86c7ca7424a2a318dd64e550f13f5dfChris Dearman
141c562e8162363513399d626aff4caa7a6691767dsubrata_modakmodules_install:
151c562e8162363513399d626aff4caa7a6691767dsubrata_modak	$(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install
161c562e8162363513399d626aff4caa7a6691767dsubrata_modak	if [ -f $(KERNELDIR)/$(KBUILD_OUTPUT)/System.map ] ; then /sbin/depmod -ae -F $(KERNELDIR)/$(KBUILD_OUTPUT)/System.map $(DEPMOD_OPT) $(KERNELRELEASE) ; fi
1737550cf5a86c7ca7424a2a318dd64e550f13f5dfChris Dearman
181c562e8162363513399d626aff4caa7a6691767dsubrata_modakclean:
191c562e8162363513399d626aff4caa7a6691767dsubrata_modak	$(MAKE) -C $(KERNELDIR) M=$(PWD) clean
201c562e8162363513399d626aff4caa7a6691767dsubrata_modakendif
21