wave521.mk 6.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. ################################################################################
  2. #
  3. # wave521
  4. #
  5. ################################################################################
  6. WAVE521_VERSION:=1.0.0
  7. WAVE521_SITE=$(TOPDIR)/../soft_3rdpart/wave521/code
  8. WAVE521_SITE_METHOD=local
  9. WAVE521_INSTALL_STAGING = YES
  10. export KERNELDIR=$(TOPDIR)/../work/linux
  11. define WAVE521_BUILD_CMDS
  12. $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) -f $(@D)/WaveEncoder_buildroot.mak
  13. # $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) -f $(@D)/WaveEncDriver_buildroot.mak
  14. endef
  15. define WAVE521_CLEAN_CMDS
  16. endef
  17. define WAVE521_INSTALL_TARGET_CMDS
  18. $(INSTALL) -D -m 0777 $(@D)/vdi/linux/driver/load.sh $(TARGET_DIR)/root/wave521/venc_load.sh
  19. $(INSTALL) -D -m 0777 $(@D)/vdi/linux/driver/unload.sh $(TARGET_DIR)/root/wave521/venc_unload.sh
  20. $(INSTALL) -D -m 0644 $(@D)/libsfenc.so $(TARGET_DIR)/usr/lib/libsfenc.so
  21. $(INSTALL) -D -m 0644 $(@D)/cfg/encoder_defconfig.cfg $(TARGET_DIR)/lib/firmware/encoder_defconfig.cfg
  22. # $(INSTALL) -D -m 0644 $(@D)/vdi/linux/driver/venc.ko $(TARGET_DIR)/root/wave521/venc.ko
  23. # $(INSTALL) -D -m 0644 $(WAVE521_SITE)/../firmware/chagall.bin $(TARGET_DIR)/root/wave521/chagall.bin
  24. endef
  25. define WAVE521_INSTALL_STAGING_CMDS
  26. mkdir -p $(STAGING_DIR)/usr/include/wave521
  27. $(INSTALL) -D -m 0644 $(@D)/sample_v2/component_list_decoder.h $(STAGING_DIR)/usr/include/wave521/sample_v2/component_list_decoder.h
  28. $(INSTALL) -D -m 0644 $(@D)/sample_v2/component_list_encoder.h $(STAGING_DIR)/usr/include/wave521/sample_v2/component_list_encoder.h
  29. $(INSTALL) -D -m 0644 $(@D)/sample_v2/helper/misc/pbu.h $(STAGING_DIR)/usr/include/wave521/sample_v2/helper/misc/pbu.h
  30. $(INSTALL) -D -m 0644 $(@D)/sample_v2/helper/misc/header_struct.h $(STAGING_DIR)/usr/include/wave521/sample_v2/helper/misc/header_struct.h
  31. $(INSTALL) -D -m 0644 $(@D)/sample_v2/helper/misc/json_output.h $(STAGING_DIR)/usr/include/wave521/sample_v2/helper/misc/json_output.h
  32. $(INSTALL) -D -m 0644 $(@D)/sample_v2/helper/misc/debug.h $(STAGING_DIR)/usr/include/wave521/sample_v2/helper/misc/debug.h
  33. $(INSTALL) -D -m 0644 $(@D)/sample_v2/helper/misc/bw_monitor.h $(STAGING_DIR)/usr/include/wave521/sample_v2/helper/misc/bw_monitor.h
  34. $(INSTALL) -D -m 0644 $(@D)/sample_v2/helper/main_helper.h $(STAGING_DIR)/usr/include/wave521/sample_v2/helper/main_helper.h
  35. $(INSTALL) -D -m 0644 $(@D)/sample_v2/component/component.h $(STAGING_DIR)/usr/include/wave521/sample_v2/component/component.h
  36. $(INSTALL) -D -m 0644 $(@D)/sample_v2/component/cnm_app_internal.h $(STAGING_DIR)/usr/include/wave521/sample_v2/component/cnm_app_internal.h
  37. $(INSTALL) -D -m 0644 $(@D)/sample_v2/component/cnm_app.h $(STAGING_DIR)/usr/include/wave521/sample_v2/component/cnm_app.h
  38. $(INSTALL) -D -m 0644 $(@D)/sample_v2/component/component_list.h $(STAGING_DIR)/usr/include/wave521/sample_v2/component/component_list.h
  39. $(INSTALL) -D -m 0644 $(@D)/sample_v2/component_list_all.h $(STAGING_DIR)/usr/include/wave521/sample_v2/component_list_all.h
  40. $(INSTALL) -D -m 0644 $(@D)/sample_v2/component_encoder/encoder_listener.h $(STAGING_DIR)/usr/include/wave521/sample_v2/component_encoder/encoder_listener.h
  41. $(INSTALL) -D -m 0644 $(@D)/sample_v2/component_decoder/decoder_listener.h $(STAGING_DIR)/usr/include/wave521/sample_v2/component_decoder/decoder_listener.h
  42. $(INSTALL) -D -m 0644 $(@D)/vdi/vdi_osal.h $(STAGING_DIR)/usr/include/wave521/vdi/vdi_osal.h
  43. $(INSTALL) -D -m 0644 $(@D)/vdi/linux/driver/vmm.h $(STAGING_DIR)/usr/include/wave521/vdi/linux/driver/vmm.h
  44. $(INSTALL) -D -m 0644 $(@D)/vdi/linux/driver/vpu.h $(STAGING_DIR)/usr/include/wave521/vdi/linux/driver/vpu.h
  45. $(INSTALL) -D -m 0644 $(@D)/vdi/mm.h $(STAGING_DIR)/usr/include/wave521/vdi/mm.h
  46. $(INSTALL) -D -m 0644 $(@D)/vdi/vdi.h $(STAGING_DIR)/usr/include/wave521/vdi/vdi.h
  47. $(INSTALL) -D -m 0644 $(@D)/config.h $(STAGING_DIR)/usr/include/wave521/config.h
  48. $(INSTALL) -D -m 0644 $(@D)/vpuapi/product.h $(STAGING_DIR)/usr/include/wave521/vpuapi/product.h
  49. $(INSTALL) -D -m 0644 $(@D)/vpuapi/coda9/coda9_vpuconfig.h $(STAGING_DIR)/usr/include/wave521/vpuapi/coda9/coda9_vpuconfig.h
  50. $(INSTALL) -D -m 0644 $(@D)/vpuapi/coda9/coda9.h $(STAGING_DIR)/usr/include/wave521/vpuapi/coda9/coda9.h
  51. $(INSTALL) -D -m 0644 $(@D)/vpuapi/coda9/coda9_regdefine.h $(STAGING_DIR)/usr/include/wave521/vpuapi/coda9/coda9_regdefine.h
  52. $(INSTALL) -D -m 0644 $(@D)/vpuapi/vpuapi.h $(STAGING_DIR)/usr/include/wave521/vpuapi/vpuapi.h
  53. $(INSTALL) -D -m 0644 $(@D)/vpuapi/vpuconfig.h $(STAGING_DIR)/usr/include/wave521/vpuapi/vpuconfig.h
  54. $(INSTALL) -D -m 0644 $(@D)/vpuapi/wave/wave5.h $(STAGING_DIR)/usr/include/wave521/vpuapi/wave/wave5.h
  55. $(INSTALL) -D -m 0644 $(@D)/vpuapi/wave/wave5_regdefine.h $(STAGING_DIR)/usr/include/wave521/vpuapi/wave/wave5_regdefine.h
  56. $(INSTALL) -D -m 0644 $(@D)/vpuapi/vpuerror.h $(STAGING_DIR)/usr/include/wave521/vpuapi/vpuerror.h
  57. $(INSTALL) -D -m 0644 $(@D)/vpuapi/vputypes.h $(STAGING_DIR)/usr/include/wave521/vpuapi/vputypes.h
  58. $(INSTALL) -D -m 0644 $(@D)/vpuapi/vpuapifunc.h $(STAGING_DIR)/usr/include/wave521/vpuapi/vpuapifunc.h
  59. endef
  60. define WAVE521_UNINSTALL_TARGET_CMDS
  61. rm -rf $(TARGET_DIR)/root/venc.ko
  62. rm -rf $(TARGET_DIR)/root/venc_load.sh
  63. rm -rf $(TARGET_DIR)/root/venc_unload.sh
  64. endef
  65. wave521_WORK_DIR := $(TARGET_DIR)/../build/wave521-$(WAVE521_VERSION)
  66. wave521driver:
  67. ifneq ($(wildcard $(wave521_WORK_DIR)/WaveEncDriver_buildroot.mak),)
  68. $(TARGET_MAKE_ENV) $(MAKE) -C $(wave521_WORK_DIR) -f $(wave521_WORK_DIR)/WaveEncDriver_buildroot.mak
  69. $(INSTALL) -D -m 0644 $(wave521_WORK_DIR)/vdi/linux/driver/venc.ko $(TARGET_DIR)/root/wave521/venc.ko
  70. endif
  71. $(eval $(generic-package))