Browse Source

Makefiles: Honour LDCONFIG from the environment

This is not set in normal shell sessions.

Honouring an existing setting of LDCONFIG allows the caller of ./build
to specify an alternative program to run.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
pull/62/head
Ian Jackson 9 years ago
parent
commit
f5dd04b5ae
2 changed files with 8 additions and 4 deletions
  1. +4
    -2
      devLib/Makefile
  2. +4
    -2
      wiringPi/Makefile

+ 4
- 2
devLib/Makefile View File

@@ -25,6 +25,8 @@ VERSION=$(shell cat ../VERSION)
DESTDIR?=/usr
PREFIX?=/local

LDCONFIG?=ldconfig

ifneq ($V,1)
Q ?= @
endif
@@ -90,7 +92,7 @@ install: $(DYNAMIC)
$Q install -m 0755 -d $(DESTDIR)$(PREFIX)/lib
$Q install -m 0755 libwiringPiDev.so.$(VERSION) $(DESTDIR)$(PREFIX)/lib/libwiringPiDev.so.$(VERSION)
$Q ln -sf $(DESTDIR)$(PREFIX)/lib/libwiringPiDev.so.$(VERSION) $(DESTDIR)/lib/libwiringPiDev.so
$Q ldconfig
$Q $(LDCONFIG)

.PHONY: install-static
install-static: $(STATIC)
@@ -116,7 +118,7 @@ uninstall:
$Q echo "[UnInstall]"
$Q cd $(DESTDIR)$(PREFIX)/include/ && rm -f $(HEADERS)
$Q cd $(DESTDIR)$(PREFIX)/lib/ && rm -f libwiringPiDev.*
$Q ldconfig
$Q $(LDCONFIG)


.PHONY: depend


+ 4
- 2
wiringPi/Makefile View File

@@ -25,6 +25,8 @@ VERSION=$(shell cat ../VERSION)
DESTDIR?=/usr
PREFIX?=/local

LDCONFIG?=ldconfig

ifneq ($V,1)
Q ?= @
endif
@@ -114,7 +116,7 @@ install: $(DYNAMIC)
$Q install -m 0755 -d $(DESTDIR)$(PREFIX)/lib
$Q install -m 0755 libwiringPi.so.$(VERSION) $(DESTDIR)$(PREFIX)/lib/libwiringPi.so.$(VERSION)
$Q ln -sf $(DESTDIR)$(PREFIX)/lib/libwiringPi.so.$(VERSION) $(DESTDIR)/lib/libwiringPi.so
$Q ldconfig
$Q $(LDCONFIG)

.PHONY: install-static
install-static: $(STATIC)
@@ -140,7 +142,7 @@ uninstall:
$Q echo "[UnInstall]"
$Q cd $(DESTDIR)$(PREFIX)/include/ && rm -f $(HEADERS)
$Q cd $(DESTDIR)$(PREFIX)/lib/ && rm -f libwiringPi.*
$Q ldconfig
$Q $(LDCONFIG)


.PHONY: depend


Loading…
Cancel
Save