MALI: midgard: RK: add separate src dir of Midgard driver for RK Linux device
[firefly-linux-kernel-4.4.55.git] / drivers / gpu / arm / midgard_for_linux / Makefile
1 #
2 # (C) COPYRIGHT 2010-2015 ARM Limited. All rights reserved.
3 #
4 # This program is free software and is provided to you under the terms of the
5 # GNU General Public License version 2 as published by the Free Software
6 # Foundation, and any use by you of this program is subject to the terms
7 # of such GNU licence.
8 #
9 # A copy of the licence is included with the program, and can also be obtained
10 # from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
11 # Boston, MA  02110-1301, USA.
12 #
13 #
14
15
16
17 KDIR ?= /lib/modules/$(shell uname -r)/build
18
19 BUSLOG_PATH_RELATIVE = $(CURDIR)/../../../..
20 UMP_PATH_RELATIVE = $(CURDIR)/../../../base/ump
21 KBASE_PATH_RELATIVE = $(CURDIR)
22 KDS_PATH_RELATIVE = $(CURDIR)/../../../..
23 EXTRA_SYMBOLS = $(UMP_PATH_RELATIVE)/src/Module.symvers
24
25 ifeq ($(MALI_UNIT_TEST), 1)
26         EXTRA_SYMBOLS += $(KBASE_PATH_RELATIVE)/tests/internal/src/kernel_assert_module/linux/Module.symvers
27 endif
28
29 ifneq ($(wildcard $(CURDIR)/internal/Makefile.in),)
30 include $(CURDIR)/internal/Makefile.in
31 endif
32
33 ifeq ($(MALI_BUS_LOG), 1)
34 #Add bus logger symbols
35 EXTRA_SYMBOLS += $(BUSLOG_PATH_RELATIVE)/drivers/base/bus_logger/Module.symvers
36 endif
37
38 # GPL driver supports KDS
39 EXTRA_SYMBOLS += $(KDS_PATH_RELATIVE)/drivers/base/kds/Module.symvers
40
41 # we get the symbols from modules using KBUILD_EXTRA_SYMBOLS to prevent warnings about unknown functions
42 all:
43         $(MAKE) -C $(KDIR) M=$(CURDIR) EXTRA_CFLAGS="-I$(CURDIR)/../../../../include -I$(CURDIR)/../../../../tests/include $(SCONS_CFLAGS)" $(SCONS_CONFIGS) KBUILD_EXTRA_SYMBOLS="$(EXTRA_SYMBOLS)" modules
44
45 clean:
46         $(MAKE) -C $(KDIR) M=$(CURDIR) clean