how to add source or header file in gcc

Mike Stump mrs@apple.com
Thu Dec 22 21:11:00 GMT 2005


On Dec 22, 2005, at 1:54 AM, Liu Haibin wrote:
> I'd like to add some source and header files into gcc. I think I
> probably need to make some change in Makefile.in. But the Makefile.in
> looks very complicated. Could anyone give some advice on this?

google("make tutorial").  After that, you can just fire up your  
favorite editor and try it.  If it is too hard, try creating your own  
for a hello world style program and get that working, then,  
progressively add more complex features to the makefile that  
approximate the things that are unclear to you.

Another completely different way would be to find a file that someone  
added recently that is approximately like the file you want to add,  
then find the diff that added that file, then see what they change  
and how, you can try and structure your change the same way.  The  
classes of file to add include makefile fragments, port files,  
runtime files, language front end files, backend files, optimizer  
files and so on, all of them have different ways of going in.



More information about the Gcc mailing list