Skip to content

Commit 6828c51

Browse files
authored
Merge pull request #121 from nalimilan/nl/dirs
Support `libdir` and `includedir` variables
2 parents 47a87e5 + 90bee5f commit 6828c51

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/Make.inc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,9 @@ endif
118118
prefix ?= prefix
119119
builddir ?= build
120120

121+
libdir := $(prefix)/$(binlib)
122+
includedir := $(prefix)/include
123+
121124
define newline # a literal \n
122125

123126

src/Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,12 @@ endif
7373

7474
# Install both libraries and our headers
7575
install: $(TARGET_LIBRARIES)
76-
@mkdir -p $(DESTDIR)$(prefix)/include/libblastrampoline
77-
-@cp -Ra $(LBT_ROOT)/include/* $(DESTDIR)$(prefix)/include/libblastrampoline
78-
@cp -a $(LBT_ROOT)/src/libblastrampoline.h $(DESTDIR)$(prefix)/include/
79-
@mkdir -p $(DESTDIR)$(prefix)/$(binlib)
76+
@mkdir -p $(DESTDIR)$(includedir)/libblastrampoline
77+
-@cp -Ra $(LBT_ROOT)/include/* $(DESTDIR)$(includedir)/libblastrampoline
78+
@cp -a $(LBT_ROOT)/src/libblastrampoline.h $(DESTDIR)$(includedir)/
79+
@mkdir -p $(DESTDIR)$(libdir)
8080
@for lib in $(TARGET_LIBRARIES); do \
81-
cp -a $${lib} $(DESTDIR)$(prefix)/$(binlib)/; \
81+
cp -a $${lib} $(DESTDIR)$(libdir)/; \
8282
done
8383
ifeq ($(OS),WINNT)
8484
@mkdir -p $(DESTDIR)$(prefix)/lib

0 commit comments

Comments
 (0)