Makefile

The Makefile contains the steps for compiling the executable (or executables, or really any collection of result files). Makefiles are Unix creatures, though they appear in other places. The make command reads the Makefile, and performs whatever operations are needed to build the result file(s).

Make is not the only program which can be used this way. IDEs need some way to build their targets. They either do what make does, or, like CodeBlocks, generate an appropriate make file and run make. Others have alternative build tools.

CC = g++ CXXFLAGS = -std=c++11 -g ecalc: ecalc.o expr_stack.o expression_parts.o expr_stack.o: expr_stack.h expression_parts.h expression_parts.o: expression_parts.h ecalc.o: expr_stack.h expression_parts.h clean: rm -f *.o ecalc core* *~

Note: The cmake program is very popular these days, because it works on most platforms, while make is a Unix program that's been also been ported a few other places, sometimes awkwardly. Cmake works by translating a standard description of the build procedure into whatever is native for the system. On Unix, it will translate into a makefile.