Makefile is a script written in a certain prescribed syntax which helps to build the target output (normally, one or more executables) from source files by compilation and linking. If you tell your instructor/teacher/prof that an empty makefile is all you need since you know the built-in rules do the right thing, you'll get some extra credit and maybe your instructor has learnt something new :-) If you are asked for a reference, you could quote the relevant parts of the make manual, or, do it like a pro, quote from the POSIX Standard for the make utility, section Default Rules.īefore going for makefile you have to know what's it and why we need it If you want to use gcc instead of cc, you can run $ rm Hello All you need to do is place your C source in a file named after the executable name ( Hello) and with a. Now for your task, really there is no need for a Makefile, since make has built-in rules that know how to compile a simple program. A makefile typically looks like this: target: dependency A makefile is a recipe for the make utility how to create some file (called a target) from some other files (called dependencies) using a set of commands run by the shell.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |