fixed bugs, no more config.h, updated manpage, new libdraw
Connor Lane Smith cls@lubutu.com
Mon, 02 Aug 2010 14:22:54 +0100
M
Makefile
→
Makefile
@@ -3,9 +3,6 @@ # See LICENSE file for copyright and license details.
include config.mk -SRC = dmenu.c -OBJ = ${SRC:.c=.o} - all: options dmenu options:@@ -14,34 +11,28 @@ @echo "CFLAGS = ${CFLAGS}"
@echo "LDFLAGS = ${LDFLAGS}" @echo "CC = ${CC}" -.c.o: +dmenu.o: dmenu.c config.mk @echo CC $< @${CC} -c ${CFLAGS} $< -${OBJ}: config.h config.mk - -config.h: - @echo creating $@ from config.def.h - @cp config.def.h $@ - -dmenu: ${OBJ} +dmenu: dmenu.o @echo CC -o $@ @${CC} -o $@ $+ ${LDFLAGS} clean: @echo cleaning - @rm -f dmenu ${OBJ} dmenu-${VERSION}.tar.gz + @rm -f dmenu dmenu.o dmenu-${VERSION}.tar.gz dist: clean @echo creating dist tarball @mkdir -p dmenu-${VERSION} - @cp -R LICENSE Makefile README config.mk dmenu.1 config.def.h dmenu_path dmenu_run ${SRC} dmenu-${VERSION} + @cp -R LICENSE Makefile README config.mk dmenu.1 dmenu.c dmenu_path dmenu_run dmenu-${VERSION} @tar -cf dmenu-${VERSION}.tar dmenu-${VERSION} @gzip dmenu-${VERSION}.tar @rm -rf dmenu-${VERSION} install: all - @echo installing executable file to ${DESTDIR}${PREFIX}/bin + @echo installing executables to ${DESTDIR}${PREFIX}/bin @mkdir -p ${DESTDIR}${PREFIX}/bin @cp -f dmenu dmenu_path dmenu_run ${DESTDIR}${PREFIX}/bin @chmod 755 ${DESTDIR}${PREFIX}/bin/dmenu@@ -53,8 +44,9 @@ @sed "s/VERSION/${VERSION}/g" < dmenu.1 > ${DESTDIR}${MANPREFIX}/man1/dmenu.1
@chmod 644 ${DESTDIR}${MANPREFIX}/man1/dmenu.1 uninstall: - @echo removing executable file from ${DESTDIR}${PREFIX}/bin - @rm -f ${DESTDIR}${PREFIX}/bin/dmenu ${DESTDIR}${PREFIX}/bin/dmenu_path + @echo removing executables from ${DESTDIR}${PREFIX}/bin + @rm -f ${DESTDIR}${PREFIX}/bin/dmenu + @rm -f ${DESTDIR}${PREFIX}/bin/dmenu_path @rm -f ${DESTDIR}${PREFIX}/bin/dmenu_run @echo removing manual page from ${DESTDIR}${MANPREFIX}/man1 @rm -f ${DESTDIR}${MANPREFIX}/man1/dmenu.1
M
README
→
README
@@ -1,21 +1,22 @@
dmenu - dynamic menu ==================== -dmenu is a generic and efficient menu for X. +dmenu is an efficient dynamic menu for X. Requirements ------------ In order to build dmenu you need the Xlib header files. + You also need libdraw, available from http://hg.suckless.org/libdraw Installation ------------ -Edit config.mk to match your local setup (dmenu is installed into the -/usr/local namespace by default). +Edit config.mk to match your local setup (dmenu is installed into +the /usr/local namespace by default). -Afterwards enter the following command to build and install dmenu (if -necessary as root): +Afterwards enter the following command to build and install dmenu +(if necessary as root): make clean install
D
config.def.h
@@ -1,8 +0,0 @@
-/* See LICENSE file for copyright and license details. */ - -/* appearance */ -static const char *font = "-*-terminus-medium-r-normal-*-14-*-*-*-*-*-*-*"; -static const char *normbgcolor = "#cccccc"; -static const char *normfgcolor = "#000000"; -static const char *selbgcolor = "#0066ff"; -static const char *selfgcolor = "#ffffff";
M
config.mk
→
config.mk
@@ -1,5 +1,5 @@
# dmenu version -VERSION = 4.1.1 +VERSION = 4.2 # Customize below to fit your system@@ -7,25 +7,22 @@ # paths
PREFIX = /usr/local MANPREFIX = ${PREFIX}/share/man +# Xlib X11INC = /usr/X11R6/include X11LIB = /usr/X11R6/lib # Xinerama, comment if you don't want it -XINERAMALIBS = -L${X11LIB} -lXinerama +XINERAMALIBS = -lXinerama XINERAMAFLAGS = -DXINERAMA # includes and libs -INCS = -I. -I/usr/include -I${X11INC} -LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 -ldraw ${XINERAMALIBS} +INCS = -I${X11INC} +LIBS = -L${X11LIB} -ldraw -lX11 ${XINERAMALIBS} # flags CPPFLAGS = -D_BSD_SOURCE -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS} -CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS} -LDFLAGS = -s ${LIBS} - -# Solaris -#CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\" -#LDFLAGS = ${LIBS} +CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS} +LDFLAGS = -s ${LIBS} # compiler and linker CC = cc