tAdd support for building with mk - glazier - window management experiments
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Submodules
(DIR) README
(DIR) LICENSE
---
(DIR) commit 35519bdb1e4fe8053913ae5f3cad90f58d7ab9d4
(DIR) parent 0e865c0b44adf838d66f41fb081a5b9a72406c82
(HTM) Author: Willy Goiffon <dev@z3bra.org>
Date: Sun, 7 Jun 2020 11:51:58 +0200
Add support for building with mk
Diffstat:
M config.mk | 4 ++--
A mkfile | 31 +++++++++++++++++++++++++++++++
2 files changed, 33 insertions(+), 2 deletions(-)
---
(DIR) diff --git a/config.mk b/config.mk
t@@ -1,12 +1,12 @@
VERSION = 0.0
CC = cc
-LD = $(CC)
+LD = ${CC}
PREFIX = /usr/local
MANDIR = ${PREFIX}/man
CPPFLAGS = -I./libwm -DVERSION=\"${VERSION}\"
-CFLAGS = $(CPPFLAGS) -Wall -Wextra -pedantic -g
+CFLAGS = -Wall -Wextra -pedantic -g
LDFLAGS = -L./libwm
LDLIBS = -lxcb -lxcb-cursor -lwm
(DIR) diff --git a/mkfile b/mkfile
t@@ -0,0 +1,31 @@
+<config.mk
+
+all:V: glazier ewmh
+
+glazier: glazier.o libwm/libwm.a
+ ${LD} ${LDFLAGS} $prereq ${LDLIBS} -o $target
+
+ewmh: ewmh.o libwm/libwm.a
+ ${LD} ${LDFLAGS} $prereq ${LDLIBS} -o $target
+
+glazier.o: glazier.c config.h
+
+%.o: %.c
+ ${CC} ${CPPFLAGS} ${CFLAGS} -c $stem.c -o $stem.o
+
+config.h: config.def.h
+ cp config.def.h config.h
+
+clean:V:
+ rm -f glazier ewmh *.o
+
+install:V: glazier ewmh
+ mkdir -p ${DESTDIR}${PREFIX}/bin
+ cp glazier ${DESTDIR}${PREFIX}/bin/glazier
+ cp ewmh ${DESTDIR}${PREFIX}/bin/ewmh
+ chmod 755 ${DESTDIR}${PREFIX}/bin/glazier
+ chmod 755 ${DESTDIR}${PREFIX}/bin/ewmh
+
+uninstall:V:
+ rm ${DESTDIR}${PREFIX}/bin/glazier
+ rm ${DESTDIR}${PREFIX}/bin/ewmh