dvtm

dynamic virtual terminal manager - with my changes
git clone https://pi.duncano.de/git/dvtm.git
Log | Files | Refs | README | LICENSE

commit 891f275a4499a0b608265a98030dd55206dc82f5
parent 85666f099c2c464ecff678ec827c1e77541efdcd
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Tue,  3 Jan 2017 10:53:54 +0100

Simplify Makefile

Diffstat:
Makefile | 41+++++++++++------------------------------
config.mk | 9+--------
2 files changed, 12 insertions(+), 38 deletions(-)

diff --git a/Makefile b/Makefile @@ -1,51 +1,32 @@ include config.mk SRC = dvtm.c vt.c -OBJ = ${SRC:.c=.o} BIN = dvtm dvtm-status dvtm-pager -all: clean options dvtm +VERSION = $(shell git describe --always --dirty 2>/dev/null || echo "0.15-git") +CFLAGS += -DVERSION=\"${VERSION}\" +DEBUG_CFLAGS = ${CFLAGS} -UNDEBUG -O0 -g -ggdb -Wall -Wextra -Wno-unused-parameter -options: - @echo dvtm build options: - @echo "CFLAGS = ${CFLAGS}" - @echo "LDFLAGS = ${LDFLAGS}" - @echo "CC = ${CC}" +all: dvtm config.h: cp config.def.h config.h -.c.o: - @echo CC $< - @${CC} -c ${CFLAGS} $< - -${OBJ}: config.h config.mk - -dvtm: ${OBJ} - @echo CC -o $@ - @${CC} -o $@ ${OBJ} ${LDFLAGS} +dvtm: config.h config.mk *.c *.h + ${CC} ${CFLAGS} ${SRC} ${LDFLAGS} ${LIBS} -o $@ debug: clean - @make CFLAGS='${DEBUG_CFLAGS}' + @$(MAKE) CFLAGS='${DEBUG_CFLAGS}' clean: @echo cleaning - @rm -f dvtm ${OBJ} dvtm-${VERSION}.tar.gz + @rm -f dvtm dist: clean @echo creating dist tarball - @mkdir -p dvtm-${VERSION} - @cp -R LICENSE Makefile README.md testsuite.sh config.def.h config.mk \ - ${SRC} vt.h forkpty-aix.c forkpty-sunos.c tile.c bstack.c \ - tstack.c vstack.c grid.c fullscreen.c fibonacci.c \ - dvtm-status dvtm.info dvtm.1 dvtm-${VERSION} - @tar -cf dvtm-${VERSION}.tar dvtm-${VERSION} - @gzip dvtm-${VERSION}.tar - @rm -rf dvtm-${VERSION} + @git archive --prefix=dvtm-${VERSION}/ -o dvtm-${VERSION}.tar.gz HEAD -install: dvtm - @echo stripping executable - @${STRIP} dvtm +install: all @mkdir -p ${DESTDIR}${PREFIX}/bin @for b in ${BIN}; do \ echo "installing ${DESTDIR}${PREFIX}/bin/$$b"; \ @@ -67,4 +48,4 @@ uninstall: @echo removing manual page from ${DESTDIR}${MANPREFIX}/man1 @rm -f ${DESTDIR}${MANPREFIX}/man1/dvtm.1 -.PHONY: all options clean dist install uninstall debug +.PHONY: all clean dist install uninstall debug diff --git a/config.mk b/config.mk @@ -1,6 +1,3 @@ -# dvtm version -VERSION = 0.15 - # Customize below to fit your system PREFIX ?= /usr/local @@ -12,10 +9,6 @@ TERMINFO := ${DESTDIR}${PREFIX}/share/terminfo INCS = -I. LIBS = -lc -lutil -lncursesw CPPFLAGS = -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -D_XOPEN_SOURCE_EXTENDED -CFLAGS += -std=c99 ${INCS} -DVERSION=\"${VERSION}\" -DNDEBUG ${CPPFLAGS} -LDFLAGS += ${LIBS} - -DEBUG_CFLAGS = ${CFLAGS} -UNDEBUG -O0 -g -ggdb -Wall -Wextra -Wno-unused-parameter +CFLAGS += -std=c99 ${INCS} -DNDEBUG ${CPPFLAGS} CC ?= cc -STRIP ?= strip