CC=g++ LIBS=gtkmm-3.0 CFLAGS=-c -Wall 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/64x64/apps/ install -m 644 biblereader.png $(DESTDIR)$(PREFIX)/share/icons/hicolor/64x64/apps/ $(EXECUTABLE): $(OBJECTS) $(CC) $(LDFLAGS) $(OBJECTS) -o $@ `pkg-config $(LIBS) --libs` .cc.o: $(CC) $(CFLAGS) $< -o $@ `pkg-config $(LIBS) --cflags` clean: rm -rf *.o $(EXECUTABLE)