wm/Makefile

69 lines
2.0 KiB
Makefile
Raw Permalink Normal View History

2022-12-26 05:06:40 +00:00
WINDOWSIZE=1280x720
2022-12-26 02:18:39 +00:00
2022-12-26 02:27:23 +00:00
VERCMD ?= git describe --tags 2> /dev/null
VERSION := $(shell $(VERCMD) || cat VERSION)
PREFIX ?= /usr/local
BINPREFIX ?= $(PREFIX)/bin
MANPREFIX ?= $(PREFIX)/share/man
2023-06-15 16:10:22 +00:00
DOCPREFIX ?= $(PREFIX)/share/doc/tspwm
2022-12-26 02:27:23 +00:00
BASHCPL ?= $(PREFIX)/share/bash-completion/completions
FISHCPL ?= $(PREFIX)/share/fish/vendor_completions.d
ZSHCPL ?= $(PREFIX)/share/zsh/site-functions
MD_DOCS = README.md doc/CHANGELOG.md doc/CONTRIBUTING.md doc/INSTALL.md doc/MISC.md doc/TODO.md
XSESSIONS ?= $(PREFIX)/share/xsessions
2023-06-15 16:10:22 +00:00
all: tspwm tspc
2022-12-26 02:27:23 +00:00
VPATH=src
2023-06-15 16:10:22 +00:00
tspwm: cmd/bspwm src/**/*
2023-06-15 15:57:08 +00:00
go build -o tspwm ./cmd/bspwm
2022-12-26 02:27:23 +00:00
2023-06-15 16:10:22 +00:00
tspc: cmd/bspc src/**/*
2023-06-15 15:57:08 +00:00
go build -o tspc ./cmd/bspc
2022-12-26 02:27:23 +00:00
2022-12-26 02:18:39 +00:00
xephyr:
2022-12-26 05:06:40 +00:00
Xephyr :11 -br -ac -noreset -screen ${WINDOWSIZE}
2022-12-26 02:27:23 +00:00
install:
mkdir -p "$(DESTDIR)$(BINPREFIX)"
2023-06-15 16:10:22 +00:00
cp -pf tspwm "$(DESTDIR)$(BINPREFIX)"
2023-06-15 16:00:16 +00:00
cp -pf tspc "$(DESTDIR)$(BINPREFIX)"
2022-12-26 02:27:23 +00:00
mkdir -p "$(DESTDIR)$(MANPREFIX)"/man1
2023-06-15 16:10:22 +00:00
cp -p doc/tspwm.1 "$(DESTDIR)$(MANPREFIX)"/man1
2023-06-15 16:00:16 +00:00
cp -Pp doc/tspc.1 "$(DESTDIR)$(MANPREFIX)"/man1
2022-12-26 02:27:23 +00:00
mkdir -p "$(DESTDIR)$(BASHCPL)"
2023-06-15 16:00:16 +00:00
cp -p contrib/bash_completion "$(DESTDIR)$(BASHCPL)"/tspc
2022-12-26 02:27:23 +00:00
mkdir -p "$(DESTDIR)$(FISHCPL)"
2023-06-15 16:00:16 +00:00
cp -p contrib/fish_completion "$(DESTDIR)$(FISHCPL)"/tspc.fish
2022-12-26 02:27:23 +00:00
mkdir -p "$(DESTDIR)$(ZSHCPL)"
2023-06-15 16:00:16 +00:00
cp -p contrib/zsh_completion "$(DESTDIR)$(ZSHCPL)"/_tspc
2023-06-15 16:10:22 +00:00
#mkdir -p "$(DESTDIR)$(DOCPREFIX)"
#cp -p $(MD_DOCS) "$(DESTDIR)$(DOCPREFIX)"
#mkdir -p "$(DESTDIR)$(DOCPREFIX)"/examples
#cp -pr examples/* "$(DESTDIR)$(DOCPREFIX)"/examples
#mkdir -p "$(DESTDIR)$(XSESSIONS)"
# cp -p contrib/freedesktop/tspwm.desktop "$(DESTDIR)$(XSESSIONS)"
2022-12-26 02:27:23 +00:00
uninstall:
2023-06-15 16:00:16 +00:00
rm -f "$(DESTDIR)$(BINPREFIX)"/tspwm
rm -f "$(DESTDIR)$(BINPREFIX)"/tspc
rm -f "$(DESTDIR)$(MANPREFIX)"/man1/tspwm.1
rm -f "$(DESTDIR)$(MANPREFIX)"/man1/tspc.1
rm -f "$(DESTDIR)$(BASHCPL)"/tspc
rm -f "$(DESTDIR)$(FISHCPL)"/tspc.fish
rm -f "$(DESTDIR)$(ZSHCPL)"/_tspc
2022-12-26 02:27:23 +00:00
rm -rf "$(DESTDIR)$(DOCPREFIX)"
2023-06-15 16:00:16 +00:00
rm -f "$(DESTDIR)$(XSESSIONS)"/tspwm.desktop
2022-12-26 02:27:23 +00:00
doc:
2023-06-15 16:00:16 +00:00
a2x -v -d manpage -f manpage -a revnumber=$(VERSION) doc/tspwm.1.asciidoc
2022-12-26 02:27:23 +00:00
clean:
2023-06-15 16:00:16 +00:00
rm -f $(WM_OBJ) $(CLI_OBJ) tspwm tspc
2022-12-26 02:27:23 +00:00
.PHONY: all install uninstall doc clean