Friday, July 31, 2009

I need to add a C file to an existing complex makefile.?

I have a complex makefile that compiles about 20 different C files/java files/etc.. I have to make a standalone tool using a C file but needs to be included in the makefile. I'm not the best with makefiles just need to know how to include this or some things to look for as to where to add it.





Thanks

I need to add a C file to an existing complex makefile.?
Just add the new target and dependancies.








myprog: myincludes.h





Each makefile is different so you may need more than that.
Reply:Some where there will be a list of the outputs of the make process and that section will probably be first and will be labeled "all:". Add your executable name to that list, the add the make command somewhere further down, anywhere.


No comments:

Post a Comment