aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile25
1 files changed, 25 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..9aa9a59
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,25 @@
+include config.mk
+
+MAIN=dwmclock
+SRC=dwmclock.c
+OBJ=$(SRC:.c=.o)
+
+all: $(SRC) $(MAIN)
+
+$(MAIN): $(OBJ)
+ $(CC) $(LDFLAGS) -o $@ $(OBJ)
+
+.c.o:
+ $(CC) -c $(CFLAGS) $< -o $@
+
+clean:
+ -rm -f $(MAIN) $(OBJ)
+
+install: $(MAIN)
+ mkdir -p $(DESTDIR)$(PREFIX)/bin
+ cp $(MAIN) $(DESTDIR)$(PREFIX)/bin/$(MAIN)
+
+uninstall:
+ rm -f $(DESTDIR)$(PREFIX)/bin/$(MAIN)
+
+.PHONY: all clean install uninstall