24 lines
422 B
Makefile
24 lines
422 B
Makefile
CFLAGS = -fPIC -Wall -Wextra -O
|
|
LDFLAGS = -shared
|
|
PREFIX ?= /usr
|
|
|
|
.PHONY: all
|
|
all: libbuse.so
|
|
|
|
libbuse.so: buse.o
|
|
$(CC) ${LDFLAGS} -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) buse.o libbuse.so
|