aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorAnselm R Garbe <garbeam@gmail.com>2008-05-20 10:03:59 +0100
committerAnselm R Garbe <garbeam@gmail.com>2008-05-20 10:03:59 +0100
commit1987ae4bacf58c588bbc967434be4e39125c37f9 (patch)
tree8e78431653d5a5186b259dc24c71c6d0c2a34c83 /Makefile
parent16f373e36cb2ef0512ac8a281cc18132b2b14b98 (diff)
downloadst-patched-1987ae4bacf58c588bbc967434be4e39125c37f9.tar.bz2
st-patched-1987ae4bacf58c588bbc967434be4e39125c37f9.tar.xz
st-patched-1987ae4bacf58c588bbc967434be4e39125c37f9.zip
added some new files for the initial rewrite of st from scratch
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile60
1 files changed, 60 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..c4d0b1a
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,60 @@
1# st - simple terminal
2# See LICENSE file for copyright and license details.
3
4include config.mk
5
6SRC = st
7OBJ = ${SRC:.c=.o}
8
9all: options st
10
11options:
12 @echo st build options:
13 @echo "CFLAGS = ${CFLAGS}"
14 @echo "LDFLAGS = ${LDFLAGS}"
15 @echo "CC = ${CC}"
16
17.c.o:
18 @echo CC $<
19 @${CC} -c ${CFLAGS} $<
20
21${OBJ}: config.h config.mk
22
23config.h:
24 @echo creating $@ from config.def.h
25 @cp config.def.h $@
26
27st: ${OBJ}
28 @echo CC -o $@
29 @${CC} -o $@ ${OBJ} ${LDFLAGS}
30
31clean:
32 @echo cleaning
33 @rm -f st ${OBJ} st-${VERSION}.tar.gz
34
35dist: clean
36 @echo creating dist tarball
37 @mkdir -p st-${VERSION}
38 @cp -R LICENSE Makefile README config.def.h config.mk \
39 st.1 ${SRC} st-${VERSION}
40 @tar -cf st-${VERSION}.tar st-${VERSION}
41 @gzip st-${VERSION}.tar
42 @rm -rf st-${VERSION}
43
44install: all
45 @echo installing executable file to ${DESTDIR}${PREFIX}/bin
46 @mkdir -p ${DESTDIR}${PREFIX}/bin
47 @cp -f st ${DESTDIR}${PREFIX}/bin
48 @chmod 755 ${DESTDIR}${PREFIX}/bin/st
49 @echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
50 @mkdir -p ${DESTDIR}${MANPREFIX}/man1
51 @sed "s/VERSION/${VERSION}/g" < st.1 > ${DESTDIR}${MANPREFIX}/man1/st.1
52 @chmod 644 ${DESTDIR}${MANPREFIX}/man1/st.1
53
54uninstall:
55 @echo removing executable file from ${DESTDIR}${PREFIX}/bin
56 @rm -f ${DESTDIR}${PREFIX}/bin/st
57 @echo removing manual page from ${DESTDIR}${MANPREFIX}/man1
58 @rm -f ${DESTDIR}${MANPREFIX}/man1/st.1
59
60.PHONY: all options clean dist install uninstall