As the title states, I am looking for a way to make compile my PIN tool with some dependencies. So for example if I #include "somefile.h"
in my PIN tool, and generate some object file g++ -c somefile.cpp
, how do I link my object file to compile with my PIN tool so I can use it's functionality in my PIN tool?
So I was able to find some documentation on altering the "makefile.rules" under PIN's website here. For my situation these 6 lines below would be added to the end of "makefile.rules".
$(OBJDIR)"somefile"$(OBJ_SUFFIX): "somefile".cpp "somefile".h
$(CXX) $(TOOL_CXXFLAGS) $(COMP_OBJ)$@ $<
$(OBJDIR)"PinFile"$(OBJ_SUFFIX): "pin_tool".cpp
$(CXX) $(TOOL_CXXFLAGS) $(COMP_OBJ)$@ $<
$(OBJDIR)"pin_tool"$(PINTOOL_SUFFIX): $(OBJDIR)"somefile"$(OBJ_SUFFIX) $(OBJDIR)"PinFile"$(OBJ_SUFFIX) "somefile".h
$(LINKER) $(TOOL_LDFLAGS_NOOPT) $(LINK_EXE)$@ $(^:%.h=) $(TOOL_LPATHS) $(TOOL_LIBS)
The only thing that would change from one make file to another would be the words I put in quotes. Note that the quoted words should not have quotes around them in the actual "makefile.rules"
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