aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYour Name <you@example.com>2022-02-19 10:54:35 -0500
committerYour Name <you@example.com>2022-02-19 10:54:35 -0500
commit4f26d55e01f9424ba5660cb27076eafba4c88b21 (patch)
tree41131c34e6610cd1b3c52b2b771ef550134a725d
parenta5cdc506789ac6aeb6f4256b892fedf046fff06c (diff)
downloadbiblereader-4f26d55e01f9424ba5660cb27076eafba4c88b21.tar.gz
biblereader-4f26d55e01f9424ba5660cb27076eafba4c88b21.tar.bz2
biblereader-4f26d55e01f9424ba5660cb27076eafba4c88b21.zip
Reorganized sources
-rw-r--r--Makefile38
-rw-r--r--files/biblereader-symbolic.svg (renamed from biblereader-symbolic.svg)0
-rw-r--r--files/biblereader.desktop (renamed from biblereader.desktop)0
-rw-r--r--files/biblereader.png (renamed from biblereader.png)bin3399 -> 3399 bytes
-rw-r--r--files/biblereader_128.png (renamed from biblereader_128.png)bin3399 -> 3399 bytes
-rw-r--r--files/biblereader_64.png (renamed from biblereader_64.png)bin2414 -> 2414 bytes
-rw-r--r--src/header.cc (renamed from header.cc)0
-rw-r--r--src/header.h (renamed from header.h)0
-rw-r--r--src/main.cc (renamed from main.cc)0
-rw-r--r--src/mods.cc (renamed from mods.cc)0
-rw-r--r--src/mods.h (renamed from mods.h)0
-rw-r--r--src/readerview.cc (renamed from readerview.cc)0
-rw-r--r--src/readerview.h (renamed from readerview.h)0
-rw-r--r--src/sword.cc (renamed from sword.cc)0
-rw-r--r--src/sword.h (renamed from sword.h)0
15 files changed, 18 insertions, 20 deletions
diff --git a/Makefile b/Makefile
index 496aac6..9c9eb08 100644
--- a/Makefile
+++ b/Makefile
@@ -1,31 +1,29 @@
-CC=g++
LIBS=gtkmm-3.0
-CFLAGS=-c -Wall
-LDLIBS=-pthread -lbible
-SOURCES=header.cc main.cc mods.cc readerview.cc sword.cc
+override CXXFLAGS += -MMD -Wall `pkg-config $(LIBS) --cflags`
+override LDFLAGS += -pthread -lbible `pkg-config $(LIBS) --libs`
+SOURCES=$(wildcard src/*.cc)
OBJECTS=$(SOURCES:.cc=.o)
+DEPS = $(OBJECTS:.o=.d)
EXECUTABLE=biblereader
-ifeq ($(PREFIX),)
- PREFIX := /usr
-endif
+PREFIX ?= /usr
+EXEC_PREFIX ?= $(PREFIX)
+BINDIR ?= $(EXEC_PREFIX)/bin
-all: $(SOURCES) $(EXECUTABLE)
+$(EXECUTABLE): $(OBJECTS)
+ $(CXX) $(OBJECTS) -o $@ $(LDFLAGS)
+
+-include $(DEPS)
install: $(EXECUTABLE)
- install -d $(DESTDIR)$(PREFIX)/bin/
- install -m 755 $(EXECUTABLE) $(DESTDIR)$(PREFIX)/bin/
+ install -d $(DESTDIR)$(BINDIR)
+ install -m 755 $(EXECUTABLE) $(DESTDIR)$(BINDIR)
install -d $(DESTDIR)$(PREFIX)/share/applications/
- install -m 644 biblereader.desktop $(DESTDIR)$(PREFIX)/share/applications/
+ install -m 644 files/biblereader.desktop $(DESTDIR)$(PREFIX)/share/applications/
install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/128x128/apps/
- install -m 644 biblereader_128.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/128x128/apps/biblereader.png
+ install -m 644 files/biblereader_128.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/128x128/apps/biblereader.png
install -d $(DESTDIR)$(PREFIX)/share/icons/hicolor/64x64/apps/
- install -m 644 biblereader_64.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/64x64/apps/biblereader.png
-
-$(EXECUTABLE): $(OBJECTS)
- $(CC) $(OBJECTS) -o $@ $(LDFLAGS) `pkg-config $(LIBS) --libs` $(LDLIBS)
-
-.cc.o:
- $(CC) $(CFLAGS) $< -o $@ `pkg-config $(LIBS) --cflags`
+ install -m 644 files/biblereader_64.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/64x64/apps/biblereader.png
+.PHONY: clean
clean:
- rm -rf *.o $(EXECUTABLE)
+ $(RM) $(OBJECTS) $(DEPS) $(EXECUTABLE)
diff --git a/biblereader-symbolic.svg b/files/biblereader-symbolic.svg
index 7854114..7854114 100644
--- a/biblereader-symbolic.svg
+++ b/files/biblereader-symbolic.svg
diff --git a/biblereader.desktop b/files/biblereader.desktop
index e0f2518..e0f2518 100644
--- a/biblereader.desktop
+++ b/files/biblereader.desktop
diff --git a/biblereader.png b/files/biblereader.png
index 5e12481..5e12481 100644
--- a/biblereader.png
+++ b/files/biblereader.png
Binary files differ
diff --git a/biblereader_128.png b/files/biblereader_128.png
index fc666a3..fc666a3 100644
--- a/biblereader_128.png
+++ b/files/biblereader_128.png
Binary files differ
diff --git a/biblereader_64.png b/files/biblereader_64.png
index b90e219..b90e219 100644
--- a/biblereader_64.png
+++ b/files/biblereader_64.png
Binary files differ
diff --git a/header.cc b/src/header.cc
index c40e44e..c40e44e 100644
--- a/header.cc
+++ b/src/header.cc
diff --git a/header.h b/src/header.h
index fd88fe5..fd88fe5 100644
--- a/header.h
+++ b/src/header.h
diff --git a/main.cc b/src/main.cc
index ad62814..ad62814 100644
--- a/main.cc
+++ b/src/main.cc
diff --git a/mods.cc b/src/mods.cc
index 405b316..405b316 100644
--- a/mods.cc
+++ b/src/mods.cc
diff --git a/mods.h b/src/mods.h
index 7373961..7373961 100644
--- a/mods.h
+++ b/src/mods.h
diff --git a/readerview.cc b/src/readerview.cc
index aef003d..aef003d 100644
--- a/readerview.cc
+++ b/src/readerview.cc
diff --git a/readerview.h b/src/readerview.h
index 0ea631e..0ea631e 100644
--- a/readerview.h
+++ b/src/readerview.h
diff --git a/sword.cc b/src/sword.cc
index a693085..a693085 100644
--- a/sword.cc
+++ b/src/sword.cc
diff --git a/sword.h b/src/sword.h
index 1cd7f61..1cd7f61 100644
--- a/sword.h
+++ b/src/sword.h