blob: 3c82f602a1704b0746b6a8465743fed68f29a94c [file] [log] [blame]
Brad Bishop286d45c2018-10-02 15:21:57 -04001From 6d283b9aa3f7fb761da4cb076b47a62275fc4caa Mon Sep 17 00:00:00 2001
2From: Madhurkiran Harikrishnan <madhurki@xilinx.com>
3Date: Tue, 21 Nov 2017 03:57:25 -0800
4Subject: [PATCH 1/9] Change Makefile to be compatible with Yocto
5
6Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com>
7Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com>
8Signed-off-by: Madhurkiran Harikrishnan <madhurki@xilinx.com>
9Upstream Status: Inappropriate [Xilinx specific]
10---
11 driver/src/devicedrv/mali/Makefile | 11 +++++++++--
12 1 file changed, 9 insertions(+), 2 deletions(-)
13
14diff --git a/driver/src/devicedrv/mali/Makefile b/driver/src/devicedrv/mali/Makefile
15index 5a259fe..a6dd94c 100644
16--- Makefile
17+++ b/Makefile
18@@ -89,7 +89,11 @@ endif
19 # Define host system directory
20 KDIR-$(shell uname -m):=/lib/modules/$(shell uname -r)/build
21
22-include $(KDIR)/.config
23+ifeq ($(O),)
Andrew Geissler84ad7c52020-06-27 00:00:16 -050024+ -include $(KDIR)/.config
Brad Bishop286d45c2018-10-02 15:21:57 -040025+else
Andrew Geissler84ad7c52020-06-27 00:00:16 -050026+ -include $(O)/.config
Brad Bishop286d45c2018-10-02 15:21:57 -040027+endif
28
29 ifeq ($(ARCH), arm)
30 # when compiling for ARM we're cross compiling
31@@ -204,9 +208,12 @@ EXTRA_DEFINES += -DMALI_MEM_SWAP_TRACKING=1
32 endif
33
34 all: $(UMP_SYMVERS_FILE)
35- $(MAKE) ARCH=$(ARCH) -C $(KDIR) M=$(CURDIR) modules
36+ $(MAKE) ARCH=$(ARCH) -C $(KDIR) M=$(CURDIR) O=$(O) modules
37 @rm $(FILES_PREFIX)__malidrv_build_info.c $(FILES_PREFIX)__malidrv_build_info.o
38
39+modules_install:
40+ $(MAKE) ARCH=$(ARCH) -C $(KDIR) M=$(CURDIR) modules_install
41+
42 clean:
43 $(MAKE) ARCH=$(ARCH) -C $(KDIR) M=$(CURDIR) clean
44
45--
462.7.4
47