From 94fdf25843e6eb23c2265efd5c8280fa39f4bfde Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Thu, 8 Jul 2021 15:51:38 +0200 Subject: Latest update --- Makefile | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index ef43ef4..5cfbb5a 100644 --- a/Makefile +++ b/Makefile @@ -1,17 +1,19 @@ -PREFIX ?= /usr/local -CC ?= cc -LDFLAGS = -lX11 - -output: dwmblocks.c blocks.def.h blocks.h - ${CC} dwmblocks.c $(LDFLAGS) -o dwmblocks -blocks.h: - cp blocks.def.h $@ +.POSIX: +PREFIX = /usr/local +CC = gcc +dwmblocks: dwmblocks.o + $(CC) dwmblocks.o -lX11 -o dwmblocks +dwmblocks.o: dwmblocks.c config.h + $(CC) -c dwmblocks.c clean: rm -f *.o *.gch dwmblocks -install: output +install: dwmblocks mkdir -p $(DESTDIR)$(PREFIX)/bin - install -m 0755 dwmblocks $(DESTDIR)$(PREFIX)/bin/dwmblocks + cp -f dwmblocks $(DESTDIR)$(PREFIX)/bin + chmod 755 $(DESTDIR)$(PREFIX)/bin/dwmblocks uninstall: rm -f $(DESTDIR)$(PREFIX)/bin/dwmblocks + +.PHONY: clean install uninstall -- cgit v1.2.3-70-g09d2