@@ -19,7 +19,7 @@ CONFIGURE_COMMON += F77="$(FC)" CC="$(CC)" CXX="$(CXX)"
19
19
MAKE_COMMON = DESTDIR="" prefix=$(build_prefix ) bindir=$(build_bindir ) libdir=$(build_libdir ) libexecdir=$(build_libexecdir ) datarootdir=$(build_datarootdir ) includedir=$(build_includedir ) sysconfdir=$(build_sysconfdir )
20
20
21
21
# autoconf configure-driven scripts: llvm pcre arpack fftw unwind gmp mpfr patchelf uv
22
- # custom Makefile rules: openlibm Rmath double-conversion dsfmt suitesparse-wrapper suitesparse lapack openblas utf8proc
22
+ # custom Makefile rules: openlibm Rmath double-conversion dsfmt suitesparse-wrapper suitesparse lapack openblas utf8proc objconv
23
23
24
24
# prevent installing libs into usr/lib64 on opensuse
25
25
unexport CONFIG_SITE
77
77
78
78
ifeq ($(USE_SYSTEM_BLAS ) , 0)
79
79
STAGE1_DEPS += openblas
80
+ ifeq ($(USE_BLAS64 ) , 1)
81
+ ifeq ($(OS ) , Darwin)
82
+ STAGE1_DEPS += objconv
83
+ endif
84
+ endif
80
85
endif
81
86
82
87
ifeq ($(USE_SYSTEM_FFTW ) , 0)
@@ -144,7 +149,7 @@ install: $(addprefix install-, $(DEP_LIBS))
144
149
cleanall : $(addprefix clean-, $(DEP_LIBS ) )
145
150
distcleanall : $(addprefix distclean-, $(DEP_LIBS ) )
146
151
rm -rf $(build_prefix )
147
- getall : get-llvm get-uv get-pcre get-double-conversion get-openlibm get-openspecfun get-dsfmt get-Rmath get-openblas get-lapack get-fftw get-suitesparse get-arpack get-unwind get-osxunwind get-gmp get-mpfr get-zlib get-patchelf get-utf8proc
152
+ getall : get-llvm get-uv get-pcre get-double-conversion get-openlibm get-openspecfun get-dsfmt get-Rmath get-openblas get-lapack get-fftw get-suitesparse get-arpack get-unwind get-osxunwind get-gmp get-mpfr get-zlib get-patchelf get-utf8proc get-objconv
148
153
149
154
# # PATHS ##
150
155
# sort is used to remove potential duplicates
@@ -750,6 +755,34 @@ check-Rmath: compile-Rmath
750
755
install-Rmath : $(RMATH_OBJ_TARGET )
751
756
752
757
758
+ # # objconv ##
759
+
760
+ OBJCONV_SOURCE = objconv/objconv
761
+ OBJCONV_TARGET = $(build_bindir ) /objconv
762
+
763
+ objconv.zip :
764
+ $(JLDOWNLOAD ) $@ http://www.agner.org/optimize/objconv.zip
765
+ objconv/config.status : objconv.zip
766
+ unzip -d objconv $<
767
+ cd objconv && unzip source.zip
768
+ echo 1 > $@
769
+ $(OBJCONV_SOURCE ) : objconv/config.status
770
+ cd objconv && $(CXX ) -o objconv -O2 * .cpp
771
+ $(OBJCONV_TARGET ) : $(OBJCONV_SOURCE ) | $(build_bindir )
772
+ cp -f $< $@
773
+
774
+ clean-objconv :
775
+ -rm -f $(OBJCONV_TARGET )
776
+ distclean-objconv :
777
+ -rm -rf objconv.zip objconv
778
+
779
+ get-objconv : objconv.zip
780
+ configure-objconv : objconv/config.status
781
+ compile-objconv : $(OBJCONV_SOURCE )
782
+ check-objconv : compile-objconv
783
+ install-objconv : $(OBJCONV_TARGET )
784
+
785
+
753
786
# # OpenBLAS ##
754
787
# LAPACK is built into OpenBLAS by default
755
788
@@ -792,8 +825,9 @@ endif
792
825
# 64-bit BLAS interface
793
826
ifeq ($(USE_BLAS64 ) , 1)
794
827
OPENBLAS_BUILD_OPTS += INTERFACE64=1 SYMBOLSUFFIX="64_"
795
- ifeq ($(OS ) ,Darwin)
828
+ ifeq ($(OS ) , Darwin)
796
829
OPENBLAS_BUILD_OPTS += OBJCONV=$(JULIAHOME ) /deps/objconv/objconv
830
+ $(OPENBLAS_OBJ_SOURCE ) : $(OBJCONV_SOURCE )
797
831
endif
798
832
endif
799
833
0 commit comments