Skip to content

Commit

Permalink
fixed default target
Browse files Browse the repository at this point in the history
  • Loading branch information
yehoudie committed Sep 14, 2024
1 parent 41656c5 commit 73f2d22
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions linuxBuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ MODE_RELEASE=2
DP_FLAG=1
EP_FLAG=2

name=hexter
def_target=app
name="hexter"
def_target="app"
pos_targets="app|lib"
target=
def_mode=$MODE_RELEASE
mode=$def_mode
help=0
debug_print=EP_FLAG
debug_print=$EP_FLAG
clean=0

# Clean build directory from meta files
Expand Down Expand Up @@ -85,7 +85,8 @@ function buildTarget() {
elif [[ $target == "lib" ]]; then
gcc -o $dir/hexter.so -shared -Wl,-z,relro,-z,now -fPIC -D_FILE_OFFSET_BITS=64 $flags $dpf $epf -Ofast src/hexter.c src/Finder.c src/Printer.c src/ProcessHandlerLinux.c src/Writer.c src/utils/*.c
fi
return 0

return $?
}

function printUsage() {
Expand Down Expand Up @@ -160,7 +161,7 @@ else
fi

if [[ -z ${target} && ${clean} == 0 ]]; then
$target=$def_target
target=$def_target
fi

echo "clean: "${clean}
Expand All @@ -173,6 +174,8 @@ if [[ ${clean} == 1 ]]; then
clean ${build_dir}
fi

buildTarget ${target} ${build_dir} ${mode} ${debug_print}
if [[ -n ${target} ]]; then
buildTarget ${target} ${build_dir} ${mode} ${debug_print}
fi

exit $?

0 comments on commit 73f2d22

Please sign in to comment.