termite/Makefile

45 lines
1.0 KiB
Makefile
Raw Normal View History

2012-06-20 00:54:38 +02:00
VERSION = $(shell git describe --tags)
2012-05-22 06:34:35 +02:00
PREFIX = /usr/local
2012-06-01 10:15:49 +02:00
GTK = gtk+-3.0
VTE = vte-2.90
TERMINFO = ${PREFIX}/share/terminfo
2012-05-22 20:19:47 +02:00
2012-07-20 16:34:36 +02:00
CXXFLAGS := -std=c++11 -O3 \
-Wall -Wextra -pedantic \
-Winit-self \
-Wshadow \
-Wformat=2 \
-Wmissing-declarations \
-Wstrict-overflow=4 \
-Wcast-align \
-Wcast-qual \
-Wconversion \
-Wunused-macros \
-Wwrite-strings \
-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-06-08 18:46:58 +02:00
LDFLAGS := -s -Wl,--as-needed ${shell pkg-config --libs ${GTK} ${VTE}} ${LDFLAGS}
2012-05-22 06:34:35 +02:00
2012-06-08 22:16:41 +02:00
termite: termite.c
2012-07-20 16:34:36 +02:00
${CXX} ${CXXFLAGS} -o $@ $< ${LDFLAGS}
2012-05-22 06:34:35 +02:00
2012-05-22 15:50:21 +02:00
install: termite
mkdir -p ${DESTDIR}${TERMINFO}
2012-06-27 07:36:39 +02:00
install -Dm755 termite ${DESTDIR}${PREFIX}/bin/termite
tic termite.terminfo -o ${DESTDIR}${TERMINFO}
install -Dm644 termite.vim ${DESTDIR}${PREFIX}/share/vim/vimfiles/plugin/termite.vim
2012-05-22 06:34:35 +02:00
uninstall:
2012-05-22 15:50:21 +02:00
rm -f ${DESTDIR}${PREFIX}/bin/termite
2012-05-22 06:34:35 +02:00
clean:
rm termite
.PHONY: clean install uninstall