Fixed some case issues with ARCH.
Added some kernel and driver/others objects.
This commit is contained in:
parent
fa0e6a6c93
commit
7fa5c4e2fd
|
@ -56,12 +56,16 @@ endif ()
|
|||
# TODO: CMAKE_SYSTEM_PROCESSOR doesn't seem to be correct - instead get it from the compiler a la c_check
|
||||
set(ARCH ${CMAKE_SYSTEM_PROCESSOR})
|
||||
if (${ARCH} STREQUAL "AMD64")
|
||||
set(ARCH "X86_64")
|
||||
set(ARCH "x86_64")
|
||||
endif ()
|
||||
|
||||
# If you are using a 32-bit compiler on a 64-bit system CMAKE_SYSTEM_PROCESSOR will be wrong
|
||||
if (${ARCH} STREQUAL "X86_64" AND BINARY EQUAL 32)
|
||||
set(ARCH X86)
|
||||
if (${ARCH} STREQUAL "x86_64" AND BINARY EQUAL 32)
|
||||
set(ARCH x86)
|
||||
endif ()
|
||||
|
||||
if (${ARCH} STREQUAL "X86")
|
||||
set(ARCH x86)
|
||||
endif ()
|
||||
|
||||
set(COMPILER_ID ${CMAKE_CXX_COMPILER_ID})
|
||||
|
@ -69,9 +73,11 @@ if (${COMPILER_ID} STREQUAL "GNU")
|
|||
set(COMPILER_ID "GCC")
|
||||
endif ()
|
||||
|
||||
string(TOUPPER ${ARCH} UC_ARCH)
|
||||
|
||||
file(WRITE ${TARGET_CONF}
|
||||
"#define OS_${HOST_OS}\t1\n"
|
||||
"#define ARCH_${ARCH}\t1\n"
|
||||
"#define ARCH_${UC_ARCH}\t1\n"
|
||||
"#define C_${COMPILER_ID}\t1\n"
|
||||
"#define __${BINARY}BIT__\t1\n"
|
||||
"#define FUNDERSCORE\t${FU}\n")
|
||||
|
|
|
@ -29,9 +29,7 @@ if (SMP)
|
|||
endif ()
|
||||
endif ()
|
||||
|
||||
add_library(COMMON_OBJS OBJECT
|
||||
${MEMORY}
|
||||
${SMP_SOURCES}
|
||||
set(COMMON_SOURCES
|
||||
xerbla.c
|
||||
abs.c # TODO: this is split into c_abs (DOUBLE unset) and z_abs (DOUBLE set) in the Makefile
|
||||
openblas_set_num_threads.c
|
||||
|
@ -40,12 +38,12 @@ add_library(COMMON_OBJS OBJECT
|
|||
openblas_error_handle.c
|
||||
)
|
||||
|
||||
#ifeq ($(DYNAMIC_ARCH), 1)
|
||||
#COMMONOBJS += dynamic.$(SUFFIX)
|
||||
#else
|
||||
#COMMONOBJS += parameter.$(SUFFIX)
|
||||
#endif
|
||||
#
|
||||
if (DYNAMIC_ARCH)
|
||||
list(APPEND COMMON_SOURCES dynamic.c)
|
||||
else ()
|
||||
list(APPEND COMMON_SOURCES parameter.c)
|
||||
endif ()
|
||||
|
||||
#ifdef EXPRECISION
|
||||
#COMMONOBJS += x_abs.$(SUFFIX) qlamch.$(SUFFIX) qlamc3.$(SUFFIX)
|
||||
#endif
|
||||
|
@ -62,6 +60,12 @@ add_library(COMMON_OBJS OBJECT
|
|||
#COMMONOBJS += profile.$(SUFFIX)
|
||||
#endif
|
||||
|
||||
add_library(COMMON_OBJS OBJECT
|
||||
${MEMORY}
|
||||
${SMP_SOURCES}
|
||||
${COMMON_SOURCES}
|
||||
)
|
||||
|
||||
list(APPEND DBLAS_OBJS "COMMON_OBJS")
|
||||
|
||||
#LIBOTHERS = libothers.$(LIBSUFFIX)
|
||||
|
|
|
@ -3,6 +3,14 @@ include_directories(${CMAKE_SOURCE_DIR})
|
|||
|
||||
# TODO: need to read ${KERNELDIR}/KERNEL into CMake vars
|
||||
|
||||
# Makeflie
|
||||
|
||||
message(STATUS "${ARCH}")
|
||||
if (${ARCH} STREQUAL "x86")
|
||||
GenerateNamedObjects("${KERNELDIR}/cpuid.S" "")
|
||||
list(APPEND DBLAS_OBJS ${OBJ_LIST_OUT})
|
||||
endif ()
|
||||
|
||||
|
||||
# Makefile.L1
|
||||
|
||||
|
|
Loading…
Reference in New Issue