From ba1ac3e135cc0b64b6f97ad5995d6a5ebdae8598 Mon Sep 17 00:00:00 2001 From: Abdelrahman Said Date: Fri, 3 Nov 2023 22:47:26 +0000 Subject: [PATCH] Add build scripts --- build | 3 +++ compile | 9 +++++++++ 2 files changed, 12 insertions(+) create mode 100644 build create mode 100644 compile diff --git a/build b/build new file mode 100644 index 0000000..fde0b40 --- /dev/null +++ b/build @@ -0,0 +1,3 @@ +#!/bin/bash + +bear -- ./compile "$@" diff --git a/compile b/compile new file mode 100644 index 0000000..71622a7 --- /dev/null +++ b/compile @@ -0,0 +1,9 @@ +#!/bin/bash + +CC=clang +AR=ar +CFLAGS="-c -fPIC -Wall -Werror -pedantic -O3 -Iinclude -Ic-cpp-aliases" +SRC="src/cpath.c" +OUT=libcpath.a + +(set -x ; $CC $CFLAGS $SRC ; $AR -r $OUT *.o ; rm *.o)