summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorVincent Douillet <vincent@vdouillet.fr>2023-11-28 08:38:19 +0100
committerVincent Douillet <vincent@vdouillet.fr>2023-11-29 15:45:28 +0100
commit43f65c76152017420ce723b4d4ef4230ff072818 (patch)
tree5c981b2d6949ebd5a5bdefe112383f6874d9342a /Makefile
parenta8158372e4173f760d893516c0d8aecbb0e737ac (diff)
browse: use khttp_template
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile13
1 files changed, 10 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index eace3fd..d269beb 100644
--- a/Makefile
+++ b/Makefile
@@ -30,15 +30,21 @@ CC=cc
CFLAGS_DEPS != pkg-config --cflags kcgi kcgi-html
LDFLAGS_DEPS != pkg-config --libs kcgi kcgi-html
-CFLAGS=-g -W -Wall -Wextra -DLOG_INFO $(CFLAGS_DEPS)
+CFLAGS=-O2 -DLOG_INFO $(CFLAGS_DEPS)
LDFLAGS=-static $(LDFLAGS_DEPS)
+.if make(debug)
+CFLAGS+=-g -W -Wall -Wextra -DTEMPLATE_DIR='"template"'
+.endif
+
+debug: main
+
all: main
.c.o:
$(CC) -o $@ -c $< $(CFLAGS)
-main: url.o http.o download.o browse.o main.o
+main: util.o url.o http.o download.o browse.o main.o
$(CC) -o $@ $> $(LDFLAGS)
env: env.o
@@ -48,7 +54,8 @@ kcgienv: kcgienv.o
$(CC) -o $@ $> $(LDFLAGS)
install:
- install -o www -g www -m 0500 main /var/www/cgi-bin/vault
+ install -D -o www -g www -m 0500 main /var/www/cgi-bin/vault
+ install -D -o www -g www -m 0440 template/browse_file.html /var/www/usr/share/vault/template/browse_file.html
clean:
rm -f *.o *.BAK main