diff options
author | anntnzrb <anntnzrb@protonmail.com> | 2021-05-28 11:36:37 -0500 |
---|---|---|
committer | anntnzrb <anntnzrb@protonmail.com> | 2021-05-28 12:31:50 -0500 |
commit | 6be2a10558f8df9545a79f89a6a9cb40ea7ca6a7 (patch) | |
tree | 05c63ec2350af121fc6f0d1edc7aec198e82865c | |
parent | 96cbb453e5373c05372fd4bf3faacfa53e409067 (diff) |
Makefile tweaks
Modified according to
[dwm](http://git.suckless.org/dwm/file/Makefile.html) 's
Makefile file.
-rw-r--r-- | Makefile | 34 |
1 files changed, 24 insertions, 10 deletions
@@ -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 |