mirror of
https://git.planet-casio.com/Lephenixnoir/OpenLibm.git
synced 2024-12-29 13:03:42 +01:00
Split install into subtargets
When building a cross-compile toolchain for a freestanding platform one may not want to build and install shared objects.
This commit is contained in:
parent
705cbaea30
commit
4002a91a44
1 changed files with 17 additions and 7 deletions
24
Makefile
24
Makefile
|
@ -40,7 +40,8 @@ OLM_MAJOR_SHLIB_EXT := $(SHLIB_EXT).$(SOMAJOR)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
.PHONY: all check test clean distclean install
|
.PHONY: all check test clean distclean \
|
||||||
|
install install-static install-shared install-pkgconfig install-headers
|
||||||
|
|
||||||
all: libopenlibm.a libopenlibm.$(OLM_MAJOR_MINOR_SHLIB_EXT)
|
all: libopenlibm.a libopenlibm.$(OLM_MAJOR_MINOR_SHLIB_EXT)
|
||||||
|
|
||||||
|
@ -74,12 +75,21 @@ openlibm.pc: openlibm.pc.in Make.inc Makefile
|
||||||
echo "version=${VERSION}" >> openlibm.pc
|
echo "version=${VERSION}" >> openlibm.pc
|
||||||
cat openlibm.pc.in >> openlibm.pc
|
cat openlibm.pc.in >> openlibm.pc
|
||||||
|
|
||||||
install: all openlibm.pc
|
install-static: libopenlibm.a
|
||||||
mkdir -p $(DESTDIR)$(shlibdir)
|
mkdir -p $(DESTDIR)$(libdir)
|
||||||
mkdir -p $(DESTDIR)$(pkgconfigdir)
|
|
||||||
mkdir -p $(DESTDIR)$(includedir)/openlibm
|
|
||||||
cp -f -a libopenlibm.*$(SHLIB_EXT)* $(DESTDIR)$(shlibdir)/
|
|
||||||
cp -f -a libopenlibm.a $(DESTDIR)$(libdir)/
|
cp -f -a libopenlibm.a $(DESTDIR)$(libdir)/
|
||||||
|
|
||||||
|
install-shared: libopenlibm.$(OLM_MAJOR_MINOR_SHLIB_EXT)
|
||||||
|
mkdir -p $(DESTDIR)$(shlibdir)
|
||||||
|
cp -f -a libopenlibm.*$(SHLIB_EXT)* $(DESTDIR)$(shlibdir)/
|
||||||
|
|
||||||
|
install-pkgconfig: openlibm.pc
|
||||||
|
mkdir -p $(DESTDIR)$(pkgconfigdir)
|
||||||
|
cp -f -a openlibm.pc $(DESTDIR)$(pkgconfigdir)/
|
||||||
|
|
||||||
|
install-headers:
|
||||||
|
mkdir -p $(DESTDIR)$(includedir)/openlibm
|
||||||
cp -f -a include/*.h $(DESTDIR)$(includedir)/openlibm
|
cp -f -a include/*.h $(DESTDIR)$(includedir)/openlibm
|
||||||
cp -f -a src/*.h $(DESTDIR)$(includedir)/openlibm
|
cp -f -a src/*.h $(DESTDIR)$(includedir)/openlibm
|
||||||
cp -f -a openlibm.pc $(DESTDIR)$(pkgconfigdir)/
|
|
||||||
|
install: install-static install-shared install-pkgconfig install-headers
|
||||||
|
|
Loading…
Reference in a new issue