![]() The following makefile is not elegant, but it does the job. This method requires more disk space, but subsequent (repetitive) recompilations need to be performed only on those object files for which the sources have changed, which saves time. o) file, and then by linking the object files to form an executable ( a.out) file. Many include library routines, either from one of the standard system libraries or from a user-supplied library.Īlthough it might be easier to recompile and link a single-source program using a single cc command, it is usually more convenient to compile programs with multiple sources in stages-first, by compiling each source file into a separate object (. Most C programs, however, are compiled from several source files. In previous examples you have seen how to compile a simple C program from a single source file, using both explicit target entries and implicit rules.
0 Comments
Leave a Reply. |