mirror of
https://github.com/mintycube/dwmblocks.git
synced 2024-10-22 14:05:47 +02:00
Improve Makefile
This commit is contained in:
parent
f1c037037d
commit
098184d0c3
24
Makefile
24
Makefile
@ -1,19 +1,21 @@
|
|||||||
.POSIX:
|
.POSIX:
|
||||||
|
|
||||||
PREFIX = /usr/local
|
PREFIX = /usr/local
|
||||||
CC = gcc
|
CFLAGS = -Ofast
|
||||||
|
LDLIBS = -lX11
|
||||||
|
|
||||||
|
BIN = dwmblocks
|
||||||
|
|
||||||
|
$(BIN): main.o
|
||||||
|
$(CC) $^ -o $@ $(LDLIBS)
|
||||||
|
|
||||||
dwmblocks: main.o
|
|
||||||
$(CC) main.o -lX11 -Ofast -o dwmblocks
|
|
||||||
main.o: main.c config.h
|
|
||||||
$(CC) -Ofast -c main.c
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o *.gch dwmblocks
|
$(RM) *.o $(BIN)
|
||||||
install: dwmblocks
|
|
||||||
mkdir -p $(DESTDIR)$(PREFIX)/bin
|
install: $(BIN)
|
||||||
cp -f dwmblocks $(DESTDIR)$(PREFIX)/bin
|
install -D -m 755 $(BIN) $(DESTDIR)$(PREFIX)/bin/$(BIN)
|
||||||
chmod 755 $(DESTDIR)$(PREFIX)/bin/dwmblocks
|
|
||||||
uninstall:
|
uninstall:
|
||||||
rm -f $(DESTDIR)$(PREFIX)/bin/dwmblocks
|
$(RM) $(DESTDIR)$(PREFIX)/bin/$(BIN)
|
||||||
|
|
||||||
.PHONY: clean install uninstall
|
.PHONY: clean install uninstall
|
||||||
|
Loading…
Reference in New Issue
Block a user