2020-12-05 11:00:50 +01:00
|
|
|
.POSIX:
|
2020-11-30 21:59:08 +01:00
|
|
|
|
2021-07-19 08:28:56 +02:00
|
|
|
VERSION = 1.0
|
2020-12-05 11:00:50 +01:00
|
|
|
PREFIX ?= /usr/local
|
|
|
|
PKG_CONFIG = pkg-config
|
|
|
|
|
|
|
|
CFLAGS = -Wall `$(PKG_CONFIG) --cflags x11`
|
|
|
|
LDFLAGS = `$(PKG_CONFIG) --libs x11`
|
|
|
|
|
|
|
|
all: xpick
|
2020-11-30 21:59:08 +01:00
|
|
|
|
2020-12-03 20:45:30 +01:00
|
|
|
xpick:
|
2020-12-05 11:00:50 +01:00
|
|
|
$(CC) $(CFLAGS) -o ${@} xpick.c $(LDFLAGS)
|
2020-11-30 21:59:08 +01:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f xpick
|
|
|
|
|
|
|
|
install: xpick
|
2021-07-19 08:57:50 +02:00
|
|
|
install -m755 xpick $(PREFIX)/bin/xpick
|
|
|
|
install -m644 xpick.1 $(PREFIX)/man/man1/xpick.1
|
2020-12-05 11:00:50 +01:00
|
|
|
|
|
|
|
uninstall:
|
2021-07-19 08:57:50 +02:00
|
|
|
rm -f $(PREFIX)/bin/xpick
|
|
|
|
rm -f $(PREFIX)/man/man1/xpick.1
|
2020-12-05 11:00:50 +01:00
|
|
|
|
2021-07-19 08:28:56 +02:00
|
|
|
release:
|
|
|
|
rm -rf xpick-$(VERSION)*
|
|
|
|
mkdir xpick-$(VERSION)
|
|
|
|
cp Makefile xpick.c xpick.1 README xpick-$(VERSION)/
|
|
|
|
tar czf xpick-$(VERSION).tar.gz xpick-$(VERSION)
|
|
|
|
rm -rf xpick-$(VERSION)
|
|
|
|
|
|
|
|
|
2020-12-05 11:00:50 +01:00
|
|
|
.PHONY: all clean install uninstall
|