Lets say that a Makefile starts:
CXX = g++
DEFINES = -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
CXXFLAGS = -pipe -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -O2 -Wall -W -D_REENTRANT $(DEFINES) |
The variables CXX and CXXFLAGS are then used in rules that generate object files from source files.
I cannot copy this as is into OSX, Windows, or another Linux box, because on those the compiler isn't GCC, but Clang, MSVC, or Intel. The file
content isn't portable even though each platform has a 'make' utility.
There is an another set of tools, like GNU build system, CMake, and qmake that have their own (ascii) project description format, and that are available on many platforms. When you run one of these on a platform, it looks up what make you have, what C++ compiler you have, etc and writes approriate
CXX = ...
CXXFLAGS = ...