Combined multiple DSP libraries into one.
authorJianzhong Xu <a0869574local@uda0869574b>
Tue, 15 Dec 2015 15:40:19 +0000 (10:40 -0500)
committerJianzhong Xu <a0869574local@uda0869574b>
Tue, 15 Dec 2015 15:40:19 +0000 (10:40 -0500)
Makefile
blasblisacc/src/Makefile.ARM
cblas/Makefile.C66
make.inc

index a6c382ec98c4f23eb20581e7f912b9cfbac8b183..480d3eb627279ba7016a658d39298f7d29ae570f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -8,10 +8,10 @@ LINALG_BLASACC_DIR  = blasblisacc
 LINALG_CLAPACK_DIR  = clapack
 BLIS_VERSION = $(shell cat $(LINALG_BLIS_DIR)/version)
 
-LINALG_HEADERS =$(LINALG_CLAPACK_DIR)/INCLUDE/blaswrap.h  
-LINALG_HEADERS+=$(LINALG_CLAPACK_DIR)/INCLUDE/clapack.h  
-LINALG_HEADERS+=$(LINALG_CLAPACK_DIR)/INCLUDE/f2c.h  
-LINALG_HEADERS+=$(LINALG_CBLAS_DIR)/include/cblas.h
+CBLAS_HEADERS   =$(LINALG_CBLAS_DIR)/include/cblas.h
+CLAPACK_HEADERS =$(LINALG_CLAPACK_DIR)/INCLUDE/blaswrap.h  
+CLAPACK_HEADERS+=$(LINALG_CLAPACK_DIR)/INCLUDE/clapack.h  
+CLAPACK_HEADERS+=$(LINALG_CLAPACK_DIR)/INCLUDE/f2c.h  
 
 ifeq ($(MEM_MODEL),Large)
 BLIS_CFG   = c66xLarge
@@ -24,7 +24,11 @@ endif
 DSPlibs:
        cd $(LINALG_CBLAS_DIR); make arch=C66 alllib; \
        cd ../$(LINALG_BLIS_DIR); ./configure -p install/$(BLIS_CFG) c66x; make -j8 MEM_MODEL=$(MEM_MODEL) TARGET=$(TARGET) LIBOS=$(LIBOS); make install; \
-       cd ../$(LINALG_TICBLAS_DIR)/src; make MEM_MODEL=$(MEM_MODEL) TARGET=$(TARGET) LIBOS=$(LIBOS); cd ..;
+       cd ../$(LINALG_TICBLAS_DIR)/src; make MEM_MODEL=$(MEM_MODEL) TARGET=$(TARGET) LIBOS=$(LIBOS); cd ../lib; \
+       echo "combining BLIS, CBLAS, and TICBLAS libraries into one: libcblas.ae66"; \
+       mkdir -p objs; cd objs; rm *; ar x ../../../blis/install/c66xMedium/lib/libblis.ae66; mmv 'cblas*.o' 'blis_cblas#1.o'; \
+       ar -x ../../../cblas/lib/C66/libcblas.ae66; ar -x ../libticblas.ae66; chmod +rw *;ar -cr ../libcblas.ae66 *; cd ../../..;
+
 
 ARMplusDSP:
        cd $(LINALG_CBLAS_DIR); make arch=ARM alllib; \
@@ -36,7 +40,7 @@ ARMplusDSP:
 cleanDSPlibs:
        cd $(LINALG_CBLAS_DIR); make clean; \
        cd ../$(LINALG_BLIS_DIR); ./configure -p install/$(BLIS_CFG) c66x; make -j8 clean; \
-       cd ../$(LINALG_TICBLAS_DIR)/src; make clean; cd ..;
+       cd ../$(LINALG_TICBLAS_DIR)/src; make clean; cd ../lib/objs; rm *; cd ../../..;
 
 #DSPonly:
        
@@ -105,3 +109,13 @@ install:
        cp $(LINALG_CLAPACK_DIR)/libcblaswr_ARM.a ${DESTDIR}/usr/lib/libcblaswr.a
        cp $(LINALG_CLAPACK_DIR)/F2CLIBS/libf2c_ARM.a ${DESTDIR}/usr/lib/libf2c.a
        cp docs/* ${DESTDIR}/usr/share/doc/ti-linalg
+
+installDSPlib:
+       install -m 755 -d ${DESTDIR}/usr/include
+       install -m 755 -d ${DESTDIR}/usr/lib
+       install -m 755 -d ${DESTDIR}/usr/share/doc/ti-linalg
+       install -m 755 -d ${DESTDIR}/usr/share/ti/examples/linalg       
+       cp $(CBLAS_HEADERS) ${DESTDIR}/usr/include
+       cp -r ./examples/* ${DESTDIR}/usr/share/ti/examples/linalg
+       cp $(LINALG_TICBLAS_DIR)/libcblas.ae66 ${DESTDIR}/usr/lib/
+       cp docs/* ${DESTDIR}/usr/share/doc/ti-linalg
index 0b6808692c1a3c099b8dea6d5c3966757a0f3a2a..9e0437243be0b063a9e2bd18132e935f93d6b3cd 100644 (file)
@@ -7,7 +7,7 @@ TI_CBLAS_FAT_BINARY = 1
 ARM_PLUS_DSP_LIB_DIR = ../lib
 
 # INCLUDE Directory
-INCDIR := $(TI_OCL_CGT_INSTALL)/include;$(TI_OCL_INSTALL_DIR)/opencl/include;$(LINUX_DEVKIT_ROOT)/usr/include;../../blis/install/c66x/include/blis/;$(OMP_DIR)/packages/ti/runtime/openmp
+INCDIR := $(CGTROOT)/include;$(TI_OCL_INSTALL_DIR)/opencl/include;$(LINUX_DEVKIT_ROOT)/usr/include;../../blis/install/c66x/include/blis/;$(OMP_DIR)/packages/ti/runtime/openmp
 
 INCS = -I. -I$(strip $(subst ;, -I,$(subst $(space),$(space),$(INCDIR))))
 OBJS = ti_cblas_initfini.o
index 1ca26b6c37055f48c2eb3fdef1e2a411d8ee95d8..3f6d4999e9cc2981507427be5c1758e715dec67e 100644 (file)
@@ -22,9 +22,7 @@ PLAT = C66
 # Libraries and includes
 #-----------------------------------------------------------------------------
  
-#BLLIB = ../blis-dsp/lib/c66x/libblis.a
-BLLIB = ../blis/install/c66x/lib/libblis.a
-CBLIB = ../lib/$(PLAT)/libcblas_$(PLAT).a
+CBLIB = ../lib/$(PLAT)/libcblas.a
 
 LN_S = ln -sf
 
@@ -40,9 +38,7 @@ CC = cl6x
 # Flags for Compilers
 #-----------------------------------------------------------------------------
 
-CFLAGS = -O3 --c99 --use_g2 -I$(TI_OCL_CGT_INSTALL)/include -mv6600 -DADD_ -eo .o -fr obj/$(PLAT)
-#CFLAGS = -O3 --c99 --use_g2 -I$(LINUX_DEVKIT_ROOT)/usr/share/ti/cgt-c6x/include -mv6600 -DADD_ -eo .o -fr obj/$(PLAT)
-#FFLAGS = -O3  
+CFLAGS = -O3 --c99 --use_g2 -I$(CGTROOT)/include -mv6600 -DADD_ -eo .o -fr obj/$(PLAT)
 
 #-----------------------------------------------------------------------------
 # Archive programs and flags
index d32c84d87a8fb8b8d46c5e28387d7704665b59b5..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)/include
 
 CPP   = g++
 CL6X  = cl6x -mv6600 --abi=eabi $(DSP_INCLUDE)