diff options
author | Matthias-Christian Ott <ott@enolink.de> | 2008-06-14 11:03:29 +0200 |
---|---|---|
committer | Matthias-Christian Ott <ott@enolink.de> | 2008-06-14 11:03:29 +0200 |
commit | 0c0ada8a7f6e916eb2b05ae5571e375e522d0a2e (patch) | |
tree | 35b21a7441ca61d545e6fd5499d675d97352d87d /Makefile | |
parent | 339e7f35713ae0c35be2537e6639cd5eee592acb (diff) | |
download | st-patched-0c0ada8a7f6e916eb2b05ae5571e375e522d0a2e.tar.bz2 st-patched-0c0ada8a7f6e916eb2b05ae5571e375e522d0a2e.tar.xz st-patched-0c0ada8a7f6e916eb2b05ae5571e375e522d0a2e.zip |
make st and std separate programmes
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 22 |
1 files changed, 15 insertions, 7 deletions
@@ -6,13 +6,14 @@ include config.mk | |||
6 | SRC = st.c std.c util.c pty.c | 6 | SRC = st.c std.c util.c pty.c |
7 | OBJ = ${SRC:.c=.o} | 7 | OBJ = ${SRC:.c=.o} |
8 | 8 | ||
9 | all: options st | 9 | all: options st std |
10 | 10 | ||
11 | options: | 11 | options: |
12 | @echo st build options: | 12 | @echo st build options: |
13 | @echo "CFLAGS = ${CFLAGS}" | 13 | @echo "CFLAGS = ${CFLAGS}" |
14 | @echo "LDFLAGS = ${LDFLAGS}" | 14 | @echo "LDFLAGS = ${LDFLAGS}" |
15 | @echo "CC = ${CC}" | 15 | @echo "X11LDFLAGS = ${X11LDFLAGS}" |
16 | @echo "CC = ${CC}" | ||
16 | 17 | ||
17 | .c.o: | 18 | .c.o: |
18 | @echo CC $< | 19 | @echo CC $< |
@@ -20,13 +21,17 @@ options: | |||
20 | 21 | ||
21 | ${OBJ}: config.mk | 22 | ${OBJ}: config.mk |
22 | 23 | ||
23 | st: ${OBJ} | 24 | st: st.o util.o |
24 | @echo CC -o $@ | 25 | @echo CC -o $@ |
25 | @${CC} -o $@ ${OBJ} ${LDFLAGS} | 26 | @${CC} -o $@ $^ ${LDFLAGS} ${X11LDFLAGS} |
27 | |||
28 | std: std.o pty.o util.o | ||
29 | @echo CC -o $@ | ||
30 | @${CC} -o $@ $^ ${LDFLAGS} | ||
26 | 31 | ||
27 | clean: | 32 | clean: |
28 | @echo cleaning | 33 | @echo cleaning |
29 | @rm -f st ${OBJ} st-${VERSION}.tar.gz | 34 | @rm -f st std ${OBJ} st-${VERSION}.tar.gz |
30 | 35 | ||
31 | dist: clean | 36 | dist: clean |
32 | @echo creating dist tarball | 37 | @echo creating dist tarball |
@@ -41,11 +46,14 @@ install: all | |||
41 | @echo installing executable file to ${DESTDIR}${PREFIX}/bin | 46 | @echo installing executable file to ${DESTDIR}${PREFIX}/bin |
42 | @mkdir -p ${DESTDIR}${PREFIX}/bin | 47 | @mkdir -p ${DESTDIR}${PREFIX}/bin |
43 | @cp -f st ${DESTDIR}${PREFIX}/bin | 48 | @cp -f st ${DESTDIR}${PREFIX}/bin |
49 | @cp -f std ${DESTDIR}${PREFIX}/bin | ||
44 | @chmod 755 ${DESTDIR}${PREFIX}/bin/st | 50 | @chmod 755 ${DESTDIR}${PREFIX}/bin/st |
45 | @echo installing manual page to ${DESTDIR}${MANPREFIX}/man1 | 51 | @echo installing manual page to ${DESTDIR}${MANPREFIX}/man1 |
46 | @mkdir -p ${DESTDIR}${MANPREFIX}/man1 | 52 | @mkdir -p ${DESTDIR}${MANPREFIX}/man1 |
47 | @sed "s/VERSION/${VERSION}/g" < st.1 > ${DESTDIR}${MANPREFIX}/man1/st.1 | 53 | @sed "s/VERSION/${VERSION}/g" < st.1 > ${DESTDIR}${MANPREFIX}/man1/st.1 |
48 | @chmod 644 ${DESTDIR}${MANPREFIX}/man1/st.1 | 54 | @chmod 644 ${DESTDIR}${MANPREFIX}/man1/st.1 |
55 | @sed "s/VERSION/${VERSION}/g" < std.1 > ${DESTDIR}${MANPREFIX}/man1/std.1 | ||
56 | @chmod 644 ${DESTDIR}${MANPREFIX}/man1/std.1 | ||
49 | 57 | ||
50 | uninstall: | 58 | uninstall: |
51 | @echo removing executable file from ${DESTDIR}${PREFIX}/bin | 59 | @echo removing executable file from ${DESTDIR}${PREFIX}/bin |