scriptura/Makefile

39 lines
706 B
Makefile

PREFIX ?= /usr/local
CC = g++
CCFLAGS ?= -Wall $(shell pkg-config --cflags sword)
TARGET = scriptura
INCLUDES = -I/usr/include/sword -I/usr/include/ncursesw
LDFLAGS = -lmenuw -lformw -lncursesw -lstdc++ $(shell pkg-config --libs sword)
SOURCE = free.cpp scabbard.cpp pane.cpp scriptura.cpp
$(TARGET): sword
$(CC) $(CCFLAGS) -o $(TARGET) $(INCLUDES) $(SOURCE) $(LDFLAGS)
debug: CCFLAGS += -g
debug: $(TARGET)
sword:
ifeq ($(wildcard /usr/include/sword),)
echo "Error: sword-devel not installed."
exit 1
endif
doc:
doxygen Doxyfile
install:
install -m 0755 -D scriptura $(DESTDIR)$(PREFIX)/bin/scriptura
uninstall:
rm -v $(DESTDIR)$(PREFIX)/bin
clean:
rm -rf $(TARGET) html latex