aboutsummaryrefslogtreecommitdiff
path: root/drivers/base/ump/src/Kbuild
blob: 6184be86df6b87f680f0d9857bde54103cfd3c03 (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
44
45
46
47
48
#
# (C) COPYRIGHT 2012 ARM Limited. All rights reserved.
#
# This program is free software and is provided to you under the terms of the
# GNU General Public License version 2 as published by the Free Software
# Foundation, and any use by you of this program is subject to the terms
# of such GNU licence.
#
# A copy of the licence is included with the program, and can also be obtained
# from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA  02110-1301, USA.
#
#


# Paths required for build
UMP_PATH = $(src)/../..
UMP_DEVICEDRV_PATH = $(src)/.

# Set up defaults if not defined by the user
MALI_UNIT_TEST ?= 0

SRC :=\
	common/ump_kernel_core.c \
	common/ump_kernel_descriptor_mapping.c \
	linux/ump_kernel_linux.c \
	linux/ump_kernel_linux_mem.c

UNIT_TEST_DEFINES=
ifeq ($(MALI_UNIT_TEST), 1)
	MALI_DEBUG ?= 1

	UNIT_TEST_DEFINES = -DMALI_UNIT_TEST=1 \
	                    -DMALI_DEBUG=$(MALI_DEBUG)
endif

# Use our defines when compiling
ccflags-y += -I$(UMP_PATH) -I$(UMP_DEVICEDRV_PATH) $(UNIT_TEST_DEFINES)


# Tell the Linux build system from which .o file to create the kernel module
obj-$(CONFIG_UMP) += ump.o
ifeq ($(CONFIG_ION),y)
obj-$(CONFIG_UMP) += imports/ion/ump_kernel_import_ion.o
endif

# Tell the Linux build system to enable building of our .c files
ump-y := $(SRC:.c=.o)