730 Part VI (Web server hosting) . Programming in Linux As

730 Part VI . Programming in Linux As mentioned earlier, -o file tells GCC to place output in the file file regardless of the output being produced. If you do not specify -o, for an input file named file. suffix, the defaults are to name the executable a.out, the object file file.o, and the assembly language file file.s. Preprocessor output goes to stdout. Automating Builds with Make The make utility is a tool to control the process of building and rebuilding software. Make automates what software gets built, how it gets built, and when it gets built, freeing programmers to concentrate on writing code. It also saves a lot of typing because it contains logic that invokes GCC compiler-appropriate options and arguments. Use this section to familiarize yourself with the look and layout of a makefile. For all but the simplest software projects, make is essential. In the first place, projects composed of multiple source files require long, complex compiler invocations. Make simplifies this by storing these difficult command lines in the makefile, a text file that contains all of the commands required to build software projects. Make is convenient for both the developer and the user who want to build a program. As developers make changes to a program, whether to add new features or incorporate bug fixes, make makes it possible to rebuild the program with a single, short command. Make is convenient for users because they don t have to read reams of documentation explaining in excruciating, mind-numbing detail how to build a program. Rather, they can simply be told to type make followed by make test followed by make install. Most users appreciate the convenience of simple build instructions. Finally, make speeds up the edit-compile-debug process. It minimizes rebuild times because it is smart enough to determine which files have changed, and only recompiles files that have changed. So, how does make accomplish its magical feats? By using a makefile, which contains rules that tell make what to build and how to build it. A rule consists of the following: . A target, the thing make ultimately tries to create . A list of one or more dependencies (usually files) required to build the target . A list of commands to execute to create the target from the specified dependencies Makefiles constitute a database of dependency information for the programs they build and automatically verify that all of the files necessary for building a program are available. When invoked, GNU make looks for a file named GNUmakefile, makefile, or Makefile, in that order. For some reason, most Linux programmers use the last form, Makefile. Makefile rules have the general form
If you are in need for chaep and reliable webhost to host your website, our recommendation is http web server services.

Leave a Reply