[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Make File Tutorials, Books, etc.?
- From: John Gamboa <vaulttech@...>
- Date: Sun, 13 Nov 2011 17:00:09 -0200
2011/11/10 Kevin T. Ryan <firstname.lastname@example.org>
Most of the tutorials I've come across only cover the basics and I don't feel like they go into too much detail of what represents "good practices" vs
Thanks in advance, ktr
(sorry for my horrible english)
When trying to create the makefile to a project I was working on, as an inspiration, I used the makefile of the Lua source (specially the "linux" target part).
I don't know if they really did this, but my "feeling" was that they created an skeleton makefile with "initial configurations" and, each time they change something, they run "gcc" using the "-MM" options and put the output after the "#DO NOT DELETE" line on the makefile (that gcc option will return an implicit rule with all the dependencies of a .c file). I though this would be a nice practice since this way I don't have to keep track of each dependency by hand, and to test if it would work properly, I've used this in a personal project. I like the result, but I'm not any expert in makefiles, so, maybe there are other ways one can do this that are better than what I've done.
Also, I know that this is the way Eclipse work with its auto-generated makefiles (although in a slightly modified way). The problem was that the way Eclipse work wouldn't work with "nvcc" (witch was the compiler I was trying to use in my personal project).
(hope I have contributed v_v)