aboutsummaryrefslogtreecommitdiff
path: root/LAPACKE
diff options
context:
space:
mode:
authorJulie <julie@cs.utk.edu>2016-11-25 17:03:05 -0800
committerJulie <julie@cs.utk.edu>2016-11-25 17:03:13 -0800
commit3f23bd5d53b33149118886201b01042edab3b5dc (patch)
tree5597b8119536d6bbcb066831d7b6ad34926c99b3 /LAPACKE
parent6661906c90105eec543cce45d484255f68e23d8e (diff)
merging: Various cleanups to makefiles #84
Contribution by @turboencabulator Closing #84
Diffstat (limited to 'LAPACKE')
-rw-r--r--LAPACKE/CMakeLists.txt62
-rw-r--r--LAPACKE/LICENSE52
-rw-r--r--LAPACKE/Makefile1
-rw-r--r--LAPACKE/cmake/tmp.dnyp4S2eiM0
-rw-r--r--LAPACKE/example/Makefile24
-rw-r--r--LAPACKE/include/CMakeLists.txt2
-rw-r--r--LAPACKE/src/CMakeLists.txt4
-rw-r--r--LAPACKE/src/Makefile8
-rw-r--r--LAPACKE/utils/CMakeLists.txt6
-rw-r--r--LAPACKE/utils/Makefile2
10 files changed, 77 insertions, 84 deletions
diff --git a/LAPACKE/CMakeLists.txt b/LAPACKE/CMakeLists.txt
index 904025f4..2a60a1ea 100644
--- a/LAPACKE/CMakeLists.txt
+++ b/LAPACKE/CMakeLists.txt
@@ -7,32 +7,32 @@ set(LAPACK_INSTALL_EXPORT_NAME lapacke-targets)
include(FortranCInterface)
## Ensure that the fortran compiler and c compiler specified are compatible
FortranCInterface_VERIFY()
-FortranCInterface_HEADER( ${LAPACK_BINARY_DIR}/include/lapacke_mangling.h
- MACRO_NAMESPACE "LAPACK_"
- SYMBOL_NAMESPACE "LAPACK_" )
-if( NOT FortranCInterface_GLOBAL_FOUND OR NOT FortranCInterface_MODULE_FOUND)
+FortranCInterface_HEADER(${LAPACK_BINARY_DIR}/include/lapacke_mangling.h
+ MACRO_NAMESPACE "LAPACK_"
+ SYMBOL_NAMESPACE "LAPACK_")
+if(NOT FortranCInterface_GLOBAL_FOUND OR NOT FortranCInterface_MODULE_FOUND)
message(WARNING "Reverting to pre-defined include/lapacke_mangling.h")
- configure_file( include/lapacke_mangling_with_flags.h.in
- ${LAPACK_BINARY_DIR}/include/lapacke_mangling.h )
-endif ()
+ configure_file(include/lapacke_mangling_with_flags.h.in
+ ${LAPACK_BINARY_DIR}/include/lapacke_mangling.h)
+endif()
-if (WIN32 AND NOT UNIX)
- add_definitions(-DHAVE_LAPACK_CONFIG_H -DLAPACK_COMPLEX_STRUCTURE)
- message (STATUS "Windows BUILD")
-endif ()
+if(WIN32 AND NOT UNIX)
+ add_definitions(-DHAVE_LAPACK_CONFIG_H -DLAPACK_COMPLEX_STRUCTURE)
+ message(STATUS "Windows BUILD")
+endif()
-get_directory_property( DirDefs COMPILE_DEFINITIONS )
+get_directory_property(DirDefs COMPILE_DEFINITIONS)
-include_directories( include ${LAPACK_BINARY_DIR}/include )
+include_directories(include ${LAPACK_BINARY_DIR}/include)
add_subdirectory(include)
add_subdirectory(src)
add_subdirectory(utils)
macro(append_subdir_files variable dirname)
-get_directory_property(holder DIRECTORY ${dirname} DEFINITION ${variable})
-foreach(depfile ${holder})
- list(APPEND ${variable} "${dirname}/${depfile}")
-endforeach()
+ get_directory_property(holder DIRECTORY ${dirname} DEFINITION ${variable})
+ foreach(depfile ${holder})
+ list(APPEND ${variable} "${dirname}/${depfile}")
+ endforeach()
endmacro()
append_subdir_files(LAPACKE_INCLUDE "include")
@@ -41,32 +41,32 @@ append_subdir_files(SRCX_OBJ "src")
append_subdir_files(MATGEN_OBJ "src")
append_subdir_files(UTILS_OBJ "utils")
-if (USE_XBLAS)
- add_library(lapacke ${SRC_OBJ} ${SRCX_OBJ} ${UTILS_OBJ})
- target_link_libraries(lapacke ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES} ${XBLAS_LIBRARY})
-else ()
- if (LAPACKE_WITH_TMG)
- add_library(lapacke ${SRC_OBJ} ${MATGEN_OBJ} ${UTILS_OBJ})
- target_link_libraries(lapacke tmglib ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
- else ()
- add_library(lapacke ${SRC_OBJ} ${UTILS_OBJ})
- target_link_libraries(lapacke ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
+if(USE_XBLAS)
+ add_library(lapacke ${SRC_OBJ} ${SRCX_OBJ} ${UTILS_OBJ})
+ target_link_libraries(lapacke ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES} ${XBLAS_LIBRARY})
+else()
+ if(LAPACKE_WITH_TMG)
+ add_library(lapacke ${SRC_OBJ} ${MATGEN_OBJ} ${UTILS_OBJ})
+ target_link_libraries(lapacke tmglib ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
+ else()
+ add_library(lapacke ${SRC_OBJ} ${UTILS_OBJ})
+ target_link_libraries(lapacke ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
endif()
endif()
lapack_install_library(lapacke)
-install( FILES ${LAPACKE_INCLUDE} ${LAPACK_BINARY_DIR}/include/lapacke_mangling.h DESTINATION include )
+install(FILES ${LAPACKE_INCLUDE} ${LAPACK_BINARY_DIR}/include/lapacke_mangling.h DESTINATION include)
if(BUILD_TESTING)
- add_subdirectory(example)
+ add_subdirectory(example)
endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/lapacke.pc.in ${CMAKE_CURRENT_BINARY_DIR}/lapacke.pc @ONLY)
- install(FILES
+install(FILES
${CMAKE_CURRENT_BINARY_DIR}/lapacke.pc
DESTINATION ${PKG_CONFIG_DIR}
- )
+ )
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cmake/lapacke-config-version.cmake.in
${LAPACK_BINARY_DIR}/lapacke-config-version.cmake @ONLY)
diff --git a/LAPACKE/LICENSE b/LAPACKE/LICENSE
index 8fc2ed90..2c954cd6 100644
--- a/LAPACKE/LICENSE
+++ b/LAPACKE/LICENSE
@@ -1,26 +1,26 @@
- Copyright (c) 2012, Intel Corp.
- All rights reserved.
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- * Neither the name of Intel Corporation nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- THE POSSIBILITY OF SUCH DAMAGE.
+ Copyright (c) 2012, Intel Corp.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/LAPACKE/Makefile b/LAPACKE/Makefile
index 8d282880..f1b07ad5 100644
--- a/LAPACKE/Makefile
+++ b/LAPACKE/Makefile
@@ -61,4 +61,3 @@ cleanlib:
cleanall: clean
rm -f $(LAPACKE)
cd example && $(MAKE) clean
-
diff --git a/LAPACKE/cmake/tmp.dnyp4S2eiM b/LAPACKE/cmake/tmp.dnyp4S2eiM
deleted file mode 100644
index e69de29b..00000000
--- a/LAPACKE/cmake/tmp.dnyp4S2eiM
+++ /dev/null
diff --git a/LAPACKE/example/Makefile b/LAPACKE/example/Makefile
index c142a33c..80968e8c 100644
--- a/LAPACKE/example/Makefile
+++ b/LAPACKE/example/Makefile
@@ -5,31 +5,27 @@ all: xexample_DGESV_rowmajor \
xexample_DGELS_rowmajor \
xexample_DGELS_colmajor
-LIBRAIRIES= ../../$(LAPACKELIB) ../../$(LAPACKLIB) $(BLASLIB)
+LIBRARIES = ../../$(LAPACKELIB) ../../$(LAPACKLIB) $(BLASLIB)
# Double Precision Examples
-xexample_DGESV_rowmajor: example_DGESV_rowmajor.o lapacke_example_aux.o $(LIBRAIRIES)
- $(LOADER) $(LOADOPTS) example_DGESV_rowmajor.o lapacke_example_aux.o \
- $(LIBRAIRIES) -o $@
+xexample_DGESV_rowmajor: example_DGESV_rowmajor.o lapacke_example_aux.o $(LIBRARIES)
+ $(LOADER) $(LOADOPTS) -o $@ example_DGESV_rowmajor.o lapacke_example_aux.o $(LIBRARIES)
./$@
-xexample_DGESV_colmajor: example_DGESV_colmajor.o lapacke_example_aux.o $(LIBRAIRIES)
- $(LOADER) $(LOADOPTS) example_DGESV_colmajor.o lapacke_example_aux.o \
- $(LIBRAIRIES) -o $@
+xexample_DGESV_colmajor: example_DGESV_colmajor.o lapacke_example_aux.o $(LIBRARIES)
+ $(LOADER) $(LOADOPTS) -o $@ example_DGESV_colmajor.o lapacke_example_aux.o $(LIBRARIES)
./$@
-xexample_DGELS_rowmajor: example_DGELS_rowmajor.o lapacke_example_aux.o $(LIBRAIRIES)
- $(LOADER) $(LOADOPTS) example_DGELS_rowmajor.o lapacke_example_aux.o \
- $(LIBRAIRIES) -o $@
+xexample_DGELS_rowmajor: example_DGELS_rowmajor.o lapacke_example_aux.o $(LIBRARIES)
+ $(LOADER) $(LOADOPTS) -o $@ example_DGELS_rowmajor.o lapacke_example_aux.o $(LIBRARIES)
./$@
-xexample_DGELS_colmajor: example_DGELS_colmajor.o lapacke_example_aux.o $(LIBRAIRIES)
- $(LOADER) $(LOADOPTS) example_DGELS_colmajor.o lapacke_example_aux.o \
- $(LIBRAIRIES) -o $@
+xexample_DGELS_colmajor: example_DGELS_colmajor.o lapacke_example_aux.o $(LIBRARIES)
+ $(LOADER) $(LOADOPTS) -o $@ example_DGELS_colmajor.o lapacke_example_aux.o $(LIBRARIES)
./$@
.c.o:
- $(CC) -c $(CFLAGS) -I. -I ../include -o $@ $<
+ $(CC) $(CFLAGS) -I. -I../include -c -o $@ $<
clean:
rm -f *.o x*
diff --git a/LAPACKE/include/CMakeLists.txt b/LAPACKE/include/CMakeLists.txt
index 3034962b..4c30c050 100644
--- a/LAPACKE/include/CMakeLists.txt
+++ b/LAPACKE/include/CMakeLists.txt
@@ -1,3 +1,3 @@
-set (LAPACKE_INCLUDE lapacke.h lapacke_config.h lapacke_utils.h )
+set(LAPACKE_INCLUDE lapacke.h lapacke_config.h lapacke_utils.h)
file(COPY ${LAPACKE_INCLUDE} DESTINATION ${LAPACK_BINARY_DIR}/include)
diff --git a/LAPACKE/src/CMakeLists.txt b/LAPACKE/src/CMakeLists.txt
index fe590a35..632a0f83 100644
--- a/LAPACKE/src/CMakeLists.txt
+++ b/LAPACKE/src/CMakeLists.txt
@@ -1,6 +1,6 @@
#aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR} SRC_OBJ)
-set (SRC_OBJ
+set(SRC_OBJ
lapacke_cbbcsd.c
lapacke_cbbcsd_work.c
lapacke_cbdsqr.c
@@ -2153,7 +2153,7 @@ lapacke_chesvxx_work.c lapacke_dgbsvxx_work.c lapacke_dsysvxx_work.c lapacke_
)
# FILE PARTS OF TMGLIB
-set (MATGEN_OBJ
+set(MATGEN_OBJ
lapacke_clatms.c
lapacke_clatms_work.c
lapacke_dlatms.c
diff --git a/LAPACKE/src/Makefile b/LAPACKE/src/Makefile
index e308b031..0d3c6b0d 100644
--- a/LAPACKE/src/Makefile
+++ b/LAPACKE/src/Makefile
@@ -2223,16 +2223,14 @@ ifdef BUILD_DEPRECATED
DEPRECATED = $(DEPRECSRC)
endif
-OBJ_FILES := $(C_FILES:.o=.o)
-
all: ../../$(LAPACKELIB)
../../$(LAPACKELIB): $(ALLOBJ) $(ALLXOBJ) $(DEPRECATED)
- $(ARCH) $(ARCHFLAGS) ../../$(LAPACKELIB) $(ALLOBJ) $(ALLXOBJ) $(DEPRECATED)
- $(RANLIB) ../../$(LAPACKELIB)
+ $(ARCH) $(ARCHFLAGS) $@ $(ALLOBJ) $(ALLXOBJ) $(DEPRECATED)
+ $(RANLIB) $@
.c.o:
- $(CC) -c $(CFLAGS) -I ../include -o $@ $<
+ $(CC) $(CFLAGS) -I../include -c -o $@ $<
clean:
rm -f *.o
diff --git a/LAPACKE/utils/CMakeLists.txt b/LAPACKE/utils/CMakeLists.txt
index 66be48bc..c8b8511e 100644
--- a/LAPACKE/utils/CMakeLists.txt
+++ b/LAPACKE/utils/CMakeLists.txt
@@ -1,4 +1,4 @@
-set (UTILS_OBJ
+set(UTILS_OBJ
lapacke_c_nancheck.c lapacke_ctr_trans.c lapacke_make_complex_float.c lapacke_zgb_nancheck.c
lapacke_cgb_nancheck.c lapacke_d_nancheck.c lapacke_s_nancheck.c lapacke_zgb_trans.c
lapacke_cgb_trans.c lapacke_dgb_nancheck.c lapacke_sgb_nancheck.c lapacke_zge_nancheck.c
@@ -30,10 +30,10 @@ lapacke_cst_nancheck.c lapacke_dtb_nancheck.c lapacke_stb_nanc
lapacke_csy_nancheck.c lapacke_dtb_trans.c lapacke_stb_trans.c lapacke_zsy_trans.c
lapacke_csy_trans.c lapacke_dtf_nancheck.c lapacke_stf_nancheck.c lapacke_ztb_nancheck.c
lapacke_ctb_nancheck.c lapacke_dtf_trans.c lapacke_stf_trans.c lapacke_ztb_trans.c
-lapacke_ctb_trans.c lapacke_dtp_nancheck.c lapacke_stp_nancheck.c lapacke_ztf_nancheck.c
+lapacke_ctb_trans.c lapacke_dtp_nancheck.c lapacke_stp_nancheck.c lapacke_ztf_nancheck.c
lapacke_ctf_nancheck.c lapacke_dtp_trans.c lapacke_stp_trans.c lapacke_ztf_trans.c
lapacke_ctf_trans.c lapacke_dtr_nancheck.c lapacke_str_nancheck.c lapacke_ztp_nancheck.c
lapacke_ctp_nancheck.c lapacke_dtr_trans.c lapacke_str_trans.c lapacke_ztp_trans.c
lapacke_ctp_trans.c lapacke_lsame.c lapacke_xerbla.c lapacke_ztr_nancheck.c
lapacke_ctr_nancheck.c lapacke_make_complex_double.c lapacke_z_nancheck.c lapacke_ztr_trans.c
-) \ No newline at end of file
+)
diff --git a/LAPACKE/utils/Makefile b/LAPACKE/utils/Makefile
index 1d785678..57b8f0dd 100644
--- a/LAPACKE/utils/Makefile
+++ b/LAPACKE/utils/Makefile
@@ -190,7 +190,7 @@ lib: $(OBJ)
$(RANLIB) ../../$(LAPACKELIB)
.c.o:
- $(CC) -c $(CFLAGS) -I ../include -o $@ $<
+ $(CC) $(CFLAGS) -I../include -c -o $@ $<
clean:
rm -f *.o