diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 40 |
1 files changed, 23 insertions, 17 deletions
@@ -1,24 +1,30 @@ -# $OpenBSD: Makefile,v 1.25 2017/07/14 17:23:38 okan Exp $ +PROG = cwm +OBJS = calmwm.o client.o conf.o group.o kbfunc.o menu.o parse.o \ + reallocarray.o screen.o search.o strlcat.o strlcpy.o strtonum.o \ + util.o xevents.o xmalloc.o xutil.o +LIBS = x11 xft xrandr -.include <bsd.xconf.mk> +PREFIX ?= /usr/local +BINDIR ?= ${PREFIX}/bin +MANDIR ?= ${PREFIX}/share/man -PROG= cwm +CFLAGS ?= -O2 +CFLAGS += -MMD -Wall -Wextra -Wno-unused-parameter +CPPFLAGS += -D_GNU_SOURCE $(shell pkg-config --cflags ${LIBS}) +LDLIBS += $(shell pkg-config --libs ${LIBS}) -SRCS= calmwm.c screen.c xmalloc.c client.c menu.c \ - search.c util.c xutil.c conf.c xevents.c group.c \ - kbfunc.c parse.y +${PROG}: ${OBJS} + ${CC} -o $@ ${CFLAGS} ${OBJS} ${LDLIBS} -CPPFLAGS+= -I${X11BASE}/include -I${X11BASE}/include/freetype2 -I${.CURDIR} +install: + install -D -m 0755 -t '${DESTDIR}${BINDIR}' ${PROG} + install -D -m 0644 -t '${DESTDIR}${MANDIR}/man1' ${PROG}.1 + install -D -m 0644 -t '${DESTDIR}${MANDIR}/man5' ${PROG}rc.5 -CFLAGS+= -Wall -YFLAGS= -LDADD+= -L${X11BASE}/lib -lXft -lXrender -lX11 -lxcb -lXau -lXdmcp \ - -lfontconfig -lexpat -lfreetype -lz -lXrandr -lXext +clean: + rm -f ${OBJS} ${OBJS:.o=.d} ${PROG} -MANDIR= ${X11BASE}/man/man -MAN= cwm.1 cwmrc.5 +.INTERMEDIATE: parse.c +.PHONY: clean install -obj: _xenocara_obj - -.include <bsd.prog.mk> -.include <bsd.xorg.mk> +-include ${OBJS:.o=.d} |