Update Makefile

This commit is contained in:
sh+github@codevoid.de 2020-12-05 10:00:50 +00:00
parent 6d3e4a8a4c
commit 9cc4dfd46e

View File

@ -1,14 +1,23 @@
CFLAGS=-g -Wall
INCS=-I/usr/X11R6/include
LIBS=-L/usr/X11R6/lib -lX11
.POSIX:
all: clean xpick
PREFIX ?= /usr/local
PKG_CONFIG = pkg-config
CFLAGS = -Wall `$(PKG_CONFIG) --cflags x11`
LDFLAGS = `$(PKG_CONFIG) --libs x11`
all: xpick
xpick:
$(CC) $(CFLAGS) $(INCS) $(LIBS) -o ${@} xpick.c
$(CC) $(CFLAGS) -o ${@} xpick.c $(LDFLAGS)
clean:
rm -f xpick
install: xpick
install -m755 xpick /usr/local/bin/xpick
install -m755 xpick $(DESTDIR)$(PREFIX)/bin/xpick
uninstall:
rm -f $(DESTDIR)$(PREFIX)/bin/xpick
.PHONY: all clean install uninstall