aboutsummaryrefslogtreecommitdiff
path: root/Makefile
blob: c613482d8e730f6478ddf8a2b7d405fa71f189dc (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
33
34
35
36
37
38
DESTDIR = /
PREFIX = usr

INCS = `pkg-config --cflags gtk+-2.0 gdk-2.0 vte`
LIBS = `pkg-config --libs gtk+-2.0 gdk-2.0 vte`
CFLAGS = -std=c99 -pedantic -Wall -O2 ${INCS}
LDFLAGS = -s ${LIBS}
VER = 0.9
CC = cc

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

all: T

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

${OBJ}: config.h

T: T.o
	@echo CC -o $@
	@${CC} -o $@ $^ ${LDFLAGS}

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

install: all
	@echo installing executable files in ${DESTDIR}${PREFIX}/bin
	@install -D -m755 T ${DESTDIR}${PREFIX}/bin/T

uninstall:
	@echo removing executable files from ${DESTDIR}${PREFIX}/bin
	@rm -f ${DESTDIR}${PREFIX}/bin/T

.PHONY: all clean install uninstall