Skip to content

Commit

Permalink
add make install step (#18)
Browse files Browse the repository at this point in the history
Fixes #10
  • Loading branch information
jirutka authored Oct 31, 2022
1 parent c54b3fd commit 4b85d78
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
default: libwhich

prefix := /usr
bindir := $(prefix)/bin

INSTALL := install

TARGET = $(shell uname)
override CFLAGS := -Wall -pedantic -O2 $(CFLAGS)
override LDFLAGS := $(LDFLAGS)
Expand Down Expand Up @@ -36,4 +41,8 @@ clean:
check: libwhich
./test-libwhich.sh

.PHONY: clean check default
install: libwhich
mkdir -p $(DESTDIR)$(bindir)
$(INSTALL) -m755 libwhich $(DESTDIR)$(bindir)/libwhich

.PHONY: clean check default install

0 comments on commit 4b85d78

Please sign in to comment.