summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMatthias-Christian Ott <ott@enolink.de>2008-06-14 11:03:29 +0200
committerMatthias-Christian Ott <ott@enolink.de>2008-06-14 11:03:29 +0200
commit0c0ada8a7f6e916eb2b05ae5571e375e522d0a2e (patch)
tree35b21a7441ca61d545e6fd5499d675d97352d87d /Makefile
parent339e7f35713ae0c35be2537e6639cd5eee592acb (diff)
make st and std separate programmes
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile22
1 files changed, 15 insertions, 7 deletions
diff --git a/Makefile b/Makefile
index dcbbbcf..ddf1952 100644
--- a/Makefile
+++ b/Makefile
@@ -6,13 +6,14 @@ include config.mk
SRC = st.c std.c util.c pty.c
OBJ = ${SRC:.c=.o}
-all: options st
+all: options st std
options:
@echo st build options:
- @echo "CFLAGS = ${CFLAGS}"
- @echo "LDFLAGS = ${LDFLAGS}"
- @echo "CC = ${CC}"
+ @echo "CFLAGS = ${CFLAGS}"
+ @echo "LDFLAGS = ${LDFLAGS}"
+ @echo "X11LDFLAGS = ${X11LDFLAGS}"
+ @echo "CC = ${CC}"
.c.o:
@echo CC $<
@@ -20,13 +21,17 @@ options:
${OBJ}: config.mk
-st: ${OBJ}
+st: st.o util.o
@echo CC -o $@
- @${CC} -o $@ ${OBJ} ${LDFLAGS}
+ @${CC} -o $@ $^ ${LDFLAGS} ${X11LDFLAGS}
+
+std: std.o pty.o util.o
+ @echo CC -o $@
+ @${CC} -o $@ $^ ${LDFLAGS}
clean:
@echo cleaning
- @rm -f st ${OBJ} st-${VERSION}.tar.gz
+ @rm -f st std ${OBJ} st-${VERSION}.tar.gz
dist: clean
@echo creating dist tarball
@@ -41,11 +46,14 @@ install: all
@echo installing executable file to ${DESTDIR}${PREFIX}/bin
@mkdir -p ${DESTDIR}${PREFIX}/bin
@cp -f st ${DESTDIR}${PREFIX}/bin
+ @cp -f std ${DESTDIR}${PREFIX}/bin
@chmod 755 ${DESTDIR}${PREFIX}/bin/st
@echo installing manual page to ${DESTDIR}${MANPREFIX}/man1
@mkdir -p ${DESTDIR}${MANPREFIX}/man1
@sed "s/VERSION/${VERSION}/g" < st.1 > ${DESTDIR}${MANPREFIX}/man1/st.1
@chmod 644 ${DESTDIR}${MANPREFIX}/man1/st.1
+ @sed "s/VERSION/${VERSION}/g" < std.1 > ${DESTDIR}${MANPREFIX}/man1/std.1
+ @chmod 644 ${DESTDIR}${MANPREFIX}/man1/std.1
uninstall:
@echo removing executable file from ${DESTDIR}${PREFIX}/bin