-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (32 loc) · 910 Bytes
/
Makefile
File metadata and controls
41 lines (32 loc) · 910 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
NAME = gopher
BIN = gopher.filter.dpi
OBJ = gopher.filter.dpi.o io.o dpi.o
DILLO_PREFIX ?=
DILLO_DIR = ~/.dillo
DPI_DIR = $(DILLO_DIR)/dpi
DPIDRC = $(DILLO_DIR)/dpidrc
CFLAGS = -std=c99 -D_POSIX_C_SOURCE=200112L
all: $(BIN)
$(BIN): $(OBJ)
$(DPIDRC):
if [ ! -f $(DILLO_PREFIX)/etc/dillo/dpidrc ]; then \
echo "Can't find $(DILLO_PREFIX)/etc/dillo/dpidrc, is dillo installed?"; \
echo "If so, set DILLO_PREFIX to the installation prefix of dillo"; \
false; \
fi
cp $(DILLO_PREFIX)/etc/dillo/dpidrc $@
install-proto: $(DPIDRC)
echo 'proto.gopher=gopher/gopher.filter.dpi' >> $<
dpidc stop || true
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