J'ai un problème avec mon makefile. Arbre de mon projet se présente comme suit:Comment créer un makefile approprié
- makefile/makefile
- Source/main.cpp
- includes/first.hpp,
et j'ai makefile suivant:
program.o: main.o
g++ -o program main.o
main.o: /home/project/source/main.cpp, /home/project/include/first.hpp
g++ -c /home/project/source/main.cpp /home/project/include/first.hpp
Comment je peux créer un fichier makefile sans chemins? Je veux dire quelque chose comme ceci:
program.o: main.o
g++ -o program main.o
main.o: main.cpp, first.hpp
g++ -c main.cpp first.hpp
Jetez un coup d'oeil: http://stackoverflow.com/q/231229/1758762 – duDE