understand make dependencies while using make to build project c++

69 Views Asked by At

There is a legacy code which uses 'make' to build all C++ files. I am trying to decrease the number of files being included during build, that can create some space to add in some new code.(the new code is to set up serial communication). However, these files seems to be dependent on each other and I am having a hard time figuring out which ones to exclude from the build. The format of the makefile is as follows:

$(ObjDir)\a.obj:  w:\a.cpp
$(ObjDir)\b.obj:  w:\b.cpp
main_obj=\
    $(ObjDir)\a.obj\
    $(ObjDir)\b.obj
mainEXE.exe:$(main_obj)
    mainEXE.exe
    mainEXE.map

There is only one file I need to tamper with while adding the new lines of code. I am trying to keep only that particular file when build happens. Is there way I could figure out the dependencies?

0

There are 0 best solutions below