Eseguendo il seguente makefile:
Project : Project.o
gcc Project.o Declarations.o Definitions.o
#"Project" depends on object file "Project.o". If "Project.o" is changed, the files must be linked.
Project.o : Declarations.h Definitions.h
gcc -c Project.c
#"Project.o" depends on two files, "Declarations.h" and "Definitions.h". If one of these files has been changed, then you need to recompile the file and object.
Il compilatore fornisce il seguente responso:
make: Warning: File `makefile' has modification time 3.7e+03 s in the future
gcc Project.o Declarations.o Definitions.o
gcc: Declarations.o: No such file or directory
gcc: Definitions.o: No such file or directory
make: *** [Project] Error 1
Come si può ovviare al warning e all'errore? Premetto che è la prima volta che utilizzo l'utility makefile.