aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
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)