Skip to content
Snippets Groups Projects
Commit c61acbb6 authored by Pradheep Unnikrishnan's avatar Pradheep Unnikrishnan
Browse files

Organisation de plusieurs versions de makefile

parent b04ed29b
Branches
No related merge requests found
all : main run clean
main: main.o io.o alea.o tri.o remplir.o
gcc -g -Werror -o main main.o io.o alea.o tri.o remplir.o
@echo "\n\033[32mCompilation éxécuté avec succès\033[0m"
main.o: main.c io.h alea.h tri.h tableau.h remplir.h
@echo "\n\033[31m--------------COMPILATION DU PROGRAMME -------------------------------------\033[0m\n"
gcc -g -Werror -c -o main.o main.c
io.o: io.c io.h tableau.h
gcc -g -Werror -c -o io.o io.c
alea.o: alea.c alea.h tableau.h
gcc -g -Werror -c -o alea.o alea.c
tri.o: tri.c tri.h tableau.h
gcc -g -Werror -c -o tri.o tri.c
remplir.o: remplir.c remplir.h tableau.h alea.h
gcc -g -Werror -c -o remplir.o remplir.c
run:
@echo "\n\033[31m--------------ÉXÉCUTION DU PROGRAMME ---------------------------------------\033[0m\n"
./main 10 1000
@echo "\n\033[32mProgramme éxécuté avec succès\033[0m"
clean:
@echo "\n\033[31m--------------SUPPRESSION DES FICHIERS OBJETS ET DU MAIN -------------------\033[0m\n"
rm *.o main
@echo "\n\033[32mSuppression du fichier main avec succès\033[0m"
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment