Skip to content

Commit 7b5aea5

Browse files
authored
Accomodate AIX install, which has different syntax
for #1803
1 parent 76a66ea commit 7b5aea5

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

Makefile.install

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ ifndef NO_CBLAS
4848
@sed 's/common/openblas_config/g' cblas.h > "$(DESTDIR)$(OPENBLAS_INCLUDE_DIR)/cblas.h"
4949
endif
5050

51+
ifneq (($OSNAME), AIX)
5152
ifndef NO_LAPACKE
5253
@echo Copying LAPACKE header files to $(DESTDIR)$(OPENBLAS_INCLUDE_DIR)
5354
@-install -pm644 $(NETLIB_LAPACK_DIR)/LAPACKE/include/lapacke.h "$(DESTDIR)$(OPENBLAS_INCLUDE_DIR)/lapacke.h"
@@ -72,6 +73,7 @@ ifeq ($(OSNAME), $(filter $(OSNAME),Linux SunOS Android Haiku))
7273
ln -fs $(LIBSONAME) $(LIBPREFIX).so ; \
7374
ln -fs $(LIBSONAME) $(LIBPREFIX).so.$(MAJOR_VERSION)
7475
endif
76+
7577
ifeq ($(OSNAME), $(filter $(OSNAME),FreeBSD OpenBSD NetBSD DragonFly))
7678
@cp $(LIBSONAME) "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)"
7779
@cd "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)" ; \
@@ -93,6 +95,33 @@ ifeq ($(OSNAME), CYGWIN_NT)
9395
endif
9496
endif
9597

98+
else
99+
#install on AIX has different options syntax
100+
ifndef NO_LAPACKE
101+
@echo Copying LAPACKE header files to $(DESTDIR)$(OPENBLAS_INCLUDE_DIR)
102+
@-install -M 644 $(NETLIB_LAPACK_DIR)/LAPACKE/include/lapacke.h "$(DESTDIR)$(OPENBLAS_INCLUDE_DIR)/lapacke.h"
103+
@-install -M 644 $(NETLIB_LAPACK_DIR)/LAPACKE/include/lapacke_config.h "$(DESTDIR)$(OPENBLAS_INCLUDE_DIR)/lapacke_config.h"
104+
@-install -M 644 $(NETLIB_LAPACK_DIR)/LAPACKE/include/lapacke_mangling_with_flags.h.in "$(DESTDIR)$(OPENBLAS_INCLUDE_DIR)/lapacke_mangling.h"
105+
@-install -M 644 $(NETLIB_LAPACK_DIR)/LAPACKE/include/lapacke_utils.h "$(DESTDIR)$(OPENBLAS_INCLUDE_DIR)/lapacke_utils.h"
106+
endif
107+
108+
#for install static library
109+
ifndef NO_STATIC
110+
@echo Copying the static library to $(DESTDIR)$(OPENBLAS_LIBRARY_DIR)
111+
@install -M 644 $(LIBNAME) "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)"
112+
@cd "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)" ; \
113+
ln -fs $(LIBNAME) $(LIBPREFIX).$(LIBSUFFIX)
114+
endif
115+
#for install shared library
116+
ifndef NO_SHARED
117+
@echo Copying the shared library to $(DESTDIR)$(OPENBLAS_LIBRARY_DIR)
118+
@install -M 755 $(LIBSONAME) "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)"
119+
@cd "$(DESTDIR)$(OPENBLAS_LIBRARY_DIR)" ; \
120+
ln -fs $(LIBSONAME) $(LIBPREFIX).so ; \
121+
ln -fs $(LIBSONAME) $(LIBPREFIX).so.$(MAJOR_VERSION)
122+
endif
123+
124+
endif
96125

97126
#Generating openblas.pc
98127
@echo Generating openblas.pc in "$(DESTDIR)$(OPENBLAS_PKGCONFIG_DIR)"

0 commit comments

Comments
 (0)