Add install rule to Makefile
This commit is contained in:
parent
3cdd941748
commit
455b6dec2f
15
Makefile
15
Makefile
|
@ -1,9 +1,8 @@
|
|||
CC = clang
|
||||
CFLAGS = -fPIC -Wall -Wextra -O
|
||||
LDFLAGS = -shared
|
||||
PREFIX ?= /usr
|
||||
|
||||
.PHONY: all clean
|
||||
|
||||
.PHONY: all
|
||||
all: libbuse.so
|
||||
|
||||
libbuse.so: buse.o
|
||||
|
@ -12,5 +11,13 @@ libbuse.so: buse.o
|
|||
buse.o: buse.c
|
||||
$(CC) $(CFLAGS) -c -o $@ $^
|
||||
|
||||
.PHONY: install
|
||||
install: libbuse.so
|
||||
mkdir -p $(DESTDIR)$(PREFIX)/lib
|
||||
mkdir -p $(DESTDIR)$(PREFIX)/include
|
||||
cp libbuse.so $(DESTDIR)$(PREFIX)/lib/
|
||||
cp buse.h $(DESTDIR)$(PREFIX)/include/
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -f buse.o libbuse.so
|
||||
$(RM) buse.o libbuse.so
|
||||
|
|
Loading…
Reference in New Issue