diff options
author | Wynn Wolf Arbor | 2020-03-18 19:45:11 +0100 |
---|---|---|
committer | Wolfgang Müller | 2021-04-27 12:28:22 +0200 |
commit | 6549be4f9c5b6f3250cd35b8375a59572db3cbe9 (patch) | |
tree | fff2bc9cb45b07a2fb730fcebc8ce9951d17b229 | |
parent | 8edd46cb082440cf67e1389a2bf39c35ec92faf1 (diff) | |
download | cwm-6549be4f9c5b6f3250cd35b8375a59572db3cbe9.tar.gz |
Convert 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} |