makefile.linux.tst 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. ##############################################################################
  2. #
  3. # Copyright 2012 - 2021 Vivante Corporation, Santa Clara, California.
  4. # All Rights Reserved.
  5. #
  6. # Permission is hereby granted, free of charge, to any person obtaining
  7. # a copy of this software and associated documentation files (the
  8. # 'Software'), to deal in the Software without restriction, including
  9. # without limitation the rights to use, copy, modify, merge, publish,
  10. # distribute, sub license, and/or sell copies of the Software, and to
  11. # permit persons to whom the Software is furnished to do so, subject
  12. # to the following conditions:
  13. #
  14. # The above copyright notice and this permission notice (including the
  15. # next paragraph) shall be included in all copies or substantial
  16. # portions of the Software.
  17. #
  18. # THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
  19. # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  20. # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
  21. # IN NO EVENT SHALL VIVANTE AND/OR ITS SUPPLIERS BE LIABLE FOR ANY
  22. # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  23. # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  24. # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  25. #
  26. ##############################################################################
  27. ################################################################################
  28. # Macros.
  29. AQROOT ?= $(PWD)
  30. AQARCH ?= $(AQROOT)/arch/XAQ2
  31. AQVGARCH ?= $(AQROOT)/arch/GC350
  32. export AQROOT AQARCH AQVGARCH
  33. ################################################################################
  34. # Include common definitions.
  35. include $(AQROOT)/makefile.linux.def
  36. ################################################################################
  37. # Components of the project.
  38. # app
  39. HAL_TEST := $(HAL_TEST_DIR)
  40. HAL_UNIT_TEST := $(AQROOT)/test/hal/common/UnitTest
  41. GFX_TEST := $(GFX_TEST_DIR)
  42. VVLAUNCHER := $(VVLAUNCHER_DIR)
  43. OVX_TEST := $(AQROOT)/test/ovx
  44. ifneq ($(VIVANTE_NO_VG),1)
  45. TIGER := $(AQROOT)/test/vg11/tiger
  46. endif
  47. ifeq ($(USE_VDK),0)
  48. VDK_TEST :=
  49. else
  50. VDK_TEST += $(VDK_TEST_DIR)
  51. endif
  52. CL11_TEST := $(CL11_TEST_DIR)
  53. CL11_UNIT := $(CL11_UNIT_DIR)
  54. ifeq ($(STATIC_LINK),1)
  55. APP_HAL_LIST := $(HAL_TEST)
  56. ifneq ($(VIVANTE_NO_VG),1)
  57. APP_OVG11_LIST := $(TIGER)
  58. endif
  59. APP_GFX_LIST :=
  60. else
  61. APP_HAL_LIST := $(HAL_TEST) $(HAL_UNIT_TEST)
  62. APP_GFX_LIST := $(GFX_TEST)
  63. ifneq ($(VIVANTE_NO_VG),1)
  64. APP_OVG11_LIST := $(TIGER)
  65. endif
  66. endif
  67. ifeq ($(USE_OPENCL),1)
  68. APP_OCL11_LIST := $(CL11_TEST)
  69. else
  70. APP_OCL11_LIST :=
  71. endif
  72. APP_VDK_LIST += $(VDK_TEST) $(TIGER) $(VVLAUNCHER)
  73. APP_OVX_LIST := $(OVX_TEST)
  74. APP_LIST :=
  75. ifeq ($(VIVANTE_ENABLE_2D),1)
  76. APP_LIST += $(APP_HAL_LIST)
  77. ifneq ($(STATIC_LINK),1)
  78. APP_LIST += $(APP_GFX_LIST)
  79. endif
  80. endif
  81. ifeq ($(VIVANTE_ENABLE_3D),1)
  82. ifeq ($(USE_VDK),1)
  83. APP_LIST += $(APP_VDK_LIST)
  84. else
  85. ifneq ($(VIVANTE_NO_VG),1)
  86. APP_LIST += $(APP_OVG11_LIST)
  87. endif
  88. endif
  89. ifeq ($(USE_OPENCL),1)
  90. APP_LIST += $(APP_OCL11_LIST)
  91. endif
  92. ifeq ($(USE_OPENVX),1)
  93. APP_LIST += $(APP_OVX_LIST)
  94. endif
  95. ifeq ($(USE_OPENVX),1)
  96. APP_LIST += $(APP_OVX_LIST)
  97. endif
  98. endif
  99. ifeq ($(VIVANTE_ENABLE_VG),1)
  100. ifneq ($(VIVANTE_NO_VG), 1)
  101. APP_LIST += $(APP_OVG11_LIST)
  102. endif
  103. endif
  104. ################################################################################
  105. # Define the macros used in the common makefile.
  106. SUBDIRS := $(APP_LIST)
  107. MAIN_MODULE := $(APP_LIST)
  108. OBJ_DIR := $(SDK_DIR)
  109. ################################################################################
  110. # Targets
  111. .PHONY: all clean install $(SUBDIRS)
  112. all: $(MAIN_MODULE)
  113. clean: V_TARGET := clean
  114. install: V_TARGET := install
  115. clean: all
  116. @rm -rf $(SDK_DIR)
  117. install: all
  118. @mkdir -p $(SDK_DIR)
  119. @-cp -f $(AQROOT)/release/SW/ReadMe_Linux_SDK.txt $(SDK_DIR)/ReadMe.txt
  120. $(SUBDIRS):
  121. @test ! -d $@ || $(MAKE) -f makefile.linux -C $@ $(V_TARGET) gcdSTATIC_LINK=$(gcdSTATIC_LINK)
  122. .PHONY: $(GFX_TEST)
  123. $(GFX_TEST):
  124. ifeq (,$(DFB_DIR))
  125. @echo "DFB_DIR variable was not exported; skipped gfx test building"
  126. endif
  127. ################################################################################
  128. # Supported targets.
  129. ifeq ($(VIVANTE_ENABLE_2D),1)
  130. gfx_test: $(GFX_TEST)
  131. hal_test: $(HAL_TEST)
  132. hal_unit: $(HAL_UNIT_TEST)
  133. hal_test_all: $(HAL_TEST) $(HAL_UNIT_TEST)
  134. chipinfo: $(CHIPINFO)
  135. endif
  136. ifeq ($(USE_VDK), 0)
  137. tutorial: $(TUTORIAL)
  138. else
  139. vdktest: $(VDK_TEST)
  140. vv_launcher: $(VVLAUNCHER)
  141. endif
  142. ifeq ($(USE_OPENCL), 1)
  143. cl11_test: $(CL11_TEST)
  144. cl11_unit: $(CL11_UNIT)
  145. endif
  146. ifeq ($(USE_OPENVX), 1)
  147. ovx_test: $(OVX_TEST)
  148. endif
  149. ifneq ($(VIVANTE_NO_VG), 1)
  150. ovg11_tst: $(APP_OVG11_LIST)
  151. tiger: $(TIGER)
  152. endif