Search code examples
c++linuxmakefilecompilationpremake

Can I print the final assembled gcc command with premake?


I have a premake compilation script. This script generates a make file which can then be used to compile the final exectuable.

I want to instruct premake to instruct the make file to display the final gcc/g++ command

e.g g++ main.cpp -l LIBRARY

Is this possible?


Solution

  • Assuming gnu make, you'd normally run make -n. If you prefer, you can use make --dry-run or make --print-only.