mirror of
https://git.planet-casio.com/Lephenixnoir/OpenLibm.git
synced 2025-04-03 17:17:13 +02:00
Set SONAME
Inspired from what openspecfun does.
This commit is contained in:
parent
71d942f730
commit
251814ebb3
2 changed files with 6 additions and 5 deletions
9
Make.inc
9
Make.inc
|
@ -69,28 +69,29 @@ override OS=WINNT
|
|||
endif
|
||||
#keep these if statements these separate
|
||||
ifeq ($(OS), WINNT)
|
||||
SHLIB_EXT = dll
|
||||
SONAME_FLAG = -soname
|
||||
CFLAGS_add+=-nodefaultlibs
|
||||
FFLAGS+=-nodefaultlibs
|
||||
endif
|
||||
|
||||
ifeq ($(OS), Linux)
|
||||
SHLIB_EXT = so
|
||||
SONAME_FLAG = -soname
|
||||
CFLAGS_add+=-fPIC
|
||||
FFLAGS+=-fPIC
|
||||
endif
|
||||
|
||||
ifeq ($(OS), FreeBSD)
|
||||
SHLIB_EXT = so
|
||||
SONAME_FLAG = -soname
|
||||
CFLAGS_add+=-fPIC
|
||||
FFLAGS+=-fPIC
|
||||
endif
|
||||
|
||||
ifeq ($(OS), Darwin)
|
||||
SHLIB_EXT = dylib
|
||||
SONAME_FLAG = -install_name
|
||||
CFLAGS_add+=-fPIC
|
||||
FFLAGS+=-fPIC
|
||||
endif
|
||||
|
||||
ifeq ($(OS), WINNT)
|
||||
SHLIB_EXT = dll
|
||||
endif
|
||||
|
|
2
Makefile
2
Makefile
|
@ -26,7 +26,7 @@ all: libopenlibm.a libopenlibm.$(SHLIB_EXT)
|
|||
libopenlibm.a: $(OBJS)
|
||||
$(AR) -rcs libopenlibm.a $(OBJS)
|
||||
libopenlibm.$(SHLIB_EXT): $(OBJS)
|
||||
$(FC) -shared $(OBJS) $(LDFLAGS) -o libopenlibm.$(SHLIB_EXT).$(VERSION)
|
||||
$(FC) -shared $(OBJS) $(LDFLAGS) -Wl,$(SONAME_FLAG),libopenlibm.$(SHLIB_EXT).$(VERSION) -o libopenlibm.$(SHLIB_EXT).$(VERSION)
|
||||
ln -s libopenlibm.$(SHLIB_EXT).$(VERSION) libopenlibm.$(SHLIB_EXT).$(word 1,$(VERSION_SPLIT)).$(word 2,$(VERSION_SPLIT))
|
||||
ln -s libopenlibm.$(SHLIB_EXT).$(VERSION) libopenlibm.$(SHLIB_EXT).$(word 1,$(VERSION_SPLIT))
|
||||
ln -s libopenlibm.$(SHLIB_EXT).$(VERSION) libopenlibm.$(SHLIB_EXT)
|
||||
|
|
Loading…
Add table
Reference in a new issue