Hallo, chun lee hat gesagt: // chun lee wrote:
and i put them in the same folder and 'cd' to the folder and typed make hello_world.c
and i got
ls: ../src: No such file or directory make: Nothing to be done for `hello_world.c'.
Apart from Martin's advise which you should follow as well, you should not call "make hello_world.c" but just "make" If you give a name after "make" then it uses that as a target, that is in your case "make hello_world.c" will try to build a file called "hello_world.c" which you already have, and probably your makefile doesn't know how to create hello_world.c anyways (because that's your job. ;)
If you open the makefile in an editor, its schema will look like this:
target: rules to make target
target2: rules to make target2 ...
"make target" will run "rules to make target", "make target2" will run "rules to make taregt2" then and so on. There are some default targets, namely "all" which can be omitted when running "make".
There are a lot more tricks inside makefiles, you really should try "info make" now and at least read the introduction.
Frank Barknecht _ ______footils.org__