Compile pakrd static library
This commit is contained in:
parent
c5c447d5c5
commit
c04e8bd4a3
19
compile
19
compile
@ -21,6 +21,7 @@ FG_BR_CYAN="\033[96"
|
||||
FG_BR_WHITE="\033[97"
|
||||
|
||||
CC=clang
|
||||
AR=ar
|
||||
CFLAGS="-Wall -Werror -pedantic -Iinclude "
|
||||
|
||||
PCKR_SRC="\
|
||||
@ -32,6 +33,13 @@ PCKR_SRC="\
|
||||
src/pckr.c \
|
||||
src/main.c"
|
||||
|
||||
PAKRD_SRC="\
|
||||
src/path_utils.c \
|
||||
src/io.c \
|
||||
src/darr.c \
|
||||
src/pak.c"
|
||||
PAKRD_FLAGS="-c -fPIC"
|
||||
|
||||
PCKR_TEST_SRC="\
|
||||
src/path_utils.c \
|
||||
src/io.c \
|
||||
@ -66,9 +74,13 @@ done
|
||||
if [[ $BUILD_TYPE == "debug" ]]; then
|
||||
CFLAGS+="-g "
|
||||
PCKR_OUT="pckr"
|
||||
PAKRD_OUT="pakrd.a"
|
||||
else
|
||||
mkdir dist
|
||||
cp ./include/pak.h dist
|
||||
CFLAGS+="-O3 "
|
||||
PCKR_OUT="../proj/pckr"
|
||||
PCKR_OUT="dist/pckr"
|
||||
PAKRD_OUT="dist/pakrd.a"
|
||||
fi
|
||||
|
||||
|
||||
@ -76,6 +88,11 @@ fi
|
||||
(set -x ; $CC $CFLAGS $PCKR_SRC -o $PCKR_OUT)
|
||||
|
||||
|
||||
# Build pakrd static library
|
||||
(set -x ; $CC $CFLAGS $PAKRD_FLAGS $PAKRD_SRC ; $AR r $PAKRD_OUT *.o)
|
||||
rm *.o
|
||||
|
||||
|
||||
# Build pckr_test executable
|
||||
(set -x ; $CC $CFLAGS $PCKR_TEST_SRC -o $PCKR_TEST_OUT)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user