Initial commit
[kernel/linux-3.0.git] / drivers / media / video / samsung / mali_r2p3 / Makefile.common
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 # Check if a Mali Core sub module should be enabled, true or false returned
12 submodule_enabled = $(shell gcc $(DEFINES) -E $1/arch/config.h | grep type | grep -c $(2))
13
14 OSKFILES=\
15         $(FILES_PREFIX)$(OSKOS)/mali_osk_atomics.c \
16         $(FILES_PREFIX)$(OSKOS)/mali_osk_irq.c \
17         $(FILES_PREFIX)$(OSKOS)/mali_osk_locks.c \
18         $(FILES_PREFIX)$(OSKOS)/mali_osk_low_level_mem.c \
19         $(FILES_PREFIX)$(OSKOS)/mali_osk_math.c \
20         $(FILES_PREFIX)$(OSKOS)/mali_osk_memory.c \
21         $(FILES_PREFIX)$(OSKOS)/mali_osk_misc.c \
22         $(FILES_PREFIX)$(OSKOS)/mali_osk_mali.c \
23         $(FILES_PREFIX)$(OSKOS)/mali_osk_notification.c \
24         $(FILES_PREFIX)$(OSKOS)/mali_osk_time.c \
25         $(FILES_PREFIX)$(OSKOS)/mali_osk_timers.c
26
27 UKKFILES=\
28         $(FILES_PREFIX)$(OSKOS)/mali_ukk_mem.c \
29         $(FILES_PREFIX)$(OSKOS)/mali_ukk_gp.c \
30         $(FILES_PREFIX)$(OSKOS)/mali_ukk_pp.c \
31         $(FILES_PREFIX)$(OSKOS)/mali_ukk_core.c
32         
33 ifeq ($(USING_PROFILING),1)
34 UKKFILES+=\
35         $(FILES_PREFIX)$(OSKOS)/mali_ukk_profiling.c
36 endif
37
38 ifeq ($(MALI_PLATFORM_FILE),)
39 MALI_PLATFORM_FILE=platform/default/mali_platform.c
40 endif
41
42 # Get subversion revision number, fall back to only ${MALI_RELEASE_NAME} if no svn info is available
43 SVN_REV := $(shell (cd $(DRIVER_DIR); (svnversion | grep -qv exported && svnversion) || git svn info | grep '^Revision: '| sed -e 's/^Revision: //' ) 2>/dev/null )
44 ifeq ($(SVN_REV),)
45 SVN_REV := $(MALI_RELEASE_NAME)
46 else
47 SVN_REV := $(MALI_RELEASE_NAME)-r$(SVN_REV)
48 endif
49
50 # Common version-string, will be extended by OS-specifc sections
51 VERSION_STRINGS :=
52 VERSION_STRINGS += CONFIG=$(CONFIG)
53 VERSION_STRINGS += USING_OS_MEMORY=$(USING_OS_MEMORY)
54 VERSION_STRINGS += API_VERSION=$(shell cd $(DRIVER_DIR); grep "\#define _MALI_API_VERSION" $(FILES_PREFIX)common\/mali_uk_types.h | cut -d' ' -f 3 )
55 VERSION_STRINGS += REPO_URL=$(shell cd $(DRIVER_DIR); (svn info || git svn info || echo 'URL: $(MALI_RELEASE_NAME)') 2>/dev/null | grep '^URL: ' | cut -d: -f2- | cut -b2-)
56 VERSION_STRINGS += REVISION=$(SVN_REV)
57 VERSION_STRINGS += CHANGED_REVISION=$(shell cd $(DRIVER_DIR); (svn info || git svn info || echo 'Last Changed Rev: $(MALI_RELEASE_NAME)') 2>/dev/null | grep '^Last Changed Rev: ' | cut -d: -f2- | cut -b2-)
58 VERSION_STRINGS += CHANGE_DATE=$(shell cd $(DRIVER_DIR); (svn info || git svn info || echo 'Last Changed Date: $(MALI_RELEASE_NAME)') 2>/dev/null | grep '^Last Changed Date: ' | cut -d: -f2- | cut -b2-)
59 VERSION_STRINGS += BUILD_DATE=$(shell date)