From 051b1e60c1e80994388521ae37d7035babbd12b6 Mon Sep 17 00:00:00 2001 From: cel Date: Mon, 10 Jul 2017 13:28:28 -1000 Subject: Init --- Makefile | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Makefile (limited to 'Makefile') 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 -- cgit v1.2.3