diff --git a/make.inc b/make.inc
index f128811d9c97a1b33918ff2d56b7af813b4988f8..07519e8f3d8ea025447174239eac611007d4c64d 100644 (file)
--- a/make.inc
+++ b/make.inc
-DSP_INCLUDE = -I$(TI_OCL_CGT_INSTALL)/include
-DSP_INCLUDE += -I$(TARGET_ROOTDIR)/usr/share/ti/cgt-c6x/include
-DSP_INCLUDE += -I$(TARGET_ROOTDIR)/usr/share/ti/opencl
-DSP_INCLUDE += -I$(TI_OCL_INSTALL_DIR)/opencl/include
CPP = g++
CL6X = cl6x -mv6600 --abi=eabi $(DSP_INCLUDE)
UNAME_M :=$(shell uname -m)
+OBJCOPY = arm-linux-gnueabihf-objcopy
ifneq (,$(findstring 86, $(UNAME_M)))
.DEFAULT_GOAL := cross
# is located on the build host and necessary ARM libraries are installed
# on that file system.
ifneq ($(MAKECMDGOALS),clean)
- ifeq ($(TARGET_ROOTDIR),)
- $(error Environment variable TARGET_ROOTDIR must be defined. Set it to point at the EVM root file system)
- endif
+ ifneq ($(LIBOS),LIB_RTOS)
+ ifeq ($(TARGET_ROOTDIR),)
+ $(error Environment variable TARGET_ROOTDIR must be defined. Set it to point at the EVM root file system)
+ endif
+ endif
+
+ ifeq ($(OMP_DIR),)
+ $(error Environment variable OMP_DIR must be defined. Set it to point at the OpenMP for DSP Installation Directory, or run the setup_hpc_env script available in the MCSDK-HPC installation)
+ endif
endif
# gcc ARM cross compiler will not, by default, search the host's
# /usr/include. Explicitly specify here to find dependent vendor headers
cross: override CPP = arm-linux-gnueabihf-g++
cross: CPP_FLAGS += -I$(TARGET_ROOTDIR)/usr/include -idirafter /usr/include
+ #cross: CL6X_FLAGS += -I$(OMP_DIR)/packages/ti/runtime/openmp
# If cross-compilineg, provide path to dependent ARM libraries on the
# target filesystem
cross: LD_FLAGS = -L$(TARGET_ROOTDIR)/lib -L$(TARGET_ROOTDIR)/usr/lib -Wl,-rpath-link,$(TARGET_ROOTDIR)/lib -Wl,-rpath-link,$(TARGET_ROOTDIR)/usr/lib
endif
+define FIND_DSP_PKG
+ export $(1)?=$$(patsubst %/$(3),%,$$(lastword $$(sort $$(wildcard $$(TI_SEARCH_PATH)/$(2)/$(3)))))
+ ifeq ($$($(1)),)
+ $$(error ERROR - $(1) is not defined and could not be found in $(TI_SEARCH_PATH)/ )
+ else
+ ifeq ($$(wildcard $$($(1))/$(3)),)
+ $$(error ERROR - "$(1) = $$($(1))" Is not valid!)
+ endif
+ endif
+ $$(info Using $(1) = $$($(1)))
+endef
+
+# CBLAS and BLIS directories
+CBLAS_DSP_LIB = ../../cblas/lib/C66/libcblas_C66.ae66
+TICBLAS_DSP_LIB = ../../ticblas/lib/libticblas.ae66
+CBLAS_ARM_LIB = ../../cblas/lib/ARM/libcblas_ARM.a
+LIBARCH_LIB = $(LIBARCH_DIR)/lib/libArch.a66x
+
+ifeq ($(MEM_MODEL),Large)
+BLIS_DSP_LIB = ../../blis/install/c66xLarge/lib/libblis.ae66
+else ifeq ($(MEM_MODEL),Medium)
+BLIS_DSP_LIB = ../../blis/install/c66xMedium/lib/libblis.ae66
+else ifeq ($(MEM_MODEL),Small)
+BLIS_DSP_LIB = ../../blis/install/c66xSmall/lib/libblis.ae66
+#else ifeq ($(MEM_MODEL),Tiny)
+endif
+
%.o: %.cpp
@echo Compiling $<
- @$(CPP) -c $(CPP_FLAGS) $<
+ $(CPP) -c $(CPP_FLAGS) $<
%.o: %.c
@echo Compiling $<
- @$(CPP) -c $(CPP_FLAGS) $<
+ $(CPP) -c $(CPP_FLAGS) $<
%.obj: %.c
@echo Compiling $<
- @$(CL6X) -c $(CL6X_FLAGS) $<
+ $(CL6X) -c $(CL6X_FLAGS) $<
%.out: %.cl
@echo Compiling $<
test: clean $(EXE)
@echo Running $(EXE)
@./$(EXE) >> /dev/null
- @if [ $$? -ne 0 ] ; then echo "FAILED !!!" ; fi
+ @if [ $$? -ne 0 ] ; then echo "FAILED !!!" ; fi
\ No newline at end of file