Salut a tous,

J ai débuter le C il n y a pas trés longtemps et je voudrais vous poser une question sur la faq du makefile (http://gl.developpez.com/tutoriel/outil/makefile/).

Je ne comprend pas les commandes des 2 dernières cibles :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
 
hello: hello.o main.o
	gcc -o hello hello.o main.o
 
hello.o: hello.c
	gcc -o hello.o -c hello.c -Wall -ansi
 
main.o: main.c hello.h
	gcc -o main.o -c main.c -Wall -ansi
Plus précisement pourquoi rajoute-t-il l option -o avec un fichier objet.
J ai essayé sans cela ca marche.

Merci.