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:
|
||||
|
||||
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:
|
||||
rm -f *.o *.gch dwmblocks
|
||||
install: dwmblocks
|
||||
mkdir -p $(DESTDIR)$(PREFIX)/bin
|
||||
cp -f dwmblocks $(DESTDIR)$(PREFIX)/bin
|
||||
chmod 755 $(DESTDIR)$(PREFIX)/bin/dwmblocks
|
||||
$(RM) *.o $(BIN)
|
||||
|
||||
install: $(BIN)
|
||||
install -D -m 755 $(BIN) $(DESTDIR)$(PREFIX)/bin/$(BIN)
|
||||
|
||||
uninstall:
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/dwmblocks
|
||||
$(RM) $(DESTDIR)$(PREFIX)/bin/$(BIN)
|
||||
|
||||
.PHONY: clean install uninstall
|
||||
|
Loading…
Reference in New Issue
Block a user