summary refs log tree commit diff
path: root/Makefile
blob: 85490f11c3c8ebbb66a36167531fa80fcc097ac3 (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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# $OpenBSD$

#.include <bsd.xconf.mk>

PROG=		cwm

BINDIR=		/usr/bin

SRCS=		calmwm.c screen.c xmalloc.c client.c menu.c \
		search.c util.c xutil.c conf.c input.c xevents.c group.c \
		kbfunc.c mousefunc.c font.c parse.y

OBJS=		calmwm.o screen.o xmalloc.o client.o menu.o \
		search.o util.o xutil.o conf.o input.o xevents.o group.o \
		kbfunc.o mousefunc.o font.o strlcpy.o strlcat.o y.tab.o \
		strtonum.o fgetln.o

X11BASE=	/usr

CPPFLAGS+=	-I${X11BASE}/include -I${X11BASE}/include/freetype2 -I.

CFLAGS+=	-Wall

LDADD+=		-L${X11BASE}/lib -lXft -lXrender -lX11 -lXau -lXdmcp \
		-lfontconfig -lexpat -lfreetype -lz -lXinerama -lXrandr -lXext

MANDIR=		${X11BASE}/man/cat
MAN=		cwm.1 cwmrc.5

CLEANFILES=	cwm.cat1 cwmrc.cat5


all: $(PROG)

clean:
	rm -rf $(OBJS) $(PROG) y.tab.c

y.tab.c: parse.y
	yacc parse.y


$(PROG): $(OBJS) y.tab.o
	$(CC) $(OBJS) ${LDADD} -o ${PROG}

$(OBJS): %.o: %.c
	$(CC) -c $(CFLAGS) $(CPPFLAGS) $<

install: ${PROG}
	install -m 755 cwm /usr/local/bin/
	install -m 644 cwm.1 /usr/local/man/man1
	install -m 644 cwmrc.5 /usr/local/man/man5

#.include <bsd.prog.mk>
#.include <bsd.xorg.mk>