Don't install cblas.h if it already exists.
authorJianzhong Xu <a0869574@ti.com>
Fri, 27 Mar 2015 15:30:23 +0000 (11:30 -0400)
committerJianzhong Xu <a0869574@ti.com>
Fri, 27 Mar 2015 15:30:23 +0000 (11:30 -0400)
Makefile
build/version.txt [deleted file]
build_linalg.sh

index 195e10c1f7ad045cc22650c3286414878e3b6d47..c7127722019210df30d3079f5a62e5d599be7b9a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -3,9 +3,18 @@
 
 LINALG_BLIS_DIR     = blis
 LINALG_CBLAS_DIR    = cblas
-LINALG_BLISACC_DIR  = blasblisacc
+LINALG_BLASACC_DIR  = blasblisacc
+LINALG_CLAPACK_DIR  = clapack
 BLIS_VERSION = $(shell cat $(LINALG_BLIS_DIR)/version)
 
+LINALG_HEADERS= 
+ifeq ($(wildcard ${DESTDIR}/usr/include/cblas.h),)
+LINALG_HEADERS+=$(LINALG_CBLAS_DIR)/include/cblas.h
+endif
+LINALG_HEADERS+=$(LINALG_CLAPACK_DIR)/INCLUDE/blaswrap.h  
+LINALG_HEADERS+=$(LINALG_CLAPACK_DIR)/INCLUDE/$(LINALG_CLAPACK_DIR).h  
+LINALG_HEADERS+=$(LINALG_CLAPACK_DIR)/INCLUDE/f2c.h  
+
 build: ARMonly
 prebuild: DSPonly
 linalg: ARMplusDSP
@@ -13,15 +22,15 @@ linalg: ARMplusDSP
 ARMonly: 
        cd $(LINALG_CBLAS_DIR); make arch=ARM alllib; \
        cd ../$(LINALG_BLIS_DIR); ./configure -p install/arm cortex-a15; make -j8; make install; \
-       cd ../$(LINALG_BLISACC_DIR)/src; make -f Makefile.ARM; \
-       cd ../../clapack; make f2clib; make cblaswrap; cd SRC; make 
+       cd ../$(LINALG_BLASACC_DIR)/src; make -f Makefile.ARM; \
+       cd ../../$(LINALG_CLAPACK_DIR); make f2clib; make cblaswrap; cd SRC; make 
 
 ARMplusDSP:
        cd $(LINALG_CBLAS_DIR); make arch=ARM alllib; make arch=C66 alllib; \
        cd ../$(LINALG_BLIS_DIR); ./configure -p install/c66x c66x; make -j8; make install; \
        ./configure -p install/arm cortex-a15; make -j8; make install; \
-       cd ../$(LINALG_BLISACC_DIR); make cross; \
-       cd ../../clapack; make f2clib; make cblaswrap; cd SRC; make 
+       cd ../$(LINALG_BLASACC_DIR); make cross; \
+       cd ../../$(LINALG_CLAPACK_DIR); make f2clib; make cblaswrap; cd SRC; make 
 
 BLIStest:
        cd $(LINALG_BLIS_DIR)/testsuite; make lib=OpenCLCBLAS -j8 
@@ -30,31 +39,30 @@ cleanARMplusDSP:
        cd $(LINALG_CBLAS_DIR); make arch=ARM clean; make arch=C66 clean; \
        cd ../$(LINALG_BLIS_DIR); ./configure -p install/c66x c66x; make clean; \
        ./configure -p install/arm cortex-a15; make clean; \
-       cd ../$(LINALG_BLISACC_DIR); make clean; \
+       cd ../$(LINALG_BLASACC_DIR); make clean; \
        cd ../$(LINALG_BLIS_DIR)/testsuite; make clean; \
-       cd ../../clapack; make clean
+       cd ../../$(LINALG_CLAPACK_DIR); make clean
 
 clean:
        cd $(LINALG_CBLAS_DIR)/src; make arch=ARM clean; \
        cd ../../$(LINALG_BLIS_DIR); ./configure -p install/arm cortex-a15; make clean; \
-       cd ../$(LINALG_BLISACC_DIR)/src; make -f Makefile.ARM cleanARM
+       cd ../$(LINALG_BLASACC_DIR)/src; make -f Makefile.ARM cleanARM
 
 DSPonly:
        cd $(LINALG_CBLAS_DIR); make arch=C66 alllib; \
        cd ../$(LINALG_BLIS_DIR); ./configure -p install/c66x c66x; make -j8; make install; \
-       cd ../$(LINALG_BLISACC_DIR)/src; make ti_cblas_kernel.dsp_h
+       cd ../$(LINALG_BLASACC_DIR)/src; make ti_cblas_kernel.dsp_h
        
 install:
        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 $(LINALG_CBLAS_DIR)/include/cblas.h ${DESTDIR}/usr/include
-       cp $(LINALG_BLISACC_DIR)/lib/libcblas_armplusdsp.a ${DESTDIR}/usr/lib
+       cp $(LINALG_HEADERS) ${DESTDIR}/usr/include
+       cp $(LINALG_BLASACC_DIR)/lib/libcblas_armplusdsp.a ${DESTDIR}/usr/lib
        cp $(LINALG_BLIS_DIR)/install/arm/lib/libblis-$(BLIS_VERSION)-cortex-a15.a ${DESTDIR}/usr/lib/libblis.a
-       cp clapack/INCLUDE/*.h ${DESTDIR}/usr/include
        cp -r ./examples/* ${DESTDIR}/usr/share/ti/examples/linalg
-       cp clapack/lapack_ARM.a ${DESTDIR}/usr/lib/liblapack.a
-       cp clapack/libcblaswr_ARM.a ${DESTDIR}/usr/lib/libcblaswr.a
-       cp clapack/F2CLIBS/libf2c_ARM.a ${DESTDIR}/usr/lib/libf2c.a
+       cp $(LINALG_CLAPACK_DIR)/lapack_ARM.a ${DESTDIR}/usr/lib/liblapack.a
+       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 readme.txt ${DESTDIR}/usr/share/doc/ti-linalg
diff --git a/build/version.txt b/build/version.txt
deleted file mode 100644 (file)
index eddcc3f..0000000
+++ /dev/null
@@ -1 +0,0 @@
-0.5.0.0
index fcff4ea28bb40beeefae47e1f33feceb44d54fcb..eb845d62f5e597062fe381ae6bb53dbad2017895 100755 (executable)
@@ -42,7 +42,7 @@ env
 cd $LINALG_BASE_DIR
 make prebuild
 echo "Generating Debian package ..."
-LINALG_VER=`cat build/version.txt`
+LINALG_VER=`git describe`
 tar -czf linalg_$LINALG_VER.tar.gz --exclude='*.git' --exclude="*.obj" --exclude="*.o" --exclude="*.obj" --exclude="*.a" --exclude="*.ae66" --files-from=build/tar_files_list.txt
 mkdir linalg_$LINALG_VER
 tar -xf linalg_$LINALG_VER.tar.gz -C linalg_$LINALG_VER