upload tizen1.0 source
[kernel/linux-2.6.36.git] / drivers / media / video / samsung / ump / Makefile
1 #
2 # Copyright (C) 2010 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 ifeq ($(CONFIG_UMP_DED_ONLY),y)
12 UMP_MEM_SIZE= $(CONFIG_UMP_MEM_SIZE)
13 USING_MEMORY=0
14 endif
15
16 ifeq ($(CONFIG_UMP_OSMEM_ONLY),y)
17 UMP_MEM_SIZE= $(CONFIG_UMP_MEM_SIZE)
18 USING_MEMORY=1
19 endif
20
21 ifeq ($(CONFIG_UMP_VCM_ONLY),y)
22 UMP_MEM_SIZE= $(CONFIG_UMP_MEM_SIZE)
23 USING_MEMORY=2
24 endif
25
26
27 # For UMP Debug
28 ifeq ($(CONFIG_VIDEO_UMP_DEBUG),y)
29 DEFINES += -DDEBUG
30 endif
31
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
37
38 UDD_FILE_PREFIX := drivers/media/video/samsung/ump/
39 KBUILDROOT =
40
41 # linux build system integration
42
43 obj-$(CONFIG_VIDEO_UMP) += ump.o
44
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
48
49 INCLUDES += \
50                 -I$(UDD_FILE_PREFIX)\
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
57
58 OSKFILES+=\
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
64
65 ump-y := \
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\
79                 $(OSKFILES)
80
81 ump-$(CONFIG_UMP_VCM_ALLOC) += \
82                 $(KBUILDROOT)linux/ump_kernel_memory_backend_vcm.o \
83
84 EXTRA_CFLAGS += $(INCLUDES) \
85                 $(DEFINES)
86
87
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: //')
90
91 EXTRA_CFLAGS += -DSVN_REV=$(SVN_REV)
92 EXTRA_CFLAGS += -DSVN_REV_STRING=\"$(SVN_REV)\"