Default install target to use /usr/local prefix

While also allowing to customise PREFIX and DESTDIR
This commit is contained in:
Jerome Charaoui 2019-01-22 22:30:05 -05:00 committed by Fufu Fang
parent 19e825aa72
commit 8ea46f896b
1 changed files with 6 additions and 1 deletions

View File

@ -3,6 +3,10 @@ CFLAGS+= -g -O2 -Wall -Wextra -lgumbo -lcurl -lfuse -lcrypto \
-D_FILE_OFFSET_BITS=64
OBJ = main.o network.o fuse_local.o link.o
PREFIX ?= /usr/local
INSTALL = /usr/bin/install
INSTALL_OPTS = -m 0755
%.o: %.c
$(CC) -c -o $@ $< $(CPPFLAGS) $(CFLAGS) $(LDFLAGS)
@ -10,7 +14,8 @@ httpdirfs: $(OBJ)
$(CC) -o $@ $^ $(CPPFLAGS) $(CFLAGS) $(LDFLAGS)
install:
cp httpdirfs ${HOME}/bin/
mkdir -p $(DESTDIR)$(PREFIX)/bin
$(INSTALL) $(INSTALL_OPTS) httpdirfs $(DESTDIR)$(PREFIX)/bin
doc:
doxygen Doxyfile