summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
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