From ec527ca9cd69e5228b2aefddf03ba2f479a6422e Mon Sep 17 00:00:00 2001 From: Armin Friedl Date: Thu, 25 Feb 2021 20:18:42 +0100 Subject: [PATCH] Ignore favicon, optimize builds --- .drone.yml | 4 ++-- dirl.c | 3 ++- dirl.h | 5 +++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.drone.yml b/.drone.yml index 56a2b25..53dcf27 100644 --- a/.drone.yml +++ b/.drone.yml @@ -6,14 +6,14 @@ steps: - name: glibc-x86_64 image: gcc commands: - - make clean && make all + - make clean && make CFLAGS=-O3 all - mv dirl dirl-glibc-x86_64 - name: musl-x86_64 image: alpine commands: - apk update && apk add make git build-base linux-headers musl-dev - - make clean && make STATIC=-static all + - make clean && make CFLAGS="-static -O3" all - mv dirl dirl-musl-x86_64 - name: publish binaries diff --git a/dirl.c b/dirl.c index 67ec21f..87e7b5f 100644 --- a/dirl.c +++ b/dirl.c @@ -246,5 +246,6 @@ dirl_skip(const char* name) || !strcmp(name, DIRL_HEADER) // || !strcmp(name, DIRL_ENTRY) // || !strcmp(name, DIRL_FOOTER) // - || !strcmp(name, DIRL_STYLE); // + || !strcmp(name, DIRL_STYLE) // + || !strcmp(name, FAVICON); // } diff --git a/dirl.h b/dirl.h index 4f82f87..3673a40 100644 --- a/dirl.h +++ b/dirl.h @@ -9,9 +9,10 @@ #include "http.h" #define DIRL_HEADER ".header.tpl" -#define DIRL_ENTRY ".entry.tpl" +#define DIRL_ENTRY ".entry.tpl" #define DIRL_FOOTER ".footer.tpl" -#define DIRL_STYLE "style.css" +#define DIRL_STYLE "style.css" +#define FAVICON "favicon.ico" /* Default template definitions *