about summary refs log tree commit diff stats
path: root/config.mk
blob: 320aea1ebd586ef1f8b5690c0d23b8dd3a8f1056 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# dwm version
VERSION = 4.4

# Customize below to fit your system

# additional layouts beside floating
SRC = tile.c

# paths
PREFIX = /usr/local
MANPREFIX = ${PREFIX}/share/man

X11INC = /usr/X11R6/include
X11LIB = /usr/X11R6/lib

# includes and libs
INCS = -I. -I/usr/include -I${X11INC}
LIBS = -L/usr/lib -lc -L${X11LIB} -lX11

# flags
CFLAGS = -Os ${INCS} -DVERSION=\"${VERSION}\"
LDFLAGS = -s ${LIBS}
#CFLAGS = -g -Wall -O2 ${INCS} -DVERSION=\"${VERSION}\"
#LDFLAGS = -g ${LIBS}

# Solaris
#CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\"
#LDFLAGS = ${LIBS}
#CFLAGS += -xtarget=ultra

# compiler and linker
CC = cc
class="n">size); return res; } void eprint(const char *errstr, ...) { va_list ap; va_start(ap, errstr); vfprintf(stderr, errstr, ap); va_end(ap); exit(EXIT_FAILURE); } void * erealloc(void *ptr, unsigned int size) { void *res = realloc(ptr, size); if(!res) eprint("fatal: could not malloc() %u bytes\n", size); return res; } void spawn(Arg *arg) { static char *shell = NULL; if(!shell && !(shell = getenv("SHELL"))) shell = "/bin/sh"; if(!arg->cmd) return; /* the double-fork construct avoids zombie processes */ if(fork() == 0) { if(fork() == 0) { if(dpy) close(ConnectionNumber(dpy)); setsid(); execl(shell, shell, "-c", arg->cmd, (char *)NULL); fprintf(stderr, "dwm: execl '%s -c %s'", shell, arg->cmd); perror(" failed"); } exit(0); } wait(0); }