aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-07-10 13:28:28 -1000
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-07-10 13:29:40 -1000
commit051b1e60c1e80994388521ae37d7035babbd12b6 (patch)
treeb2e7b3dc1a68e51b15c72b92947dc39b5c6ded9d /Makefile
Init
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile33
1 files changed, 33 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..b83474a
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,33 @@
+NAME = gopher
+BIN = gopher.filter.dpi
+OBJ = gopher.filter.dpi.o io.o dpi.o
+DILLO_DIR = ~/.dillo
+DPI_DIR = $(DILLO_DIR)/dpi
+DPIDRC = $(DILLO_DIR)/dpidrc
+
+all: $(BIN)
+
+$(BIN): $(OBJ)
+
+$(DPIDRC):
+ cp /etc/dillo/dpidrc $@
+
+install-proto: $(DPIDRC)
+ echo 'proto.gopher=gopher/gopher.filter.dpi' >> $<
+
+install: $(BIN) install-proto
+ mkdir -p $(DPI_DIR)/$(NAME)
+ cp -f $(BIN) $(DPI_DIR)/$(NAME)
+
+link: $(BIN) install-proto
+ mkdir -p $(DPI_DIR)/$(NAME)
+ ln -frs $(BIN) $(DPI_DIR)/$(NAME)
+
+uninstall: $(BIN)
+ rm -f $(DPI_DIR)/$(NAME)/$(BIN)
+
+clean:
+ rm $(BIN) $(OBJ)
+
+.PHONY:
+ all install uninstall clean