Harsh1010
Harsh1010

Reputation: 35

How do I get make to just compile?

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

Answers (1)

CK9
CK9

Reputation: 66

Do you mean running only part for getting object file? Try runing make pi.o

Upvotes: 4

Related Questions