From 6549be4f9c5b6f3250cd35b8375a59572db3cbe9 Mon Sep 17 00:00:00 2001 From: Wynn Wolf Arbor Date: Wed, 18 Mar 2020 19:45:11 +0100 Subject: Convert Makefile --- Makefile | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/Makefile b/Makefile index 3a47404..30ee071 100644 --- a/Makefile +++ b/Makefile @@ -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 +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 -.include +-include ${OBJS:.o=.d} -- cgit v1.2.3-2-gb3c3