Kbuild 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #
  2. # Copyright (C) 2010-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. # Set default configuration to use, if Makefile didn't provide one.
  11. # Change this to use a different config.h
  12. CONFIG ?= aml-meson-m400-1
  13. TARGET_PLATFORM ?= aml-meson
  14. # Validate selected config
  15. ifneq ($(shell [ -d $(src)/arch-$(CONFIG) ] && [ -f $(src)/arch-$(CONFIG)/config.h ] && echo "OK"), OK)
  16. $(warning Current directory is $(src))
  17. $(error No configuration found for config $(CONFIG). Check that arch-$(CONFIG)/config.h exists)
  18. else
  19. # Link arch to the selected arch-config directory
  20. $(shell [ -L $(src)/arch ] && rm $(src)/arch)
  21. $(shell ln -sf arch-$(CONFIG) $(src)/arch)
  22. $(shell touch $(src)/arch/config.h)
  23. endif
  24. UDD_FILE_PREFIX = ../mali/
  25. # Get subversion revision number, fall back to 0000 if no svn info is available
  26. 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: //')
  27. ccflags-y += -DSVN_REV=$(SVN_REV)
  28. ccflags-y += -DSVN_REV_STRING=\"$(SVN_REV)\"
  29. ccflags-y += -I$(src) -I$(src)/common -I$(src)/linux -I$(src)/../mali/common -I$(src)/../mali/linux -I$(src)/../ump/include/ump
  30. ccflags-y += -DMALI_STATE_TRACKING=0
  31. ccflags-$(CONFIG_UMP_DEBUG) += -DDEBUG
  32. # For customer releases the Linux Device Drivers will be provided as ARM proprietary and GPL releases:
  33. # The ARM proprietary product will only include the license/proprietary directory
  34. # The GPL product will only include the license/gpl directory
  35. ifeq ($(wildcard $(src)/linux/license/gpl/*),)
  36. ccflags-y += -I$(src)/linux/license/proprietary
  37. else
  38. ccflags-y += -I$(src)/linux/license/gpl
  39. endif
  40. ump-y = common/ump_kernel_common.o \
  41. common/ump_kernel_descriptor_mapping.o \
  42. common/ump_kernel_api.o \
  43. common/ump_kernel_ref_drv.o \
  44. linux/ump_kernel_linux.o \
  45. linux/ump_kernel_memory_backend_os.o \
  46. linux/ump_kernel_memory_backend_dedicated.o \
  47. linux/ump_memory_backend.o \
  48. linux/ump_ukk_wrappers.o \
  49. linux/ump_ukk_ref_wrappers.o \
  50. linux/ump_osk_atomics.o \
  51. linux/ump_osk_low_level_mem.o \
  52. linux/ump_osk_misc.o \
  53. $(UDD_FILE_PREFIX)linux/mali_osk_atomics.o \
  54. $(UDD_FILE_PREFIX)linux/mali_osk_locks.o \
  55. $(UDD_FILE_PREFIX)linux/mali_osk_memory.o \
  56. $(UDD_FILE_PREFIX)linux/mali_osk_math.o \
  57. $(UDD_FILE_PREFIX)linux/mali_osk_misc.o
  58. obj-$(CONFIG_UMP) := ump.o