Skip to content
Advertisement

Rename generated files in Makefile

I have to modify a Makefile such that the intermediate files with extension .cc are moved to .cpp before building the .o. files. My modified Makefile looks like below.

JavaScript

protoc is a compiler that generates .cc files. How to make targets so that after generating the .cc files those are move to .cpp and then the client_grpc is built using the .cpp files ?

Advertisement

Answer

The usual way to do this would be to have your rule produce .cpp files:

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement