Skip to content

Commit 962fd25

Browse files
authored
Merge pull request #42 from svenstaro/patch-1
Proper installation paths
2 parents f7cdd17 + 74700b2 commit 962fd25

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
LIBTOOL ?= libtool
2-
LIBDIR ?= /usr/lib
2+
PREFIX ?= /usr
3+
INCLUDEDIR ?= ${PREFIX}/include/pystring
4+
LIBDIR ?= ${PREFIX}/lib
35
CXX ?= g++
46
CXXFLAGS ?= -g -O3 -Wall -Wextra -Wshadow -Wconversion -Wcast-qual -Wformat=2
57

@@ -12,7 +14,8 @@ libpystring.la: pystring.lo
1214
$(LIBTOOL) --mode=link --tag=CXX $(CXX) -o $@ $< -rpath $(LIBDIR)
1315

1416
install: libpystring.la
15-
$(LIBTOOL) --mode=install install -c $< $(LIBDIR)/$<
17+
$(LIBTOOL) --mode=install install -Dm755 $< $(DESTDIR)$(LIBDIR)/$<
18+
$(LIBTOOL) --mode=install install -Dm644 pystring.h $(DESTDIR)$(INCLUDEDIR)/pystring.h
1619

1720
clean:
1821
$(RM) -fr pystring.lo pystring.o libpystring.la .libs

0 commit comments

Comments
 (0)