aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorclsr <clsr@clsr.net>2016-12-02 12:23:24 +0100
committerclsr <clsr@clsr.net>2016-12-02 12:23:24 +0100
commite7a5b19c0ba06e12b0137a7ce5e65a15135d9977 (patch)
treed0504639219accb576ed1dbac15352948884428c /Makefile
downloaddwmclock-e7a5b19c0ba06e12b0137a7ce5e65a15135d9977.tar.gz
dwmclock-e7a5b19c0ba06e12b0137a7ce5e65a15135d9977.zip
Initial commitv1.0.0
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