aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/Makefile b/src/Makefile
new file mode 100644
index 0000000..64da6b3
--- /dev/null
+++ b/src/Makefile
@@ -0,0 +1,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