mirror of
https://git.planet-casio.com/Lephenixnoir/OpenLibm.git
synced 2025-04-04 09:37: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
|
endif
|
||||||
#keep these if statements these separate
|
#keep these if statements these separate
|
||||||
ifeq ($(OS), WINNT)
|
ifeq ($(OS), WINNT)
|
||||||
|
SHLIB_EXT = dll
|
||||||
|
SONAME_FLAG = -soname
|
||||||
CFLAGS_add+=-nodefaultlibs
|
CFLAGS_add+=-nodefaultlibs
|
||||||
FFLAGS+=-nodefaultlibs
|
FFLAGS+=-nodefaultlibs
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(OS), Linux)
|
ifeq ($(OS), Linux)
|
||||||
SHLIB_EXT = so
|
SHLIB_EXT = so
|
||||||
|
SONAME_FLAG = -soname
|
||||||
CFLAGS_add+=-fPIC
|
CFLAGS_add+=-fPIC
|
||||||
FFLAGS+=-fPIC
|
FFLAGS+=-fPIC
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(OS), FreeBSD)
|
ifeq ($(OS), FreeBSD)
|
||||||
SHLIB_EXT = so
|
SHLIB_EXT = so
|
||||||
|
SONAME_FLAG = -soname
|
||||||
CFLAGS_add+=-fPIC
|
CFLAGS_add+=-fPIC
|
||||||
FFLAGS+=-fPIC
|
FFLAGS+=-fPIC
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(OS), Darwin)
|
ifeq ($(OS), Darwin)
|
||||||
SHLIB_EXT = dylib
|
SHLIB_EXT = dylib
|
||||||
|
SONAME_FLAG = -install_name
|
||||||
CFLAGS_add+=-fPIC
|
CFLAGS_add+=-fPIC
|
||||||
FFLAGS+=-fPIC
|
FFLAGS+=-fPIC
|
||||||
endif
|
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)
|
libopenlibm.a: $(OBJS)
|
||||||
$(AR) -rcs libopenlibm.a $(OBJS)
|
$(AR) -rcs libopenlibm.a $(OBJS)
|
||||||
libopenlibm.$(SHLIB_EXT): $(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)).$(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).$(word 1,$(VERSION_SPLIT))
|
||||||
ln -s libopenlibm.$(SHLIB_EXT).$(VERSION) libopenlibm.$(SHLIB_EXT)
|
ln -s libopenlibm.$(SHLIB_EXT).$(VERSION) libopenlibm.$(SHLIB_EXT)
|
||||||
|
|
Loading…
Add table
Reference in a new issue