aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile
blob: 64da6b31af6708132d3988af9910f844458ccec1 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
PREFIX = /usr

INCS = `pkg-config --cflags gtk+-2.0 vte`
LIBS = `pkg-config --libs gtk+-2.0 vte`
CFLAGS = -ansi -pedantic -Wall -O3 ${INCS}
LDFLAGS = -s ${LIBS}
CC = cc

SRC = T.c
OBJ = ${SRC:.c=.o}

all: T

.c.o:
	@echo CC $<
	@${CC} -c ${CFLAGS} $<

${OBJ}: config.h

T: ${OBJ}
	@echo CC -o $@
	@${CC} -o $@ ${OBJ} ${LDFLAGS}

clean:
	@echo cleaning
	@rm -rf T ${OBJ}

install: all
	@echo installing executable file to ${DESTDIR}${PREFIX}/bin
	@install -D -m755 T ${DESTDIR}${PREFIX}/bin/T
	@echo installing icon to ${DESTDIR}${PREFIX}/share/applications
	@install -D -m644 T.desktop ${DESTDIR}${PREFIX}/share/applications/T.desktop