2012-05-22 06:34:35 +02:00
|
|
|
PREFIX = /usr/local
|
2012-05-23 13:47:56 +02:00
|
|
|
TERMINFO = ${PREFIX}/share/terminfo
|
2012-05-22 06:34:35 +02:00
|
|
|
|
2012-05-22 20:19:47 +02:00
|
|
|
ifeq (${GTK3}, 1)
|
|
|
|
GTK = gtk+-3.0
|
|
|
|
VTE = vte-2.90
|
|
|
|
else
|
|
|
|
GTK = gtk+-2.0
|
|
|
|
VTE = vte
|
|
|
|
endif
|
|
|
|
|
2012-05-22 15:10:19 +02:00
|
|
|
CFLAGS += -std=c99 -O3 \
|
|
|
|
-Wall -Wextra -pedantic \
|
|
|
|
-Winit-self \
|
|
|
|
-Wshadow \
|
|
|
|
-Wformat=2 \
|
|
|
|
-Wmissing-declarations \
|
2012-05-22 20:19:47 +02:00
|
|
|
$(shell pkg-config --cflags ${GTK} ${VTE})
|
2012-05-22 06:34:35 +02:00
|
|
|
|
2012-05-22 20:19:47 +02:00
|
|
|
LDFLAGS += -s -Wl,--as-needed $(shell pkg-config --libs ${GTK} ${VTE})
|
2012-05-22 06:34:35 +02:00
|
|
|
|
2012-05-22 15:50:21 +02:00
|
|
|
termite: termite.c config.h
|
2012-05-22 06:34:35 +02:00
|
|
|
${CC} ${CFLAGS} -o $@ $< ${LDFLAGS}
|
|
|
|
|
2012-05-22 15:50:21 +02:00
|
|
|
install: termite
|
2012-05-22 06:34:35 +02:00
|
|
|
mkdir -p ${DESTDIR}${PREFIX}/bin
|
2012-05-22 15:50:21 +02:00
|
|
|
cp -f termite ${DESTDIR}${PREFIX}/bin
|
|
|
|
chmod 755 ${DESTDIR}${PREFIX}/bin/termite
|
2012-05-23 13:47:56 +02:00
|
|
|
mkdir -p ${DESTDIR}${TERMINFO}
|
|
|
|
tic termite.terminfo -o ${DESTDIR}${TERMINFO}
|
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
|
|
|
|
|
|
|
.PHONY: install uninstall
|