mirror of
https://github.com/augustin64/projet-tipe
synced 2025-01-23 23:26:25 +01:00
Add make.sh instructions
This commit is contained in:
parent
1c1511e5f4
commit
4a8ab009ce
9
make.sh
9
make.sh
@ -6,7 +6,9 @@ if [[ $1 == "preview" ]]; then
|
||||
[[ $2 ]] || set -- "$1" "build"
|
||||
if [[ $2 == "build" ]]; then
|
||||
mkdir -p out
|
||||
echo "Compilation de src/mnist/preview.c"
|
||||
gcc src/mnist/preview.c -o out/preview_mnist $FLAGS
|
||||
echo "Fait."
|
||||
exit
|
||||
elif [[ $2 == "train" ]]; then
|
||||
[[ -f out/preview_mnist ]] || $0 preview build
|
||||
@ -24,7 +26,9 @@ if [[ $1 == "test" ]]; then
|
||||
if [[ $2 == "build" ]]; then
|
||||
mkdir -p out
|
||||
for i in $(ls test); do
|
||||
echo "Compilation de test/$i"
|
||||
gcc "test/$i" -o "out/test_$(echo $i | awk -F. '{print $1}')" $FLAGS
|
||||
echo "Fait."
|
||||
done
|
||||
exit
|
||||
elif [[ $2 == "run" ]]; then
|
||||
@ -37,3 +41,8 @@ if [[ $1 == "test" ]]; then
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Usage:"
|
||||
echo -e "\t$0 preview ( build | train | t10k )"
|
||||
echo -e "\t$0 test ( build | run )\n"
|
||||
echo -e "Les fichiers de test sont recompilés à chaque exécution,\nles autres programmes sont compilés automatiquement si manquants"
|
||||
|
Loading…
Reference in New Issue
Block a user