[scripts] fix: maker cpp project handling
This commit is contained in:
parent
bf676aa089
commit
46fdc12c29
@ -11,15 +11,15 @@
|
|||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
|
|
||||||
headers_list="$(ls | grep '.h$')"
|
headers_list="$(ls | grep '\.hp*$')"
|
||||||
sources_list="$(ls | grep '.cp*$')"
|
sources_list="$(ls | grep '\.cp*$')"
|
||||||
modules_list="$(printf "\n$sources_list" | sed 's/\.cp*//g' | tr '\n' ' ')"
|
modules_list="$(printf "\n$sources_list" | sed 's/\.cp*//g' | tr '\n' ' ')"
|
||||||
targets_list="$(printf "\n$sources_list" | sed 's/\.cp*/\.o/g' | tr '\n' ' ')"
|
targets_list="$(printf "\n$sources_list" | sed 's/\.cp*/\.o/g' | tr '\n' ' ')"
|
||||||
|
|
||||||
get_compiler(){
|
get_compiler(){
|
||||||
for source_ in "$sources_list"; do
|
for source_ in "$sources_list"; do
|
||||||
case "$source_" in
|
case "$source_" in
|
||||||
*.cpp) comp="g++" && return;;
|
*.cpp) comp="g++";;
|
||||||
*.c) comp="gcc";;
|
*.c) comp="gcc";;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
Reference in New Issue
Block a user