Added install target to Makefile.

This commit is contained in:
Nicolás Ortega Froysa 2019-04-17 17:16:16 +02:00
parent dbaf9f0223
commit 1190c30604

View File

@ -16,6 +16,7 @@
CC=gcc CC=gcc
DEBUG=0 DEBUG=0
PREFIX=/usr/local
INCFLAGS=`pkg-config x11 --cflags` INCFLAGS=`pkg-config x11 --cflags`
LDFLAGS=`pkg-config x11 --libs` LDFLAGS=`pkg-config x11 --libs`
CFLAGS=$(INCFLAGS) -std=c99 -Wall -Wextra -Wfatal-errors -Werror CFLAGS=$(INCFLAGS) -std=c99 -Wall -Wextra -Wfatal-errors -Werror
@ -34,7 +35,10 @@ endif
tinyclip: $(OBJS) tinyclip: $(OBJS)
$(CC) -o $@ $^ $(LDFLAGS) $(CC) -o $@ $^ $(LDFLAGS)
.PHONY: clean .PHONY: clean install
clean: clean:
$(RM) $(OBJS) $(RM) $(OBJS)
install: tinyclip
install -m 755 tinyclip $(PREFIX)/bin/