Skip to content

Commit

Permalink
Allow override of the prefix variable
Browse files Browse the repository at this point in the history
  • Loading branch information
foursixnine committed Feb 12, 2019
1 parent 4bba916 commit 37cc002
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# for debug add -g -O0 to line below
CFLAGS+=-pthread -O2 -Wall -Wextra -Wpedantic -Wstrict-overflow -fno-strict-aliasing -std=gnu11 -g -O0
prefix=/usr/local/bin
PREFIX?=/usr/local/bin

all:
${CC} main.c fiche.c $(CFLAGS) -o fiche

install: fiche
install -m 0755 fiche $(prefix)
install -d $(PREFIX)
install -m 0755 fiche $(PREFIX)

clean:
rm -f fiche
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ To use fiche you have to have netcat installed. You probably already have it - t
sudo make install
```

Note: Adding `PREFIX=/path/to/directory` can override the default /usr/local/bin installation prefix, adittionally `DESTDIR` can also be set, and will be prepended
### Using Ports on FreeBSD

To install the port: `cd /usr/ports/net/fiche/ && make install clean`. To add the package: `pkg install fiche`.
Expand Down

0 comments on commit 37cc002

Please sign in to comment.