From 671f9a0025a88d28838006d58a81de170208433b Mon Sep 17 00:00:00 2001 From: Ivan Kanakarakis Date: Wed, 14 Dec 2011 11:23:13 +0200 Subject: define wmname in makefile --- Makefile | 2 +- monsterwm.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 48f4979..48480f1 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ X11LIB = /usr/lib/X11 INCS = -I. -I/usr/include -I${X11INC} LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 -CPPFLAGS = -DVERSION=\"${VERSION}\" +CPPFLAGS = -DVERSION=\"${VERSION}\" -DWMNAME=\"${WMNAME}\" CFLAGS = -g -std=c99 -pedantic -Wall -Wextra -Os ${INCS} ${CPPFLAGS} LDFLAGS = -g ${LIBS} diff --git a/monsterwm.c b/monsterwm.c index 474bf22..e3f6d9b 100644 --- a/monsterwm.c +++ b/monsterwm.c @@ -779,10 +779,10 @@ void die(const char *errstr, ...) { int main(int argc, char *argv[]) { if(argc == 2 && strcmp("-v", argv[1]) == 0) { - fprintf(stdout, "monsterwm-%s\n", VERSION); + fprintf(stdout, "%s-%s\n", WMNAME, VERSION); return EXIT_SUCCESS; } else if(argc != 1) - die("usage: monsterwm [-v]\n"); + die("usage: %s [-v]\n", WMNAME); if(!(dis = XOpenDisplay(NULL))) die("error: cannot open display\n"); setup(); -- cgit v1.3.1