diff options
| author | dautor <karlo98.m@gmail.com> | 2024-11-16 13:22:54 +0100 |
|---|---|---|
| committer | dautor <karlo98.m@gmail.com> | 2024-11-16 17:54:38 +0100 |
| commit | 47778ccd67cbb3fb70dda706911d3166038ca010 (patch) | |
| tree | 906bf0537d14f5ce8e2528736fb89a3499ada214 /build.sh | |
Import project
Diffstat (limited to 'build.sh')
| -rwxr-xr-x | build.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..e60f258 --- /dev/null +++ b/build.sh @@ -0,0 +1,21 @@ +#!/bin/sh +set -e + +CC=cc +SAN="$SAN -fsanitize=address -fsanitize=undefined -fsanitize=leak" +CFLAGS="$CFLAGS -g -O0 -DENABLE_ASSERT=1 -DENABLE_DEBUG=1" + +CFLAGS="$CFLAGS -Wall -Wextra -Weverything -pedantic" +CFLAGS="$CFLAGS -Wno-unsafe-buffer-usage -Wno-gnu-zero-variadic-macro-arguments -Wno-format-non-iso -Wno-declaration-after-statement -Wno-padded -Wno-covered-switch-default -Wno-gnu-empty-struct -Wno-c++-compat -Wno-alloca -Wno-zero-length-array" + +CFLAGS="$CFLAGS -I/usr/local/include" +LDFLAGS="$LDFLAGS -L/usr/local/lib -lucl -lnetgraph -ljail -lutil getmntopts.o" + +$CC -c /usr/src/sbin/mount/getmntopts.c -o getmntopts.o + +for i in $(ls -d src/sf.*); do + $CC $CFLAGS $SAN src/*.c src/module/module.c $i/*.c $LDFLAGS -o $(basename $i) +done + +$CC $CFLAGS $SAN src/*.c src/base/*.c $LDFLAGS $LIBS -o sf.base +$CC $CFLAGS $SAN src/*.c src/lamina/*.c $LDFLAGS $LIBS -o sf.lamina |
