Reputation: 28081
I have this simple rule in my Makefile
:
PP=g++ -std=c++0x
%.o: $.cpp
$(PP) $< -c -o $@
When I run make parse_utils.o
, the command be executed should be:
g++ -std=c++0x parse_utils.cpp -c -o parse_utils.o
But in fact it's:
>make parse_utils.o
g++ -c -o parse_utils.o parse_utils.cpp
And I got a compile error because I used C++11
syntax.
Is this wildcard rule wrong?
Upvotes: 0
Views: 737