]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - dense-linear-algebra-libraries/linalg.git/blobdiff - make.inc
Added DSP-only dgemm example.
[dense-linear-algebra-libraries/linalg.git] / make.inc
index 4e5013a56f01fe322dae8922ff2dbf3e7b26c5b1..07519e8f3d8ea025447174239eac611007d4c64d 100644 (file)
--- a/make.inc
+++ b/make.inc
@@ -1,7 +1,3 @@
-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)
@@ -11,6 +7,7 @@ LIBS  = -lOpenCL -locl_util #-lstdc++ -lrt
 
 UNAME_M :=$(shell uname -m)
 
+OBJCOPY = arm-linux-gnueabihf-objcopy
 
 ifneq (,$(findstring 86, $(UNAME_M)))
     .DEFAULT_GOAL := cross
@@ -19,21 +16,55 @@ ifneq (,$(findstring 86, $(UNAME_M)))
     # 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) $<
@@ -64,4 +95,4 @@ clean::
 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