You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
906 B

NAME=zet
BIN=zet.dpi
DILLO_DIR=~/.dillo
DPI_DIR=$(DILLO_DIR)/dpi
SUNDOWN_SRC=$(wildcard sundown/*.c)
OBJ=dpi.o zet.dpi.o io.o $(SUNDOWN_SRC:c=o)
CFLAGS=-Wall -Wextra -pedantic
all-reload: all
-pkill $(BIN)
all: $(BIN)
$(BIN): $(OBJ)
install: $(BIN) domainrc dillorc
mkdir -p $(DPI_DIR)/$(NAME)
cp -f $(BIN) $(DPI_DIR)/$(NAME)
link: $(BIN) domainrc dillorc
mkdir -p $(DPI_DIR)/$(NAME)
ln -frs $(BIN) $(DPI_DIR)/$(NAME)
dillorc: $(DILLO_DIR)/dillorc
@grep -q '^http_referer=\(host\|path\)$$' $< || \
echo 'Note: Set "http_referer=path" in $< to allow form submissions to work'
domainrc: $(DILLO_DIR)/domainrc
@grep -q '^default accept$$' $< || \
echo 'Note: Set "default accept" in $< to enable redirects'
$(DILLO_DIR)/dillorc:
echo 'http_referer=path' > $@
$(DILLO_DIR)/domainrc:
echo 'default accept' > $@
clean:
rm $(BIN) $(OBJ)
uninstall: $(BIN)
rm -f $(DPI_DIR)/$(NAME)/$(BIN)