aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-core/zlib-qat-module/zlib-qat-module/zlib_qat_module.patch
blob: a30f8b05f8bfa30001c752848538372fe5c1f0b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
Index: zlib-qat-module-1.2.7-r0/zlib-1.2.7/contrib/qat/qat_mem/Makefile
===================================================================
--- zlib-qat-module-1.2.7-r0.orig/zlib-1.2.7/contrib/qat/qat_mem/Makefile	2012-10-16 13:53:10.258938722 -0700
+++ zlib-qat-module-1.2.7-r0/zlib-1.2.7/contrib/qat/qat_mem/Makefile	2012-10-16 13:59:18.174944864 -0700
@@ -59,13 +59,10 @@
 #
 #
 #########################################################################
-
 MODULENAME 	:= qat_mem
-KDIR		:= /lib/modules/$(shell uname -r)/build
+KDIR		:= $(KERNEL_SOURCE_ROOT)
 PWD		:= $(shell pwd)
-
-CC		:= gcc -Wall -imacros /usr/src/kernels/$(shell uname -r)/include/linux/autoconf.h
-
+CC		:= $(KERNEL_CC) -Wall -imacros $(KERNEL_SOURCE_ROOT)/include/generated/autoconf.h
 ifeq ($(KERNELRELEASE),)
 all:	$(MODULENAME)_test
 all:
@@ -73,20 +70,15 @@
 else
   obj-m	:= $(MODULENAME).o
 endif
-
+modules_install:
+	$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules_install
 $(MODULENAME)_test: $(MODULENAME)_test.c
 	$(CC) -g -o $(MODULENAME)_test $(MODULENAME)_test.c
-
-
 load:
 	insmod ./$(MODULENAME).ko
-
 unload:
 	rmmod $(MODULENAME)
-
 test: all
 	./$(MODULENAME)_test
-
 clean:
 	rm -f *.o *.ko Module.symvers modules.order *.mod.c .*.cmd $(MODULENAME)_test
-