Reputation: 35
I want to just compile using make
and not link. Within my directory I have the following: Makefile, pi*, pi.cpp, pi.o
In the Makefile this is the code:
pi: pi.o
c++ -O0 pi.o -o pi
pi.o: pi.cpp
c++ -O0 pi.cpp -c
How do I get make
to just compile:
c++ -O0 pi.cpp -c
Upvotes: 1
Views: 81
Reputation: 66
Do you mean running only part for getting object file? Try runing make pi.o
Upvotes: 4