2011-10-05 19:48:33 +04:00
|
|
|
# cwm makefile for BSD make and GNU make
|
|
|
|
# uses pkg-config, DESTDIR and PREFIX
|
2007-04-27 22:01:38 +04:00
|
|
|
|
|
|
|
PROG= cwm
|
|
|
|
|
2011-10-05 19:48:33 +04:00
|
|
|
PREFIX= /usr/local
|
2010-02-21 21:15:27 +03:00
|
|
|
|
2009-01-11 21:34:46 +03:00
|
|
|
SRCS= calmwm.c screen.c xmalloc.c client.c menu.c \
|
2011-03-22 13:47:59 +03:00
|
|
|
search.c util.c xutil.c conf.c xevents.c group.c \
|
2008-06-15 01:48:54 +04:00
|
|
|
kbfunc.c mousefunc.c font.c parse.y
|
2007-04-27 22:01:38 +04:00
|
|
|
|
2010-02-21 21:15:27 +03:00
|
|
|
OBJS= calmwm.o screen.o xmalloc.o client.o menu.o \
|
2011-05-03 21:28:18 +04:00
|
|
|
search.o util.o xutil.o conf.o xevents.o group.o \
|
2010-02-21 21:15:27 +03:00
|
|
|
kbfunc.o mousefunc.o font.o strlcpy.o strlcat.o y.tab.o \
|
|
|
|
strtonum.o fgetln.o
|
|
|
|
|
2011-12-12 19:17:39 +04:00
|
|
|
CPPFLAGS+= `pkg-config --cflags fontconfig x11 xft xinerama xrandr`
|
2009-01-12 00:48:27 +03:00
|
|
|
|
2011-10-05 19:48:33 +04:00
|
|
|
CFLAGS= -Wall -O2 -g
|
2007-04-27 22:01:38 +04:00
|
|
|
|
2011-12-12 19:17:39 +04:00
|
|
|
LDFLAGS+= `pkg-config --libs fontconfig x11 xft xinerama xrandr`
|
2007-04-27 22:01:38 +04:00
|
|
|
|
2011-10-05 19:48:33 +04:00
|
|
|
MANPREFIX= ${PREFIX}/share/man
|
2007-04-27 22:01:38 +04:00
|
|
|
|
2011-10-05 19:48:33 +04:00
|
|
|
all: ${PROG}
|
2010-02-21 21:15:27 +03:00
|
|
|
|
|
|
|
clean:
|
2011-10-05 19:48:33 +04:00
|
|
|
rm -rf ${OBJS} ${PROG} y.tab.c
|
2010-02-21 21:15:27 +03:00
|
|
|
|
|
|
|
y.tab.c: parse.y
|
2010-09-26 03:46:05 +04:00
|
|
|
yacc parse.y
|
2010-02-21 21:15:27 +03:00
|
|
|
|
2011-10-05 19:48:33 +04:00
|
|
|
${PROG}: ${OBJS} y.tab.o
|
|
|
|
${CC} ${OBJS} ${LDFLAGS} -o ${PROG}
|
2010-02-21 21:15:27 +03:00
|
|
|
|
2011-10-05 19:48:33 +04:00
|
|
|
.c.o:
|
|
|
|
${CC} -c ${CFLAGS} ${CPPFLAGS} $<
|
2010-02-21 21:15:27 +03:00
|
|
|
|
|
|
|
install: ${PROG}
|
2011-10-05 19:48:33 +04:00
|
|
|
install -d ${DESTDIR}${PREFIX}/bin ${DESTDIR}${MANPREFIX}/man1 ${DESTDIR}${MANPREFIX}/man5
|
|
|
|
install -m 755 cwm ${DESTDIR}${PREFIX}/bin
|
|
|
|
install -m 644 cwm.1 ${DESTDIR}${MANPREFIX}/man1
|
|
|
|
install -m 644 cwmrc.5 ${DESTDIR}${MANPREFIX}/man5
|