Avoid truncating cblas.h when compiling gencblas target
[platform/upstream/openblas.git] / Makefile
index 945641f..27923aa 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -81,22 +81,22 @@ endif
 
 shared :
 ifndef NO_SHARED
-ifeq ($(OSNAME), $(filter $(OSNAME),Linux SunOS))
+ifeq ($(OSNAME), $(filter $(OSNAME),Linux SunOS Android))
        @$(MAKE) -C exports so
-       @-ln -fs $(LIBSONAME) $(LIBPREFIX).so
-       @-ln -fs $(LIBSONAME) $(LIBPREFIX).so.$(MAJOR_VERSION)
+       @ln -fs $(LIBSONAME) $(LIBPREFIX).so
+       @ln -fs $(LIBSONAME) $(LIBPREFIX).so.$(MAJOR_VERSION)
 endif
 ifeq ($(OSNAME), FreeBSD)
        @$(MAKE) -C exports so
-       @-ln -fs $(LIBSONAME) $(LIBPREFIX).so
+       @ln -fs $(LIBSONAME) $(LIBPREFIX).so
 endif
 ifeq ($(OSNAME), NetBSD)
        @$(MAKE) -C exports so
-       @-ln -fs $(LIBSONAME) $(LIBPREFIX).so
+       @ln -fs $(LIBSONAME) $(LIBPREFIX).so
 endif
 ifeq ($(OSNAME), Darwin)
        @$(MAKE) -C exports dyn
-       @-ln -fs $(LIBDYNNAME) $(LIBPREFIX).dylib
+       @ln -fs $(LIBDYNNAME) $(LIBPREFIX).dylib
 endif
 ifeq ($(OSNAME), WINNT)
        @$(MAKE) -C exports dll
@@ -108,21 +108,15 @@ endif
 
 tests :
 ifndef NOFORTRAN
-ifndef TARGET
-ifndef CROSS
        touch $(LIBNAME)
 ifndef NO_FBLAS
        $(MAKE) -C test all
-ifdef UTEST_CHECK
        $(MAKE) -C utest all
 endif
-endif
 ifndef NO_CBLAS
        $(MAKE) -C ctest all
 endif
 endif
-endif
-endif
 
 libs :
 ifeq ($(CORE), UNKOWN)
@@ -260,6 +254,9 @@ else
        -@echo "TIMER       = NONE" >> $(NETLIB_LAPACK_DIR)/make.inc
        -@echo "LOADER      = $(FC)" >> $(NETLIB_LAPACK_DIR)/make.inc
 endif
+ifeq ($(BUILD_LAPACK_DEPRECATED), 1)
+       -@echo "BUILD_DEPRECATED      = 1" >> $(NETLIB_LAPACK_DIR)/make.inc
+endif
        -@cat  make.inc >> $(NETLIB_LAPACK_DIR)/make.inc
 endif
 
@@ -281,13 +278,13 @@ lapack-timing : large.tgz timing.tgz
 ifndef NOFORTRAN
        (cd $(NETLIB_LAPACK_DIR); $(TAR) zxf ../timing.tgz TIMING)
        (cd $(NETLIB_LAPACK_DIR)/TIMING; $(TAR) zxf ../../large.tgz )
-       make -C $(NETLIB_LAPACK_DIR)/TIMING
+       $(MAKE) -C $(NETLIB_LAPACK_DIR)/TIMING
 endif
 
 
 lapack-test :
        (cd $(NETLIB_LAPACK_DIR)/TESTING && rm -f x* *.out)
-       make -j 1 -C $(NETLIB_LAPACK_DIR)/TESTING xeigtstc  xeigtstd  xeigtsts  xeigtstz  xlintstc  xlintstd  xlintstds  xlintstrfd  xlintstrfz  xlintsts  xlintstz  xlintstzc xlintstrfs xlintstrfc
+       $(MAKE) -j 1 -C $(NETLIB_LAPACK_DIR)/TESTING xeigtstc  xeigtstd  xeigtsts  xeigtstz  xlintstc  xlintstd  xlintstds  xlintstrfd  xlintstrfz  xlintsts  xlintstz  xlintstzc xlintstrfs xlintstrfc
 ifneq ($(CROSS), 1)
        ( cd $(NETLIB_LAPACK_DIR)/INSTALL; ./testlsame; ./testslamch; ./testdlamch; \
         ./testsecond; ./testdsecnd; ./testieee; ./testversion )
@@ -302,7 +299,7 @@ lapack-runtest:
 
 blas-test:
        (cd $(NETLIB_LAPACK_DIR)/BLAS && rm -f x* *.out)
-       make -j 1 -C $(NETLIB_LAPACK_DIR) blas_testing
+       $(MAKE) -j 1 -C $(NETLIB_LAPACK_DIR) blas_testing
        (cd $(NETLIB_LAPACK_DIR)/BLAS && cat *.out)
 
 
@@ -332,3 +329,8 @@ endif
        @rm -f *.grd Makefile.conf_last config_last.h
        @(cd $(NETLIB_LAPACK_DIR)/TESTING && rm -f x* *.out testing_results.txt)
        @echo Done.
+
+# Makefile debugging trick:
+# call print-VARIABLE to see the runtime value of any variable
+print-%:
+       @echo '$*=$($*)'