aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorclsr <clsr@clsr.net>2019-12-28 21:47:52 +0100
committerclsr <clsr@clsr.net>2019-12-28 21:47:52 +0100
commit50e382e5efe6bdad568a507e7ec675e27e94d428 (patch)
tree34fe5038f3bb07642fa59047fba061e0e1496e2c /Makefile
parent4d794cd69d5308a88a2453f3613260f0db8be8a7 (diff)
downloaddwmclock-50e382e5efe6bdad568a507e7ec675e27e94d428.tar.gz
dwmclock-50e382e5efe6bdad568a507e7ec675e27e94d428.zip
Clean up makefilev1.3.2
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 15 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 753018d..5133980 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,19 @@
-include config.mk
+CC? = cc
+MAIN = dwmclock
+SRC = dwmclock.c
+OBJ = $(SRC:.c=.o)
+CFLAGS := -std=c99 -Wall -Wextra -pedantic -Os $(shell pkg-config --cflags x11) $(CFLAGS)
+LDFLAGS := $(shell pkg-config --libs x11) $(LDFLAGS)
+
+# install in /usr/local/bin
+DESTDIR ?= /
+PREFIX ?= /usr/local
-MAIN=dwmclock
-SRC=dwmclock.c
-OBJ=$(SRC:.c=.o)
+# install in ~/.local/bin
+#DESTDIR ?= ~
+#PREFIX ?= /.local
+
+include config.mk
all: $(SRC) $(MAIN)