xref: /OK3568_Linux_fs/kernel/drivers/gpu/arm/midgard/tests/mali_kutf_irq_test/Makefile (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1#
2# (C) COPYRIGHT 2015, 2017 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# linux build system bootstrap for out-of-tree module
17
18# default to building for the host
19ARCH ?= $(shell uname -m)
20
21ifeq ($(KDIR),)
22$(error Must specify KDIR to point to the kernel to target))
23endif
24
25TEST_CCFLAGS := \
26	-DMALI_DEBUG=$(MALI_DEBUG) \
27	-DMALI_BACKEND_KERNEL=$(MALI_BACKEND_KERNEL) \
28	-DMALI_MODEL=$(MALI_MODEL) \
29	-DMALI_NO_MALI=$(MALI_NO_MALI) \
30	-DMALI_BASE_QA_LEAK=$(MALI_BASE_QA_LEAK) \
31	-DMALI_BASE_QA_RESFAIL=$(MALI_BASE_QA_RESFAIL) \
32	-DMALI_BASE_QA_USE_AFTER_FREE=$(MALI_BASE_QA_USE_AFTER_FREE) \
33	-DMALI_UNIT_TEST=$(MALI_UNIT_TEST) \
34	-DMALI_USE_UMP=$(MALI_USE_UMP) \
35	-DMALI_ERROR_INJECT_ON=$(MALI_ERROR_INJECT_ON) \
36	-DMALI_CUSTOMER_RELEASE=$(MALI_CUSTOMER_RELEASE) \
37	$(SCONS_CFLAGS) \
38	-I$(CURDIR)/../include \
39	-I$(CURDIR)/../../../../../../include \
40	-I$(CURDIR)/../../../ \
41	-I$(CURDIR)/../../ \
42	-I$(CURDIR)/../../backend/gpu \
43	-I$(CURDIR)/ \
44	-I$(srctree)/drivers/staging/android \
45	-I$(srctree)/include/linux
46
47all:
48	$(MAKE) ARCH=$(ARCH) -C $(KDIR) M=$(CURDIR) $(SCONS_CONFIGS) EXTRA_CFLAGS="$(TEST_CCFLAGS)" KBUILD_EXTRA_SYMBOLS="$(CURDIR)/../kutf/Module.symvers $(CURDIR)/../../Module.symvers" modules
49
50clean:
51	$(MAKE) ARCH=$(ARCH) -C $(KDIR) M=$(CURDIR) clean
52