mirror of
https://git.planet-casio.com/Lephenixnoir/OpenLibm.git
synced 2024-12-29 13:03:42 +01:00
Install libopenlibm.dll to bindir
skip dll versioning on Windows
This commit is contained in:
parent
876c3384a1
commit
716317b71e
2 changed files with 15 additions and 5 deletions
7
Make.inc
7
Make.inc
|
@ -5,6 +5,7 @@ VERSION = 0.2.0
|
||||||
VERSION_SPLIT = $(subst ., , $(VERSION))
|
VERSION_SPLIT = $(subst ., , $(VERSION))
|
||||||
DESTDIR =
|
DESTDIR =
|
||||||
prefix = /usr/local
|
prefix = /usr/local
|
||||||
|
bindir = $(prefix)/bin
|
||||||
libdir = $(prefix)/lib
|
libdir = $(prefix)/lib
|
||||||
includedir = $(prefix)/include
|
includedir = $(prefix)/include
|
||||||
|
|
||||||
|
@ -68,12 +69,16 @@ endif
|
||||||
ifneq (,$(findstring MINGW,$(OS)))
|
ifneq (,$(findstring MINGW,$(OS)))
|
||||||
override OS=WINNT
|
override OS=WINNT
|
||||||
endif
|
endif
|
||||||
#keep these if statements these separate
|
|
||||||
|
#keep these if statements separate
|
||||||
ifeq ($(OS), WINNT)
|
ifeq ($(OS), WINNT)
|
||||||
SHLIB_EXT = dll
|
SHLIB_EXT = dll
|
||||||
SONAME_FLAG = -soname
|
SONAME_FLAG = -soname
|
||||||
CFLAGS_add += -nodefaultlibs
|
CFLAGS_add += -nodefaultlibs
|
||||||
FFLAGS += -nodefaultlibs
|
FFLAGS += -nodefaultlibs
|
||||||
|
shlibdir = bindir
|
||||||
|
else
|
||||||
|
shlibdir = libdir
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(OS), Linux)
|
ifeq ($(OS), Linux)
|
||||||
|
|
9
Makefile
9
Makefile
|
@ -26,11 +26,14 @@ 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)
|
||||||
|
ifeq ($(OS),WINNT)
|
||||||
|
$(CC) -shared $(OBJS) $(LDFLAGS) -Wl,$(SONAME_FLAG),libopenlibm.$(SHLIB_EXT) -o libopenlibm.$(SHLIB_EXT)
|
||||||
|
else
|
||||||
$(CC) -shared $(OBJS) $(LDFLAGS) -Wl,$(SONAME_FLAG),libopenlibm.$(SHLIB_EXT).$(VERSION) -o libopenlibm.$(SHLIB_EXT).$(VERSION)
|
$(CC) -shared $(OBJS) $(LDFLAGS) -Wl,$(SONAME_FLAG),libopenlibm.$(SHLIB_EXT).$(VERSION) -o libopenlibm.$(SHLIB_EXT).$(VERSION)
|
||||||
@-ln -sf libopenlibm.$(SHLIB_EXT).$(VERSION) libopenlibm.$(SHLIB_EXT).$(word 1,$(VERSION_SPLIT)).$(word 2,$(VERSION_SPLIT))
|
@-ln -sf libopenlibm.$(SHLIB_EXT).$(VERSION) libopenlibm.$(SHLIB_EXT).$(word 1,$(VERSION_SPLIT)).$(word 2,$(VERSION_SPLIT))
|
||||||
@-ln -sf libopenlibm.$(SHLIB_EXT).$(VERSION) libopenlibm.$(SHLIB_EXT).$(word 1,$(VERSION_SPLIT))
|
@-ln -sf libopenlibm.$(SHLIB_EXT).$(VERSION) libopenlibm.$(SHLIB_EXT).$(word 1,$(VERSION_SPLIT))
|
||||||
@-ln -sf libopenlibm.$(SHLIB_EXT).$(VERSION) libopenlibm.$(SHLIB_EXT)
|
@-ln -sf libopenlibm.$(SHLIB_EXT).$(VERSION) libopenlibm.$(SHLIB_EXT)
|
||||||
|
endif
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@for dir in $(SUBDIRS) .; do \
|
@for dir in $(SUBDIRS) .; do \
|
||||||
|
@ -42,9 +45,11 @@ distclean:
|
||||||
-$(MAKE) -C test clean
|
-$(MAKE) -C test clean
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
|
mkdir -p $(DESTDIR)$(shlibdir)
|
||||||
mkdir -p $(DESTDIR)$(libdir)
|
mkdir -p $(DESTDIR)$(libdir)
|
||||||
mkdir -p $(DESTDIR)$(includedir)/openlibm
|
mkdir -p $(DESTDIR)$(includedir)/openlibm
|
||||||
cp -a libopenlibm.$(SHLIB_EXT)* libopenlibm.a $(DESTDIR)$(libdir)/
|
cp -a libopenlibm.$(SHLIB_EXT)* $(DESTDIR)$(shlibdir)/
|
||||||
|
cp -a libopenlibm.a $(DESTDIR)$(libdir)/
|
||||||
cp -a src/openlibm.h $(DESTDIR)$(includedir)/
|
cp -a src/openlibm.h $(DESTDIR)$(includedir)/
|
||||||
cp -a include/*.h $(DESTDIR)$(includedir)/openlibm/
|
cp -a include/*.h $(DESTDIR)$(includedir)/openlibm/
|
||||||
ifneq ($(wildcard $(ARCH)/bsd_asm.h),)
|
ifneq ($(wildcard $(ARCH)/bsd_asm.h),)
|
||||||
|
|
Loading…
Reference in a new issue