diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -33,8 +33,9 @@ LDFLAGS_DEPS != pkg-config --libs kcgi kcgi-html CFLAGS=-DLOG_INFO $(CFLAGS_DEPS) LDFLAGS=-static $(LDFLAGS_DEPS) -.if make(debug) -CFLAGS+=-O0 -g -W -Wall -Wextra -DTEMPLATE_DIR='"template"' +.if make(debug) || make(test) +PWD!=pwd +CFLAGS+=-O0 -g -W -Wall -Wextra -DDATA_DIR='"$(PWD)/test-data"' -DTEMPLATE_DIR='"template"' .else CFLAGS+=-O2 .endif @@ -49,6 +50,9 @@ all: main main: mime.o url.o template.o file.o http.o download.o browse.o main.o $(CC) -o $@ $> $(LDFLAGS) +test: mime.o url.o template.o file.o http.o download.o browse.o test.o + $(CC) -o $@ $> $(LDFLAGS) + env: env.o $(CC) -o $@ $> $(LDFLAGS) @@ -72,7 +76,7 @@ install: gzip -fk /var/www/vault-static/fontawesome-6.5.1/webfonts/fa-solid-900.woff2 clean: - rm -f *.o *.BAK main + rm -f *.o *.BAK main test links: links http://localhost/cgi-bin/vault |