diff --git a/Makefile b/Makefile index 3cfd9549c..f5907f937 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ # Makefile # # Field G. Van Zee -# +# # Top-level makefile for libflame linear algebra library. # # @@ -89,18 +89,18 @@ ALL_FLAMEC_DLL_NAME := libflame.so MK_ALL_FLAMEC_LIB := $(BASE_LIB_DIR)/$(ALL_FLAMEC_LIB_NAME) MK_ALL_FLAMEC_DLL := $(BASE_LIB_DIR)/$(ALL_FLAMEC_DLL_NAME) -MK_BASE_FLAMEC_SRC := -MK_BASE_FLAMEC_OBJS := +MK_BASE_FLAMEC_SRC := +MK_BASE_FLAMEC_OBJS := -MK_BLAS_FLAMEC_SRC := -MK_BLAS_FLAMEC_OBJS := +MK_BLAS_FLAMEC_SRC := +MK_BLAS_FLAMEC_OBJS := -MK_LAPACK_FLAMEC_SRC := -MK_LAPACK_FLAMEC_OBJS := +MK_LAPACK_FLAMEC_SRC := +MK_LAPACK_FLAMEC_OBJS := -MK_MAP_LAPACK2FLAMEC_SRC := -MK_MAP_LAPACK2FLAMEC_OBJS := +MK_MAP_LAPACK2FLAMEC_SRC := +MK_MAP_LAPACK2FLAMEC_OBJS := MK_MAP_LAPACK2FLAMEC_F2C_SRC := MK_MAP_LAPACK2FLAMEC_F2C_OBJS := @@ -111,8 +111,8 @@ MK_MAP_LAPACK2FLAMEC_F2C_FLAMEC_OBJS := MK_MAP_LAPACK2FLAMEC_F2C_INSTALL_SRC := MK_MAP_LAPACK2FLAMEC_F2C_INSTALL_OBJS := -MK_FLABLAS_F2C_SRC := -MK_FLABLAS_F2C_OBJS := +MK_FLABLAS_F2C_SRC := +MK_FLABLAS_F2C_OBJS := # --- Define install target names for static libraries --- MK_FLAMEC_LIBS := $(MK_ALL_FLAMEC_LIB) @@ -242,6 +242,7 @@ FFLAGS := $(FFLAGS) $(INCLUDE_PATHS) # Convert source file paths to object file paths by replaying the base source # directory with the base object directory, and also replacing the source file # suffix (ie: '.c' or '.f') with '.o'. + MK_FLABLAS_F2C_OBJS := $(patsubst $(SRC_DIR)/%.c, $(BASE_OBJ_DIR)/%.o, \ $(filter %.c, $(MK_FLABLAS_F2C_SRC))) @@ -269,7 +270,7 @@ MK_MAP_LAPACK2FLAMEC_F2C_INSTALL_OBJS := $(patsubst $(SRC_DIR)/%.c, $(BASE_OBJ_D # Combine the base, blas, and lapack libraries. MK_ALL_FLAMEC_OBJS := $(MK_BASE_FLAMEC_OBJS) \ $(MK_BLAS_FLAMEC_OBJS) \ - $(MK_LAPACK_FLAMEC_OBJS) + $(MK_LAPACK_FLAMEC_OBJS) # Prepend the flablas source code files, if requested @@ -288,13 +289,13 @@ ifeq ($(FLA_ENABLE_LAPACK2FLAME),no) MK_FLABLAS_F2C_OBJS := $(MK_MAP_LAPACK2FLAMEC_F2C_INSTALL_OBJS) \ $(MK_FLABLAS_F2C_OBJS) endif - MK_ALL_FLAMEC_OBJS := $(MK_FLABLAS_F2C_OBJS) \ $(MK_ALL_FLAMEC_OBJS) endif ### Kyungjoo 2015.10.21 -AR_CHUNK_SIZE=4096 +#AR_CHUNK_SIZE=4096 +AR_CHUNK_SIZE=1024 # # --- Targets/rules ------------------------------------------------------------ @@ -373,20 +374,20 @@ endif # --- Static library archiver rules for libflame --- $(MK_ALL_FLAMEC_LIB): $(MK_ALL_FLAMEC_OBJS) - ifeq ($(FLA_ENABLE_VERBOSE_MAKE_OUTPUT),yes) ifeq ($(FLA_ENABLE_MAX_ARG_LIST_HACK),yes) ### Kyungjoo 2015.10.21 $(CAT) $(AR_OBJ_LIST_FILE) | xargs -n$(AR_CHUNK_SIZE) $(AR) $(ARFLAGS) $@ -### Previous hack (works on linux, not on osx) +### Previous hack (works on linux, not on osx; osx's ar does not support @file) # echo $(ARFLAGS) $@ > $(AR_ARG_LIST_FILE) # $(CAT) $(AR_OBJ_LIST_FILE) >> $(AR_ARG_LIST_FILE) # $(AR) @$(AR_ARG_LIST_FILE) - $(RANLIB) $@ else - $(AR) $(ARFLAGS) $@ $? - $(RANLIB) $@ +# NOTE: Can't use $^ automatic variable as long as $(AR_OBJ_LIST_FILE) is in +# the list of prerequisites. + $(AR) $(ARFLAGS) $@ $^ endif + $(RANLIB) $@ mkdir -p include_local cp -f $(MK_HEADER_FILES) include_local else @@ -394,42 +395,67 @@ else ifeq ($(FLA_ENABLE_MAX_ARG_LIST_HACK),yes) ### Kyungjoo 2015.10.21 @$(CAT) $(AR_OBJ_LIST_FILE) | xargs -n$(AR_CHUNK_SIZE) $(AR) $(ARFLAGS) $@ -### Previous hack (works on linux, not on osx) +### Previous hack (works on linux, not on osx; osx's ar does not support @file) # @echo $(ARFLAGS) $@ > $(AR_ARG_LIST_FILE) # @$(CAT) $(AR_OBJ_LIST_FILE) >> $(AR_ARG_LIST_FILE) # @$(AR) @$(AR_ARG_LIST_FILE) - @$(RANLIB) $@ else - @$(AR) $(ARFLAGS) $@ $? - @$(RANLIB) $@ +# NOTE: Can't use $^ automatic variable as long as $(AR_OBJ_LIST_FILE) is in +# the list of prerequisites. + @$(AR) $(ARFLAGS) $@ $^ endif + @$(RANLIB) $@ @mkdir -p include_local @cp -f $(MK_HEADER_FILES) include_local endif - # --- Dynamic library linker rules for libflame --- $(MK_ALL_FLAMEC_DLL): $(MK_ALL_FLAMEC_OBJS) ifeq ($(FLA_ENABLE_VERBOSE_MAKE_OUTPUT),yes) ifeq ($(FLA_ENABLE_MAX_ARG_LIST_HACK),yes) - $(file > $@.in,$^) - $(LINKER) -shared -Wl,-soname,libflame.so $(LDFLAGS) -o $@ @$@.in - $(RM) $@.in + $(LINKER) -shared -Wl,-soname,libflame.so $(LDFLAGS) -o $@ @$(AR_OBJ_LIST_FILE) else - $(LINKER) -shared -Wl,-soname,libflame.so $(LDFLAGS) -o $@ $? +# NOTE: Can't use $^ automatic variable as long as $(AR_OBJ_LIST_FILE) is in +# the list of prerequisites. + $(LINKER) -shared -Wl,-soname,libflame.so $(LDFLAGS) -o $@ $^ endif else @echo "Dynamically linking $@" ifeq ($(FLA_ENABLE_MAX_ARG_LIST_HACK),yes) - @$(file > $@.in,$^) - @$(LINKER) -shared -Wl,-soname,libflame.so $(LDFLAGS) -o $@ @$@.in - @$(RM) $@.in + @$(LINKER) -shared -Wl,-soname,libflame.so $(LDFLAGS) -o $@ @$(AR_OBJ_LIST_FILE) else - @$(LINKER) -shared -Wl,-soname,libflame.so $(LDFLAGS) -o $@ $? +# NOTE: Can't use $^ automatic variable as long as $(AR_OBJ_LIST_FILE) is in +# the list of prerequisites. + @$(LINKER) -shared -Wl,-soname,libflame.so $(LDFLAGS) -o $@ $^ endif endif +# Original implementation of the rule above. +# FGVZ: This rule has been observed to not work on at least one system, where +# it appears the ".in" file is not fully written out, or written out at all, +# prior to the shared library link command being executed. +#$(MK_ALL_FLAMEC_DLL): $(MK_ALL_FLAMEC_OBJS) +#ifeq ($(FLA_ENABLE_VERBOSE_MAKE_OUTPUT),yes) +#ifeq ($(FLA_ENABLE_MAX_ARG_LIST_HACK),yes) +# $(file > $@.in,$^) +# $(LINKER) -shared -Wl,-soname,libflame.so $(LDFLAGS) -o $@ @$@.in +# $(RM) $@.in +#else +# $(LINKER) -shared -Wl,-soname,libflame.so $(LDFLAGS) -o $@ $^ +#endif +#else +# @echo "Dynamically linking $@" +#ifeq ($(FLA_ENABLE_MAX_ARG_LIST_HACK),yes) +# @$(file > $@.in,$^) +# @$(LINKER) -shared -Wl,-soname,libflame.so $(LDFLAGS) -o $@ @$@.in +# @$(RM) $@.in +#else +# @$(LINKER) -shared -Wl,-soname,libflame.so $(LDFLAGS) -o $@ $^ +#endif +#endif + + # --- Test suite rules --- @@ -533,11 +559,10 @@ endif # --- Clean rules --- cleanmost: check-config - - $(FIND) $(BASE_OBJ_DIR) -name "*.o" | $(XARGS) $(RM_F) - - $(FIND) $(BASE_LIB_DIR) -name "*.a" | $(XARGS) $(RM_F) - - $(FIND) $(BASE_LIB_DIR) -name "*.so" | $(XARGS) $(RM_F) + - $(FIND) $(BASE_OBJ_DIR) -name "*.o" | $(XARGS) $(RM_F) + - $(FIND) $(BASE_LIB_DIR) -name "*.a" | $(XARGS) $(RM_F) + - $(FIND) $(BASE_LIB_DIR) -name "*.so" | $(XARGS) $(RM_F) - $(RM_F) $(AR_OBJ_LIST_FILE) -# - $(RM_F) $(AR_ARG_LIST_FILE) - $(RM_F) $(INCLUDE_LOCAL)/*.h distclean: check-config cleanmost cleanmk @@ -551,7 +576,7 @@ distclean: check-config cleanmost cleanmk - $(RM_RF) config.sys_type cleanmk: check-config - - $(FIND) $(SRC_DIR) -name "$(FRAGMENT_MK)" | $(XARGS) $(RM_F) + - $(FIND) $(SRC_DIR) -name "$(FRAGMENT_MK)" | $(XARGS) $(RM_F) cleanleaves: check-config - $(FIND) $(SRC_DIR) -name "*.[osx]" | $(XARGS) $(RM_F) diff --git a/README b/README.md similarity index 85% rename from README rename to README.md index 3cd148a5c..395fdda0a 100644 --- a/README +++ b/README.md @@ -1,9 +1,4 @@ - -libflame library -README ---- - -Thank you for deciding to try out the libflame library! +# libflame library libflame is a portable library for dense matrix computations, providing much of the functionality present in LAPACK. In fact, libflame includes @@ -30,18 +25,18 @@ source. You may also find a nightly build of the document here: You can keep in touch with developers and other users of the project by joining the following mailing list: - o libflame-discuss - http://groups.google.com/group/libflame-discuss + - libflame-discuss - http://groups.google.com/group/libflame-discuss Please join and post to this mailing list if you have general questions or feedback regarding libflame. - o (NOTE: We do not yet have a developer's mailing list. For now, + - (NOTE: We do not yet have a developer's mailing list. For now, developers and those with developer-related questions can simply post to libflame-discuss. Also, please read the LICENSE file for information on copying and distributing this software. -Thanks again for your interest in libflame! +Thanks for your interest in libflame! Regards, diff --git a/build/ac-macros/fla_check_with_extra_cflags.m4 b/build/ac-macros/fla_check_with_extra_cflags.m4 deleted file mode 100644 index eefa3a212..000000000 --- a/build/ac-macros/fla_check_with_extra_cflags.m4 +++ /dev/null @@ -1,60 +0,0 @@ -AC_DEFUN([FLA_CHECK_WITH_EXTRA_CFLAGS], -[ - dnl Tell the user we're checking whether to enable the option. - AC_MSG_CHECKING([whether user requested using extra C compiler flags]) - - dnl Determine whether the user gave the --enable-