termite/Makefile

57 lines
1.5 KiB
Makefile
Raw Normal View History

2012-06-20 00:54:38 +02:00
VERSION = $(shell git describe --tags)
2012-06-01 10:15:49 +02:00
GTK = gtk+-3.0
VTE = vte-2.91
2018-10-13 15:44:56 +02:00
PREFIX ?= /usr/local
BINDIR ?= ${PREFIX}/bin
DATADIR ?= ${PREFIX}/share
MANDIR ?= ${DATADIR}/man
TERMINFO ?= ${DATADIR}/terminfo
2012-05-22 20:19:47 +02:00
CXXFLAGS := -std=c++11 -O3 \
2012-07-20 16:34:36 +02:00
-Wall -Wextra -pedantic \
-Winit-self \
-Wshadow \
-Wformat=2 \
-Wmissing-declarations \
-Wstrict-overflow=5 \
2012-07-20 16:34:36 +02:00
-Wcast-align \
-Wconversion \
-Wunused-macros \
-Wwrite-strings \
2012-10-11 16:16:25 +02:00
-DNDEBUG \
-D_POSIX_C_SOURCE=200809L \
2012-07-20 16:34:36 +02:00
-DTERMITE_VERSION=\"${VERSION}\" \
${shell pkg-config --cflags ${GTK} ${VTE}} \
${CXXFLAGS}
ifeq (${CXX}, g++)
CXXFLAGS += -Wno-missing-field-initializers
2012-06-08 03:50:44 +02:00
endif
2012-12-13 16:26:26 +01:00
ifeq (${CXX}, clang++)
CXXFLAGS += -Wimplicit-fallthrough
endif
2012-08-15 02:16:24 +02:00
LDFLAGS := -s -Wl,--as-needed ${LDFLAGS}
LDLIBS := ${shell pkg-config --libs ${GTK} ${VTE}}
2012-05-22 06:34:35 +02:00
termite: termite.cc url_regex.hh util/clamp.hh util/maybe.hh util/memory.hh keybindings.hh
2012-08-16 11:04:47 +02:00
${CXX} ${CXXFLAGS} ${LDFLAGS} $< ${LDLIBS} -o $@
2012-05-22 06:34:35 +02:00
2012-10-27 05:19:37 +02:00
install: termite termite.desktop termite.terminfo
mkdir -p ${DESTDIR}${TERMINFO}
2018-10-13 15:44:56 +02:00
install -Dm755 termite ${DESTDIR}${BINDIR}/termite
2016-02-11 21:48:41 +01:00
install -Dm644 config ${DESTDIR}/etc/xdg/termite/config
2018-10-13 15:44:56 +02:00
install -Dm644 termite.desktop ${DESTDIR}${DATADIR}/applications/termite.desktop
install -Dm644 man/termite.1 ${DESTDIR}${MANDIR}/man1/termite.1
install -Dm644 man/termite.config.5 ${DESTDIR}${MANDIR}/man5/termite.config.5
tic -x -o ${DESTDIR}${TERMINFO} termite.terminfo
2012-05-22 06:34:35 +02:00
uninstall:
2018-10-13 15:44:56 +02:00
rm -f ${DESTDIR}${BINDIR}/termite
2012-05-22 06:34:35 +02:00
clean:
rm termite
.PHONY: clean install uninstall