tizen 2.4 release
[kernel/linux-3.0.git] / drivers / gpu / arm / mali400 / ump / Kbuild
1 #
2 # Copyright (C) 2011-2012 ARM Limited. All rights reserved.
3 #
4 # This program is free software and is provided to you under the terms of the GNU General Public License version 2
5 # as published by the Free Software Foundation, and any use by you of this program is subject to the terms of such GNU licence.
6 #
7 # A copy of the licence is included with the program, and can also be obtained from Free Software
8 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
9 #
10
11 # Set default configuration to use, if Makefile didn't provide one.
12 # Change this to use a different config.h
13 # MALI_SEC
14 # CONFIG ?= os_memory_64m
15 CONFIG ?= release
16
17 # Validate selected config
18 ifneq ($(shell [ -d $(srctree)/$(src)/arch-$(CONFIG) ] && [ -f  $(srctree)/$(src)/arch-$(CONFIG)/config.h ] && echo "OK"), OK)
19 $(error No configuration found for config $(CONFIG). Check that arch-$(CONFIG)/config.h exists)
20 else
21 # Link arch to the selected arch-config directory
22 $(shell [ -L $(src)/arch ] && rm $(src)/arch)
23 $(shell ln -sf arch-$(CONFIG) $(srctree)/$(src)/arch)
24 endif
25
26 UDD_FILE_PREFIX = ../mali/
27
28 # Get subversion revision number, fall back to 0000 if no svn info is available
29 SVN_REV := $(shell ((svnversion | grep -qv "\(exported\|Unversioned\)" && echo -n 'Revision: ' && svnversion) || git svn info | sed -e 's/$$$$/M/' | grep '^Revision: ' || echo ${MALI_RELEASE_NAME}) 2>/dev/null | sed -e 's/^Revision: //')
30
31 ccflags-y += -DSVN_REV=$(SVN_REV)
32 ccflags-y += -DSVN_REV_STRING=\"$(SVN_REV)\"
33
34 ccflags-y += -I$(srctree)/$(src) -I$(srctree)/$(src)/common -I$(srctree)/$(src)/linux -I$(srctree)/$(src)/../mali/common -I$(srctree)/$(src)/../mali/linux -I$(srctree)/$(src)/../../ump/include/ump
35 # MALI_SEC
36 ccflags-y += -I$(srctree)/$(src)/include
37 ccflags-y += -DUSING_MEMORY=1 -DUMP_MEM_SIZE=512
38
39 ccflags-y += -DMALI_STATE_TRACKING=0
40 ccflags-$(CONFIG_UMP_DEBUG) += -DDEBUG
41
42 # For customer releases the Linux Device Drivers will be provided as ARM proprietary and GPL releases:
43 # The ARM proprietary product will only include the license/proprietary directory
44 # The GPL product will only include the license/gpl directory
45
46 ifeq ($(wildcard $(srctree)/$(src)/linux/license/gpl/*),)
47 ccflags-y += -I$(srctree)/$(src)/linux/license/proprietary
48 else
49 ccflags-y += -I$(srctree)/$(src)/linux/license/gpl
50 endif
51
52 ump-y = common/ump_kernel_common.o \
53         common/ump_kernel_descriptor_mapping.o \
54         common/ump_kernel_api.o \
55         common/ump_kernel_ref_drv.o \
56         linux/ump_kernel_linux.o \
57         linux/ump_kernel_memory_backend_os.o \
58         linux/ump_kernel_memory_backend_dedicated.o \
59         linux/ump_memory_backend.o \
60         linux/ump_ukk_wrappers.o \
61         linux/ump_ukk_ref_wrappers.o \
62         linux/ump_osk_atomics.o \
63         linux/ump_osk_low_level_mem.o \
64         linux/ump_osk_misc.o
65
66 # MALI_SEC
67 #       $(UDD_FILE_PREFIX)linux/mali_osk_atomics.o \
68 #       $(UDD_FILE_PREFIX)linux/mali_osk_locks.o \
69 #       $(UDD_FILE_PREFIX)linux/mali_osk_memory.o \
70 #       $(UDD_FILE_PREFIX)linux/mali_osk_math.o \
71 #       $(UDD_FILE_PREFIX)linux/mali_osk_misc.o
72
73 obj-$(CONFIG_MALI400_UMP) := ump.o
74