Skip to content

Commit

Permalink
Allow make PREFIX=
Browse files Browse the repository at this point in the history
Signed-off-by: Adrien Gallouët <[email protected]>
  • Loading branch information
angt committed Oct 15, 2020
1 parent c9bf554 commit fad4fe5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
CC = cc
CFLAGS = -Wall -O2
prefix = /usr/local
PREFIX = $(prefix)

secret:
$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) secret.c -o secret
$(X)$(CC) $(EXTRA) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) secret.c -o secret

install: secret
mkdir -p $(DESTDIR)$(prefix)/bin
mv -f secret $(DESTDIR)$(prefix)/bin
mkdir -p $(DESTDIR)$(PREFIX)/bin
mv -f secret $(DESTDIR)$(PREFIX)/bin

uninstall:
rm -f $(DESTDIR)$(prefix)/bin/secret
rm -f $(DESTDIR)$(PREFIX)/bin/secret

clean:
rm -f secret
Expand Down

0 comments on commit fad4fe5

Please sign in to comment.