aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 11 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 7778cce..0a9a302 100644
--- a/Makefile
+++ b/Makefile
@@ -5,9 +5,20 @@ LDFLAGS=-pthread -lbible
SOURCES=header.cc main.cc mods.cc readerview.cc sword.cc
OBJECTS=$(SOURCES:.cc=.o)
EXECUTABLE=biblereader
+ifeq ($(PREFIX),)
+ PREFIX := /usr
+endif
all: $(SOURCES) $(EXECUTABLE)
+install: $(EXECUTABLE)
+ install -d $(DESTDIR)$(PREFIX)/bin/
+ install -m 755 $(EXECUTABLE) $(DESTDIR)$(PREFIX)/bin/
+ install -d $(DESTDIR)$(PREFIX)/share/applications/
+ install -m 644 biblereader.desktop $(DESTDIR)$(PREFIX)/share/applications/
+ install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/symbolic/apps/
+ install -m 644 biblereader-symbolic.svg $(DESTDIR)$(PREFIX)/share/icons/hicolor/symbolic/apps/
+
$(EXECUTABLE): $(OBJECTS)
$(CC) $(LDFLAGS) $(OBJECTS) -o $@ `pkg-config $(LIBS) --libs`