Click to See Complete Forum and Search --> : who calls them easy ??? : MAKEFILES


mnsharif
09-30-2002, 09:50 AM
i wanted to see how kernel compiles through
make clean
make config
make bzImage
make modules; make modules_install
and some similiar make bla bla
so i just read a utorial about MAKE and wow!!!! i thought i got it all in my brain but when i opened the Makefile in my
/usr/src/linux-2.4.18-3 i was so:confused: :confused:
one reason, coz there was a lot of shell scripting and etc stuff and also, there was a different Makefile for each subdirecrtory, while the tutorial of MAKE, i studied say almost a very few line about this style of Makefile
so anyone here, i need ur help
i hope you people wont let me go astray

bwkaz
09-30-2002, 01:15 PM
The kernel compiling process might be a little too ... well ... large, if you're trying to use it to learn Makefiles.

Might I suggest something a bit smaller, like some software package after you've run its configure script? Preferably one without subdirectories (since almost always, each subdirectory will have its own Makefile)... however, I can't think of any good ones off the top of my head.

That being said, the kbuild process is somewhat documented -- look in Documentation/kbuild/ in the kernel source.

mnsharif
10-01-2002, 12:08 AM
hi
and thanx bwkaz for your concern. I will surely look upon some scripts of smaller software packages and kbuild documentation too, but i looked at Kernel's Makefile coz thats the one i wanted to understand. Like how could

make config

ask for all the available modules and etc.

Anyways, i will just read through the suggested readings and will let you know (or will ask the next question then).

regards

Ludootje
10-04-2002, 04:11 PM
mnsharif could you post a link to that tutorial please? I'm very interested in learning more about makefiles.
Since I want to learn about it, I don't know a lot of it, and I can't help you with your problem - sorry.

Stuka
10-04-2002, 05:11 PM
makefiles are simple - it's just that a makefile can run ANYTHING based on it's targets and rules. The simplest makefiles simply run gcc on a small set of files to make an executable. The makefile for the kernel has scripts and executable calls inside it that do a TON of stuff - my guess is you'd have to be a scripting expert to rapidly decipher all that file does!

askrieger
10-04-2002, 09:32 PM
There's a good introduction to make at:
http://linux.oreillynet.com/pub/a/linux/2002/01/31/make_intro.html

Ludootje
10-05-2002, 09:00 AM
Originally posted by askrieger
There's a good introduction to make at:
http://linux.oreillynet.com/pub/a/linux/2002/01/31/make_intro.html
Thanks a lot!