2019-04-23 03:37:15 +02:00
|
|
|
VERSION=1.1.0
|
2019-01-25 03:06:23 +01:00
|
|
|
|
2019-04-11 05:06:18 +02:00
|
|
|
CFLAGS+= -g -O2 -Wall -Wextra -D_FILE_OFFSET_BITS=64 -DVERSION=\"$(VERSION)\" `pkg-config --cflags-only-I gumbo libcurl fuse`
|
|
|
|
LDFLAGS+= -lgumbo -lcurl -lfuse -lcrypto `pkg-config --libs-only-L gumbo libcurl fuse`
|
2019-04-21 00:46:08 +02:00
|
|
|
COBJS = main.o network.o fuse_local.o link.o cache.o util.o
|
2018-07-18 17:26:26 +02:00
|
|
|
|
2019-01-25 03:14:14 +01:00
|
|
|
prefix ?= /usr/local
|
2019-01-23 04:30:05 +01:00
|
|
|
|
2019-01-25 03:19:22 +01:00
|
|
|
all: httpdirfs
|
|
|
|
|
2019-01-25 03:36:15 +01:00
|
|
|
%.o: src/%.c
|
2019-01-25 03:17:19 +01:00
|
|
|
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -c -o $@ $<
|
2018-07-18 17:26:26 +02:00
|
|
|
|
2019-01-25 03:19:58 +01:00
|
|
|
httpdirfs: $(COBJS)
|
2019-01-25 03:17:19 +01:00
|
|
|
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $^
|
2018-07-18 17:26:26 +02:00
|
|
|
|
2018-07-24 15:33:03 +02:00
|
|
|
install:
|
2019-01-25 03:16:23 +01:00
|
|
|
install -m 755 -D httpdirfs \
|
|
|
|
$(DESTDIR)$(prefix)/bin/httpdirfs
|
2019-01-25 03:40:25 +01:00
|
|
|
install -m 644 -D doc/man/httpdirfs.1 \
|
2019-01-25 03:16:23 +01:00
|
|
|
$(DESTDIR)$(prefix)/share/man/man1/httpdirfs.1
|
2018-07-24 15:33:03 +02:00
|
|
|
|
2018-07-24 19:05:22 +02:00
|
|
|
doc:
|
|
|
|
doxygen Doxyfile
|
|
|
|
|
2018-07-18 17:26:26 +02:00
|
|
|
clean:
|
2019-01-25 03:40:25 +01:00
|
|
|
-rm -f *.o
|
|
|
|
-rm -f httpdirfs
|
|
|
|
-rm -rf doc/html
|
2019-01-25 03:19:22 +01:00
|
|
|
|
|
|
|
distclean: clean
|
|
|
|
|
2019-01-25 03:21:18 +01:00
|
|
|
uninstall:
|
|
|
|
-rm -f $(DESTDIR)$(prefix)/bin/httpdirfs
|
|
|
|
-rm -f $(DESTDIR)$(prefix)/share/man/man1/httpdirfs.1
|
|
|
|
|
2019-01-25 03:40:25 +01:00
|
|
|
.PHONY: all doc install clean distclean uninstall
|