mirror of
https://git.planet-casio.com/Lephenixnoir/OpenLibm.git
synced 2024-12-29 13:03:42 +01:00
libdir, DESTDIR, and soname updates.
This commit is contained in:
parent
945c25a691
commit
71d942f730
2 changed files with 19 additions and 2 deletions
5
Make.inc
5
Make.inc
|
@ -1,6 +1,11 @@
|
||||||
# -*- mode: makefile-gmake -*-
|
# -*- mode: makefile-gmake -*-
|
||||||
|
|
||||||
OS := $(shell uname)
|
OS := $(shell uname)
|
||||||
|
VERSION = 0.1.0
|
||||||
|
VERSION_SPLIT = $(subst ., , $(VERSION))
|
||||||
|
DESTDIR =
|
||||||
|
PREFIX = /usr/local
|
||||||
|
libdir = $(PREFIX)/lib
|
||||||
|
|
||||||
FC = gfortran
|
FC = gfortran
|
||||||
FFLAGS += -O3
|
FFLAGS += -O3
|
||||||
|
|
16
Makefile
16
Makefile
|
@ -26,11 +26,23 @@ 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)
|
$(FC) -shared $(OBJS) $(LDFLAGS) -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)
|
||||||
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -fr {./,*}/*{.o,~}
|
@for dir in $(SUBDIRS) .; do \
|
||||||
|
rm -fr $$dir/*.o $$dir/*.a $$dir/*.$(SHLIB_EXT)*; \
|
||||||
|
done
|
||||||
|
|
||||||
distclean:
|
distclean:
|
||||||
rm -f $(OBJS) *.a *.$(SHLIB_EXT)
|
rm -f $(OBJS) *.a *.$(SHLIB_EXT)
|
||||||
$(MAKE) -C test clean
|
$(MAKE) -C test clean
|
||||||
|
|
||||||
|
install: all
|
||||||
|
mkdir -p $(DESTDIR)$(libdir)
|
||||||
|
mkdir -p $(DESTDIR)$(PREFIX)/include
|
||||||
|
cp -a libopenlibm.$(SHLIB_EXT)* libopenlibm.a $(DESTDIR)$(libdir)/
|
||||||
|
cp -a src/openlibm.h $(DESTDIR)$(PREFIX)/include/
|
||||||
|
|
Loading…
Reference in a new issue