aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2023-07-02 20:30:24 +0200
committerMattias Andrée <maandree@kth.se>2023-07-02 20:30:24 +0200
commit45223b992bcfdbb5f0b475b42d0de0cb54c29199 (patch)
tree34ca4d070600e51710200590670ccd1f437cdaa8
parentm (diff)
downloadxcman-45223b992bcfdbb5f0b475b42d0de0cb54c29199.tar.gz
xcman-45223b992bcfdbb5f0b475b42d0de0cb54c29199.tar.bz2
xcman-45223b992bcfdbb5f0b475b42d0de0cb54c29199.tar.xz
Improve makefile1.1.1
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--Makefile12
-rw-r--r--config.mk6
2 files changed, 15 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index afde4e8..e0dcf97 100644
--- a/Makefile
+++ b/Makefile
@@ -3,7 +3,17 @@
CONFIGFILE = config.mk
include $(CONFIGFILE)
+OBJ = xcman.o
+HDR =
+
all: xcman
+$(OBJ): $(HDR)
+
+xcman: $(OBJ)
+ $(CC) -o $@ $(OBJ) $(LDFLAGS)
+
+.c.o:
+ $(CC) -c -o $@ $< $(CFLAGS) $(CPPFLAGS)
install: xcman
mkdir -p -- "$(DESTDIR)$(PREFIX)/bin"
@@ -22,6 +32,6 @@ clean:
-rm -f -- xcman
.SUFFIXES:
-.SUFFIXES: .c
+.SUFFIXES: .c .o
.PHONY: all install uninstall clean
diff --git a/config.mk b/config.mk
index 30a58ea..25b5a3a 100644
--- a/config.mk
+++ b/config.mk
@@ -1,6 +1,8 @@
-PREFIX = /usr/local
+PREFIX = /usr
MANPREFIX = $(PREFIX)/share/man
+CC = c99
+
CPPFLAGS =
-CFLAGS = -std=c99 -Wall -Wextra $(CPPFLAGS)
+CFLAGS = -Wall -Wextra
LDFLAGS = -lXdamage -lXfixes -lXcomposite -lXrender -lX11