Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ
Tải xuống
Tham khảo tài liệu 'linux all in one desk reference for dummies phần 10', công nghệ thông tin, hệ điều hành phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Exploring the Software Development Tools in Linux 647 xviewobj.o Makefile xviewobj.c xdraw.h shapes.o Makefile shapes.c shapes.h This makefile relies on GNU make s implicit rules. The conversion of .c files to .o files uses the built-in rule. Defining the variable CFLAGS passes the flags to the C compiler. The target named all is defined as the first target for a reason if you run GNU make without specifying any targets in the command line see the make syntax described in the following section the command builds the first target it finds in the makefile. By defining the first target all as xdraw you can ensure that make builds this executable file even if you do not explicitly specify it as a target. UNIX programmers traditionally use all as the name of the first target but the target s name is immaterial what matters is that it is the first target in the makefile. How to run make Typically you run make by simply typing the following command at the shell prompt make When run this way GNU make looks for a file named GNUmakefile makefile or Makefile in that order. If make finds one of these makefiles it builds the first target specified in that makefile. However if make does not find an appropriate makefile it displays the following error message and then exits make No targets specified and no makefile found. Stop. If your makefile happens to have a different name from the default names you have to use the -f option to specify the makefile. The syntax of the make command with this option is make -f filename Book VIII Chapter 1 where filename is the name of the makefile. Even when you have a makefile with a default name such as Makefile you may want to build a specific target out of several targets defined in the makefile. In that case you have to use the following syntax when you run make make target TEAM LinG - Live Informative Non-cost and Genuine 648 Exploring the Software Development Tools in Linux For example if the makefile contains the target named clean you .