2 # Copyright (C) 2010 ARM Limited. All rights reserved.
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.
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.
11 ifeq ($(CONFIG_UMP_DED_ONLY),y)
12 UMP_MEM_SIZE= $(CONFIG_UMP_MEM_SIZE)
16 ifeq ($(CONFIG_UMP_OSMEM_ONLY),y)
17 UMP_MEM_SIZE= $(CONFIG_UMP_MEM_SIZE)
21 ifeq ($(CONFIG_UMP_VCM_ONLY),y)
22 UMP_MEM_SIZE= $(CONFIG_UMP_MEM_SIZE)
28 ifeq ($(CONFIG_VIDEO_UMP_DEBUG),y)
32 # Set up our defines, which will be passed to gcc
33 DEFINES += -DMALI_USE_UNIFIED_MEMORY_PROVIDER
34 DEFINES += -DUSING_MEMORY=$(USING_MEMORY)
35 DEFINES += -DUMP_MEM_SIZE=$(UMP_MEM_SIZE)
36 DEFINES += -DMALI_STATE_TRACKING=0
38 UDD_FILE_PREFIX := drivers/media/video/samsung/ump/
41 # linux build system integration
43 obj-$(CONFIG_VIDEO_UMP) += ump.o
45 # For customer releases the Linux Device Drivers will be provided as ARM proprietary and GPL releases:
46 # The ARM proprietary product will only include the license/proprietary directory
47 # The GPL product will only include the license/gpl directory
51 -I$(UDD_FILE_PREFIX)common\
52 -I$(UDD_FILE_PREFIX)linux\
53 -I$(UDD_FILE_PREFIX)include\
54 -I$(UDD_FILE_PREFIX)linux/license/gpl/\
55 -I$(UDD_FILE_PREFIX)../mali/common\
56 -I$(UDD_FILE_PREFIX)../mali/linux
59 $(KBUILDROOT)../mali/linux/mali_osk_atomics.o \
60 $(KBUILDROOT)../mali/linux/mali_osk_locks.o \
61 $(KBUILDROOT)../mali/linux/mali_osk_math.o \
62 $(KBUILDROOT)../mali/linux/mali_osk_memory.o \
63 $(KBUILDROOT)../mali/linux/mali_osk_misc.o
66 $(KBUILDROOT)linux/ump_kernel_linux.o \
67 $(KBUILDROOT)linux/ump_kernel_memory_backend_os.o \
68 $(KBUILDROOT)linux/ump_kernel_memory_backend_dedicated.o \
69 $(KBUILDROOT)linux/ump_memory_backend.o \
70 $(KBUILDROOT)linux/ump_ukk_wrappers.o \
71 $(KBUILDROOT)linux/ump_ukk_ref_wrappers.o \
72 $(KBUILDROOT)linux/ump_osk_atomics.o \
73 $(KBUILDROOT)linux/ump_osk_low_level_mem.o \
74 $(KBUILDROOT)linux/ump_osk_misc.o \
75 $(KBUILDROOT)common/ump_kernel_common.o \
76 $(KBUILDROOT)common/ump_kernel_descriptor_mapping.o \
77 $(KBUILDROOT)common/ump_kernel_api.o \
78 $(KBUILDROOT)common/ump_kernel_ref_drv.o\
81 ump-$(CONFIG_UMP_VCM_ALLOC) += \
82 $(KBUILDROOT)linux/ump_kernel_memory_backend_vcm.o \
84 EXTRA_CFLAGS += $(INCLUDES) \
88 # Get subversion revision number, fall back to 0000 if no svn info is available
89 SVN_REV:=$(shell ((svnversion | grep -qv exported && echo -n 'Revision: ' && svnversion) || git svn info | sed -e 's/$$$$/M/' | grep '^Revision: ' || echo ${MALI_RELEASE_NAME}) 2>/dev/null | sed -e 's/^Revision: //')
91 EXTRA_CFLAGS += -DSVN_REV=$(SVN_REV)
92 EXTRA_CFLAGS += -DSVN_REV_STRING=\"$(SVN_REV)\"