Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 1 | From 6d283b9aa3f7fb761da4cb076b47a62275fc4caa Mon Sep 17 00:00:00 2001 |
| 2 | From: Madhurkiran Harikrishnan <madhurki@xilinx.com> |
| 3 | Date: Tue, 21 Nov 2017 03:57:25 -0800 |
| 4 | Subject: [PATCH 1/9] Change Makefile to be compatible with Yocto |
| 5 | |
| 6 | Signed-off-by: Manjukumar Matha <manjukumar.harthikote-matha@xilinx.com> |
| 7 | Signed-off-by: Hyun Kwon <hyun.kwon@xilinx.com> |
| 8 | Signed-off-by: Madhurkiran Harikrishnan <madhurki@xilinx.com> |
| 9 | Upstream Status: Inappropriate [Xilinx specific] |
| 10 | --- |
| 11 | driver/src/devicedrv/mali/Makefile | 11 +++++++++-- |
| 12 | 1 file changed, 9 insertions(+), 2 deletions(-) |
| 13 | |
| 14 | diff --git a/driver/src/devicedrv/mali/Makefile b/driver/src/devicedrv/mali/Makefile |
| 15 | index 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 Geissler | 84ad7c5 | 2020-06-27 00:00:16 -0500 | [diff] [blame] | 24 | + -include $(KDIR)/.config |
Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 25 | +else |
Andrew Geissler | 84ad7c5 | 2020-06-27 00:00:16 -0500 | [diff] [blame] | 26 | + -include $(O)/.config |
Brad Bishop | 286d45c | 2018-10-02 15:21:57 -0400 | [diff] [blame] | 27 | +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 | -- |
| 46 | 2.7.4 |
| 47 | |