Codebase list cbonsai / fresh-releases/main Makefile
fresh-releases/main

Tree @fresh-releases/main (Download .tar.gz)

Makefile @fresh-releases/mainraw · history · blame

.POSIX:
CC	= cc
PKG_CONFIG	?= pkg-config
CFLAGS	+= -Wall -Wextra -Wshadow -Wpointer-arith -Wcast-qual -pedantic $(shell $(PKG_CONFIG) --cflags ncursesw panelw)
LDLIBS	= $(shell $(PKG_CONFIG) --libs ncursesw panelw || echo "-lncursesw -ltinfo -lpanelw")
PREFIX	= /usr/local
MANDIR	= $(PREFIX)/share/man

cbonsai: cbonsai.c

cbonsai.1: cbonsai.scd
	scdoc <$< >$@

install: cbonsai cbonsai.1
	mkdir -p $(DESTDIR)$(PREFIX)/bin
	mkdir -p $(DESTDIR)$(MANDIR)/man1
	install -m 0755 cbonsai $(DESTDIR)$(PREFIX)/bin/cbonsai
	install -m 0644 cbonsai.1 $(DESTDIR)$(MANDIR)/man1/cbonsai.1

uninstall:
	rm -f $(DESTDIR)$(PREFIX)/bin/cbonsai
	rm -f $(DESTDIR)$(MANDIR)/man1/cbonsai.1

clean:
	rm -f cbonsai
	rm -f cbonsai.1

.PHONY: install uninstall clean