Set shared library soname in Linux.
This commit is contained in:
		
							parent
							
								
									a7a7751be7
								
							
						
					
					
						commit
						d047afe615
					
				
							
								
								
									
										1
									
								
								Makefile
								
								
								
								
							
							
						
						
									
										1
									
								
								Makefile
								
								
								
								
							|  | @ -83,6 +83,7 @@ shared : | |||
| ifeq ($(OSNAME), Linux) | ||||
| 	$(MAKE) -C exports so | ||||
| 	-ln -fs $(LIBSONAME) libopenblas.so | ||||
| 	-ln -fs $(LIBSONAME) libopenblas.so.$(MAJOR_VERSION) | ||||
| endif | ||||
| ifeq ($(OSNAME), FreeBSD) | ||||
| 	$(MAKE) -C exports so | ||||
|  |  | |||
|  | @ -44,6 +44,7 @@ install : 	lib.grd | |||
| ifeq ($(OSNAME), Linux) | ||||
| 	-cp $(LIBSONAME) $(OPENBLAS_LIBRARY_DIR) | ||||
| 	-ln -fs $(OPENBLAS_LIBRARY_DIR)/$(LIBSONAME) $(OPENBLAS_LIBRARY_DIR)/libopenblas.so | ||||
| 	-ln -fs $(OPENBLAS_LIBRARY_DIR)/$(LIBSONAME) $(OPENBLAS_LIBRARY_DIR)/libopenblas.so.$(MAJOR_VERSION) | ||||
| endif | ||||
| ifeq ($(OSNAME), FreeBSD) | ||||
| 	-cp $(LIBSONAME) $(OPENBLAS_LIBRARY_DIR) | ||||
|  |  | |||
|  | @ -637,6 +637,7 @@ MD5SUM	= md5sum | |||
| AWK	= awk | ||||
| 
 | ||||
| REVISION = -r$(VERSION) | ||||
| MAJOR_VERSION = $(word 1,$(subst ., ,$(VERSION))) | ||||
| 
 | ||||
| CFLAGS     = $(COMMON_OPT) $(CCOMMON_OPT) -I$(TOPDIR) | ||||
| PFLAGS     = $(COMMON_OPT) $(CCOMMON_OPT) -I$(TOPDIR) -DPROFILE $(COMMON_PROF) | ||||
|  |  | |||
|  | @ -100,7 +100,7 @@ so : ../$(LIBSONAME) | |||
| ../$(LIBSONAME) : ../$(LIBNAME) linux.def linktest.c | ||||
| 	$(CC) $(CFLAGS) -shared -o ../$(LIBSONAME) \
 | ||||
| 	-Wl,--whole-archive ../$(LIBNAME) -Wl,--no-whole-archive \
 | ||||
| 	-Wl,--retain-symbols-file=linux.def $(EXTRALIB) | ||||
| 	-Wl,--retain-symbols-file=linux.def -Wl,-soname,libopenblas.so.$(MAJOR_VERSION) $(EXTRALIB) | ||||
| 	$(CC) $(CFLAGS) -w -o linktest linktest.c ../$(LIBSONAME) $(FEXTRALIB) && echo OK. | ||||
| 	rm -f linktest | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue