add_subdirectory(${BLAS_DIR})
endforeach ()
+#Save the config files for installation
+# @cp Makefile.conf Makefile.conf_last
+# @cp config.h config_last.h
+#ifdef QUAD_PRECISION
+# @echo "#define QUAD_PRECISION">> config_last.h
+#endif
+#ifeq ($(EXPRECISION), 1)
+# @echo "#define EXPRECISION">> config_last.h
+#endif
+###
+#ifeq ($(DYNAMIC_ARCH), 1)
+# @$(MAKE) -C kernel commonlibs || exit 1
+# @for d in $(DYNAMIC_CORE) ; \
+# do $(MAKE) GOTOBLAS_MAKEFILE= -C kernel TARGET_CORE=$$d kernel || exit 1 ;\
+# done
+# @echo DYNAMIC_ARCH=1 >> Makefile.conf_last
+#endif
+#ifdef USE_THREAD
+# @echo USE_THREAD=$(USE_THREAD) >> Makefile.conf_last
+#endif
+# @touch lib.grd
+
--- /dev/null
+\r
+include_directories(${CMAKE_SOURCE_DIR})\r
+\r
+# TODO: Need to generate object files for S, D, C, Q and X - start with D for now.\r
+# The sources are the same, but there are additional preprocessor definitions depending on the precision (see Makefile.tail).\r
+\r
+add_library(DBLAS1OBJS OBJECT\r
+ axpy.c swap.c \r
+ copy.c scal.c \r
+ dot.c\r
+ asum.c nrm2.c \r
+ max.c # amax/min/amin compiled later from same source\r
+ rot.c rotg.c rotm.c rotmg.c \r
+ axpby.c\r
+)\r
+\r
+# N.B. The original Makefile passed in -UUSE_MIN and -UUSE_ABS (where appropriate), no way to do that at a source-level in cmake. REMOVE_DEFINITIONS removes a definition for the rest of the compilation.\r
+add_library(AMAX_OBJ OBJECT max.c)\r
+set_target_properties(AMAX_OBJ PROPERTIES COMPILE_DEFINITIONS USE_ABS)\r
+add_library(AMIN_OBJ OBJECT max.c)\r
+set_target_properties(AMIN_OBJ PROPERTIES COMPILE_DEFINITIONS USE_ABS)\r
+set_target_properties(AMIN_OBJ PROPERTIES COMPILE_DEFINITIONS USE_MIN)\r
+add_library(MIN_OBJ OBJECT max.c)\r
+set_target_properties(MIN_OBJ PROPERTIES COMPILE_DEFINITIONS USE_MIN)\r
+\r
+# TODO: USE_NETLIB_GEMV shoudl switch gemv.c to netlib/*gemv.f\r
+add_library(DBLAS2OBJS OBJECT\r
+ gemv.c ger.c \r
+ trsv.c trmv.c symv.c \r
+ syr.c syr2.c gbmv.c \r
+ sbmv.c spmv.c \r
+ spr.c spr2.c \r
+ tbsv.c tbmv.c \r
+ tpsv.c tpmv.c\r
+)\r
+\r
+add_library(DBLAS3OBJS OBJECT\r
+ gemm.c symm.c\r
+ trsm.c syrk.c syr2k.c \r
+ omatcopy.c imatcopy.c\r
+)\r
+\r
+# trmm is trsm with a compiler flag set\r
+add_library(TRMM_OBJ OBJECT trsm.c)\r
+set_target_properties(TRMM_OBJ PROPERTIES COMPILE_DEFINITIONS TRMM)\r
+\r