This repository has been archived on 2024-02-29. You can view files and clone it, but cannot push or open issues or pull requests.
someblocks/Makefile
2024-01-29 19:24:56 +01:00

25 lines
831 B
Makefile

PREFIX ?= /usr/local
MANPREFIX ?= $(PREFIX)/share/man
CC ?= cc
DEVCFLAGS = -pedantic -Wall -Wextra -Wdeclaration-after-statement -Wno-unused-parameter -Wshadow -Wunused-macros\
-Werror=strict-prototypes -Werror=implicit -Werror=return-type -Werror=incompatible-pointer-types -Wfloat-conversion\
-Ofast -flto
output: someblocks.c blocks.def.h blocks.h
${CC} someblocks.c $(LDFLAGS) $(DEVCFLAGS) -o someblocks
strip someblocks
blocks.h:
cp blocks.def.h $@
clean:
rm -f *.o *.gch someblocks blocks.h
install: output
mkdir -p $(DESTDIR)$(PREFIX)/bin
install -m 0755 someblocks $(DESTDIR)$(PREFIX)/bin/someblocks
mkdir -p $(DESTDIR)$(MANPREFIX)/man1
install -m 0644 someblocks.1 $(DESTDIR)$(MANPREFIX)/man1/someblocks.1
uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/someblocks
rm -f $(DESTDIR)$(MANPREFIX)/man1/someblocks.1