LIBS=gtkmm-3.0 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 prefix ?= /usr exec_prefix ?= $(prefix) bindir ?= $(exec_prefix)/bin $(EXECUTABLE): $(OBJECTS) $(CXX) $(OBJECTS) -o $@ $(LDFLAGS) -include $(DEPS) install: $(EXECUTABLE) install -d $(DESTDIR)$(bindir) install -m 755 $(EXECUTABLE) $(DESTDIR)$(bindir) install -d $(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 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 files/biblereader_64.png $(DESTDIR)$(prefix)/share/icons/hicolor/64x64/apps/biblereader.png .PHONY: clean clean: $(RM) $(OBJECTS) $(DEPS) $(EXECUTABLE)