forked from torrinfail/dwmblocks
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modified according to [dwm](http://git.suckless.org/dwm/file/Makefile.html) 's Makefile file.
- Loading branch information
Showing
1 changed file
with
24 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,31 @@ | ||
PREFIX ?= /usr/local | ||
CC ?= cc | ||
PREFIX ?= /usr/local | ||
CC ?= cc | ||
CFLAGS = -pedantic -Wall -Wno-deprecated-declarations -Os | ||
LDFLAGS = -lX11 | ||
|
||
output: dwmblocks.c blocks.def.h blocks.h | ||
${CC} dwmblocks.c $(LDFLAGS) -o dwmblocks | ||
all: options dwmblocks | ||
|
||
options: | ||
@echo dwmblocks build options: | ||
@echo "CFLAGS = ${CFLAGS}" | ||
@echo "LDFLAGS = ${LDFLAGS}" | ||
@echo "CC = ${CC}" | ||
|
||
dwmblocks: dwmblocks.c blocks.def.h blocks.h | ||
${CC} -o dwmblocks dwmblocks.c ${CFLAGS} ${LDFLAGS} | ||
|
||
blocks.h: | ||
cp blocks.def.h $@ | ||
|
||
|
||
clean: | ||
rm -f *.o *.gch dwmblocks | ||
install: output | ||
mkdir -p $(DESTDIR)$(PREFIX)/bin | ||
install -m 0755 dwmblocks $(DESTDIR)$(PREFIX)/bin/dwmblocks | ||
${RM} *.o *.gch dwmblocks | ||
|
||
install: dwmblocks | ||
mkdir -p ${DESTDIR}${PREFIX}/bin | ||
cp -f dwmblocks ${DESTDIR}${PREFIX}/bin | ||
chmod 755 ${DESTDIR}${PREFIX}/bin/dwmblocks | ||
|
||
uninstall: | ||
rm -f $(DESTDIR)$(PREFIX)/bin/dwmblocks | ||
${RM} ${DESTDIR}${PREFIX}/bin/dwmblocks | ||
|
||
.PHONY: all options clean install uninstall |