Short version of the question: What are objects.mk
, sources.mk
, makefile
, subdir.mk
, *.o
and *.d
files generated by Eclipse?
Long Version of the question:
workspace
directory. Whenever I create a project and call it ProjectName
a new directory (also called ProjectName
) is created by Eclipse in the workspace
folder.ClassName.cpp
and header file ClassName.h
). These files are put into the workspace/ProjectName/src
folder.Build
my project in Eclipse and in the workspace/ProjectName
a new folder appears. It is called Debug
.ProjectName
. It is the executable. If I type its name in the command line, my program will be executed.objects.mk
, sources.mk
, makefile
.Debug
folder there is src
directory. It contains subdir.mk
file whose meaning is unknown to me as well as ClassName.o
and ClassName.d
files (if I have N classes there will be N pairs of the *.o
and *.d
files.)Can anybody, please, explain the meaning and purpose of these files?
objects.mk
, sources.mk
, makefile
and subdir.mk
are makefiles generated by Eclipse according to your project type (executable, library, shared library). For their contents and how these work refer to the make
command documenation of your toolchain. In short these are responsible to call the compiler and linker.
ClassName.o
is the object file generated by the compiler, all of them will be linked together to an executable or stored in a library (depending on project type).
ClassName.d
is a so called dependency reference file that is generated by the compiler (on demand) and included into the makefiles, that it's possible to track changes in header files, and recompile the concerned source files if neccessary.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With