[processor-sdk/performance-audio-sr.git] / psdk_cust / libarch_k2g_1_0_1_0 / examples / dsponly / Makefile.libomp
diff --git a/psdk_cust/libarch_k2g_1_0_1_0/examples/dsponly/Makefile.libomp b/psdk_cust/libarch_k2g_1_0_1_0/examples/dsponly/Makefile.libomp
--- /dev/null
@@ -0,0 +1,76 @@
+#
+# Makefile.libomp
+#
+
+
+#
+# Check if required environment variables are defined
+#
+
+ifneq ($(MAKECMDGOALS),clean)
+ifeq ($(OMP_DIR),)
+$(call error,ERROR - OMP_DIR NOT DEFINED)
+endif
+
+ifeq ($(XDC_DIR),)
+$(call error,ERROR - XDC_DIR NOT DEFINED)
+endif
+
+# Path to C6000 compiler tools
+ifeq ($(CGTROOT),)
+$(call error,ERROR - CGTROOT NOT DEFINED)
+endif
+
+# Paths to BIOS, IPC modules
+ifeq ($(USE_BIOS),1)
+ifeq ($(BIOS_DIR),)
+$(call error,ERROR - BIOS_DIR NOT DEFINED)
+endif
+ifeq ($(IPC_DIR),)
+$(call error,ERROR - IPC_DIR NOT DEFINED)
+endif
+endif
+endif
+
+
+# Configuration file used (without the .cfg extension)
+ifeq ($(USE_BIOS),1)
+CFGDIR = omp_config
+else
+CFGDIR = omp_config_bm
+endif
+
+# Set BUILD_TYPE to debug/release to pick appropriate libraries
+BUILD_TYPE = release
+
+# Platform file
+ifeq ($(TARGET),SOC_AM572x)
+XDCPLATFORM = ti.runtime.openmp.platforms.am57x
+else ifeq ($(TARGET),SOC_C6678)
+XDCPLATFORM = ti.runtime.openmp.platforms.evm6678
+else ifeq ($(TARGET),SOC_K2H)
+XDCPLATFORM = ti.runtime.openmp.platforms.evmTCI6636K2H
+endif
+
+
+# Include . to find config.bld
+ifeq ($(USE_BIOS),1)
+XDCPATH = $(PDK_DIR)/packages;$(OMP_DIR)/packages;$(BIOS_DIR)/packages;$(IPC_DIR)/packages;$(FC_DIR)/packages;$(XDAIS_DIR)/packages;$(EDMA3_DIR)/packages;.
+else
+XDCPATH = $(PDK_DIR)/packages;$(OMP_DIR)/packages;$(BIOS_DIR)/packages;.
+endif
+
+XS = $(XDC_DIR)/xs
+XDC = $(XDC_DIR)/xdc
+XDCTARGET = ti.targets.elf.C66
+
+# Generate and build libomp config packages
+libomp_config:
+ @echo making $(CFGDIR) files
+ $(XS) --xdcpath "$(XDCPATH)" xdc.tools.configuro -c $(CGTROOT) --cb -t $(XDCTARGET) -p $(XDCPLATFORM) -r $(BUILD_TYPE) $(CFGDIR).cfg
+
+libomp_clean:
+ @echo Removing $(CFGDIR)
+ @rm -rf $(CFGDIR)/
+
+