 make & Makefile.. . ... . ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . make & Makefile . . Make School of Computer Wuhan University ©hfwang - 1/36 - ... . ... . ... . ... . . . . . . . . . . . . . . . . . . . . make & Makefile .1 make & Makefile 程序的编写步骤 依赖关系图 工程管理与 make make 的工作原理 规则与依赖关系 通配符的使用 变量的定义和引用 自动变量 模式规则 Makefile 的结构 make 命令参数与选项 常见的错误 依赖关系的自动生成 Turbo C 的 make .. . ... . ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . make & Makefile . Free as in Freedom .GNU’s Not UNIX . . ©hfwang - 3/36 - ... . ... . ... . ... . ...0 码力 | 36 页 | 975.98 KB | 1 年前3 make & Makefile.. . ... . ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . make & Makefile . . Make School of Computer Wuhan University ©hfwang - 1/36 - ... . ... . ... . ... . . . . . . . . . . . . . . . . . . . . make & Makefile .1 make & Makefile 程序的编写步骤 依赖关系图 工程管理与 make make 的工作原理 规则与依赖关系 通配符的使用 变量的定义和引用 自动变量 模式规则 Makefile 的结构 make 命令参数与选项 常见的错误 依赖关系的自动生成 Turbo C 的 make .. . ... . ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . make & Makefile . Free as in Freedom .GNU’s Not UNIX . . ©hfwang - 3/36 - ... . ... . ... . ... . ...0 码力 | 36 页 | 975.98 KB | 1 年前3
 跟我一起写 Makefile (PDF 重制版)跟我一起写 Makefile (PDF 重制版) 作者: 陈皓 2023 年 12 月 12 日 目录 1 概述 1 1.1 关于程序的编译和链接 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2 makefile 介绍 3 2.1 makefile 的规则 . . . . . make 是如何工作的 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.4 makefile 中使用变量 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.5 让 make make 自动推导 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.6 makefile 的另一种风格 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.7 清空目录的规则0 码力 | 81 页 | 628.51 KB | 1 年前3 跟我一起写 Makefile (PDF 重制版)跟我一起写 Makefile (PDF 重制版) 作者: 陈皓 2023 年 12 月 12 日 目录 1 概述 1 1.1 关于程序的编译和链接 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2 makefile 介绍 3 2.1 makefile 的规则 . . . . . make 是如何工作的 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.4 makefile 中使用变量 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.5 让 make make 自动推导 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.6 makefile 的另一种风格 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.7 清空目录的规则0 码力 | 81 页 | 628.51 KB | 1 年前3
 Linux 下 Makefile 的 automake 生成全攻略1 Linux 下 Makefile 的 automake 生成 全攻略 作为 Linux 下的程序开发人员,大家一定都遇到过 Makefile,用 make 命令来编译自己写 的程序确实是很方便。一般情况下,大家都是手工写一个简单 Makefile,如果要想写出一 个符合自由软件惯例的 Makefile 就不那么容易了。 在本文中,将给大家介绍如何使用 autoconf 和 automake 软件 惯 例 的 Makefile , 这 样 就 可以 象 常 见 的 GNU 程 序 一 样 ,只 要 使 用 “./configure”,“make”,“make install”就可以把程序安装到 Linux 系统中去了。 这特别适合想做开放源代码软件的程序开发人员,又或如果你只是自己写些小的 Toy 程序, 那么这个文章对你也会有很大的帮助。 一、Makefile 介绍 Makefile 致工程的重新链接,但是不是所有的文件都需要重新编译,Makefile 中记录有文件的信息, 在 make 时会决定在链接的时候需要重新编译哪些文件。 Makefile 的宗旨就是:让编译器知道要编译一个文件需要依赖其他的哪些文件。当那些依 赖文件有了改变,编译器会自动的发现最终的生成文件已经过时,而重新编译相应的模块。 Makefile 的基本结构不是很复杂,但当一个程序开发人员开始写 Makefile 时,经常会怀疑 自己写的是否符合惯例,而且自己写的0 码力 | 14 页 | 701.04 KB | 1 年前3 Linux 下 Makefile 的 automake 生成全攻略1 Linux 下 Makefile 的 automake 生成 全攻略 作为 Linux 下的程序开发人员,大家一定都遇到过 Makefile,用 make 命令来编译自己写 的程序确实是很方便。一般情况下,大家都是手工写一个简单 Makefile,如果要想写出一 个符合自由软件惯例的 Makefile 就不那么容易了。 在本文中,将给大家介绍如何使用 autoconf 和 automake 软件 惯 例 的 Makefile , 这 样 就 可以 象 常 见 的 GNU 程 序 一 样 ,只 要 使 用 “./configure”,“make”,“make install”就可以把程序安装到 Linux 系统中去了。 这特别适合想做开放源代码软件的程序开发人员,又或如果你只是自己写些小的 Toy 程序, 那么这个文章对你也会有很大的帮助。 一、Makefile 介绍 Makefile 致工程的重新链接,但是不是所有的文件都需要重新编译,Makefile 中记录有文件的信息, 在 make 时会决定在链接的时候需要重新编译哪些文件。 Makefile 的宗旨就是:让编译器知道要编译一个文件需要依赖其他的哪些文件。当那些依 赖文件有了改变,编译器会自动的发现最终的生成文件已经过时,而重新编译相应的模块。 Makefile 的基本结构不是很复杂,但当一个程序开发人员开始写 Makefile 时,经常会怀疑 自己写的是否符合惯例,而且自己写的0 码力 | 14 页 | 701.04 KB | 1 年前3
 Programmer’s Guide for Free Pascal, Version 3.2.2. 166 E.5 Programs needed to use the generated makefile . . . . . . . . . . . . . . . . . . . . 167 E.6 Variables that affect the generated makefile . . . . . . . . . . . . . . . . . . . . . . 167 should avoid using this directive. If you are not sure, it is better practice to use makefiles and makefile variables. 1.3.17 $LIBSUFFIX : Set the library suffix Similar to the {$EXTENSION } and {$LIBPREFIX locations where the files reside. If you are not sure, it is better practice to use makefiles and makefile variables. 1.3.26 $P or $OPENSTRINGS : Use open strings If this switch is on, all function or0 码力 | 187 页 | 531.58 KB | 1 年前3 Programmer’s Guide for Free Pascal, Version 3.2.2. 166 E.5 Programs needed to use the generated makefile . . . . . . . . . . . . . . . . . . . . 167 E.6 Variables that affect the generated makefile . . . . . . . . . . . . . . . . . . . . . . 167 should avoid using this directive. If you are not sure, it is better practice to use makefiles and makefile variables. 1.3.17 $LIBSUFFIX : Set the library suffix Similar to the {$EXTENSION } and {$LIBPREFIX locations where the files reside. If you are not sure, it is better practice to use makefiles and makefile variables. 1.3.26 $P or $OPENSTRINGS : Use open strings If this switch is on, all function or0 码力 | 187 页 | 531.58 KB | 1 年前3
 Cmake 实践autotools 之后,他们终于决定为 KDE4 选择一个新的工程构建工具,其根本原因用 KDE 开发者的话来 “ ” 说就是:只有少数几个 编译专家 能够掌握 KDE 现在的构建体系 (admin/Makefile.common),在经历了 unsermake, scons 以及 cmake 的选型和尝 试之后,KDE4 决定使用 cmake 作为自己的构建系统。在迁移过程中,进展异常的顺利,并 获得了 1,开放源代码,使用类 BSD 许可发布。http://cmake.org/HTML/Copyright.html 2,跨平台,并可生成 native 编译配置文件,在 Linux/Unix 平台,生成 makefile,在 苹果平台,可以生成 xcode,在 Windows 平台,可以生成 MSVC 的工程文件。 3,能够管理大型项目,KDE4 就是最好的证明。 4,简化编译构建过程和编译过程。Cmake 4,个人的建议: 1,如果你没有实际的项目需求,那么看到这里就可以停下来了,因为 cmake 的学习过程就 是实践过程,没有实践,读的再多几天后也会忘记。 2,如果你的工程只有几个文件,直接编写 Makefile 是最好的选择。 3,如果使用的是 C/C++/Java 之外的语言,请不要使用 cmake(至少目前是这样) 4,如果你使用的语言有非常完备的构建体系,比如 java 的 ant,也不需要学习0 码力 | 47 页 | 264.27 KB | 1 年前3 Cmake 实践autotools 之后,他们终于决定为 KDE4 选择一个新的工程构建工具,其根本原因用 KDE 开发者的话来 “ ” 说就是:只有少数几个 编译专家 能够掌握 KDE 现在的构建体系 (admin/Makefile.common),在经历了 unsermake, scons 以及 cmake 的选型和尝 试之后,KDE4 决定使用 cmake 作为自己的构建系统。在迁移过程中,进展异常的顺利,并 获得了 1,开放源代码,使用类 BSD 许可发布。http://cmake.org/HTML/Copyright.html 2,跨平台,并可生成 native 编译配置文件,在 Linux/Unix 平台,生成 makefile,在 苹果平台,可以生成 xcode,在 Windows 平台,可以生成 MSVC 的工程文件。 3,能够管理大型项目,KDE4 就是最好的证明。 4,简化编译构建过程和编译过程。Cmake 4,个人的建议: 1,如果你没有实际的项目需求,那么看到这里就可以停下来了,因为 cmake 的学习过程就 是实践过程,没有实践,读的再多几天后也会忘记。 2,如果你的工程只有几个文件,直接编写 Makefile 是最好的选择。 3,如果使用的是 C/C++/Java 之外的语言,请不要使用 cmake(至少目前是这样) 4,如果你使用的语言有非常完备的构建体系,比如 java 的 ant,也不需要学习0 码力 | 47 页 | 264.27 KB | 1 年前3
 The Way To Go - 2012file go.y at $GOROOT/src/cmd/gc/go.y and the output is y.tab.{c,h} in the same directory. See the Makefile in that directory for more about the build process. An overview of the build process can be seen doesn’t work you can disable the test of the net package by adding net to the NOTEST list in the Makefile in the map go/src/pkg . If you don’t want to run the tests, you can leave them out by running The concept of a Go project, with a view of its constituent files and packages, and where the Makefile typically plays the role of configuration file. Closely related is the concept of a build system:0 码力 | 629 页 | 4.85 MB | 1 年前3 The Way To Go - 2012file go.y at $GOROOT/src/cmd/gc/go.y and the output is y.tab.{c,h} in the same directory. See the Makefile in that directory for more about the build process. An overview of the build process can be seen doesn’t work you can disable the test of the net package by adding net to the NOTEST list in the Makefile in the map go/src/pkg . If you don’t want to run the tests, you can leave them out by running The concept of a Go project, with a view of its constituent files and packages, and where the Makefile typically plays the role of configuration file. Closely related is the concept of a build system:0 码力 | 629 页 | 4.85 MB | 1 年前3
 C++高性能并行编程与优化 -  课件 - 11 现代 CMake 进阶指南sudo make install • cd .. • 需要先创建 build 目录 • 切换到 build 目录 • 在 build 目录运行 cmake < 源码目录 > 生成 Makefile • 执行本地的构建系统 make 真正开始构建( 4 进程并 行) • 让本地的构建系统执行安装步骤 • 回到源码目录 现代 CMake 提供了更方便的 -B 和 --build 指令,不同平台,统一命 exe ) • 结论:从现在开始,如果在命令行操作 cmake ,请使用更方便的 -B 和 --build 命令。 // 在源码目录用 -B 直接创建 build 目录并生成 build/Makefile // 自动调用本地的构建系统在 build 里构建,即: make -C build -j4 // 调用本地的构建系统执行 install 项目的构建分为两步: • 第一步是 cmake -B build ,称为配置阶段( configure ),这时只检测环境并生成构建规则 • 会在 build 目录下生成本地构建系统能识别的项目文件( Makefile 或是 .sln ) • 第二步是 cmake --build build ,称为构建阶段( build ),这时才实际调用编译器来编译代码 • 在配置阶段可以通过 -D 设置缓存变量。第二次配置时,之前的0 码力 | 166 页 | 6.54 MB | 1 年前3 C++高性能并行编程与优化 -  课件 - 11 现代 CMake 进阶指南sudo make install • cd .. • 需要先创建 build 目录 • 切换到 build 目录 • 在 build 目录运行 cmake < 源码目录 > 生成 Makefile • 执行本地的构建系统 make 真正开始构建( 4 进程并 行) • 让本地的构建系统执行安装步骤 • 回到源码目录 现代 CMake 提供了更方便的 -B 和 --build 指令,不同平台,统一命 exe ) • 结论:从现在开始,如果在命令行操作 cmake ,请使用更方便的 -B 和 --build 命令。 // 在源码目录用 -B 直接创建 build 目录并生成 build/Makefile // 自动调用本地的构建系统在 build 里构建,即: make -C build -j4 // 调用本地的构建系统执行 install 项目的构建分为两步: • 第一步是 cmake -B build ,称为配置阶段( configure ),这时只检测环境并生成构建规则 • 会在 build 目录下生成本地构建系统能识别的项目文件( Makefile 或是 .sln ) • 第二步是 cmake --build build ,称为构建阶段( build ),这时才实际调用编译器来编译代码 • 在配置阶段可以通过 -D 设置缓存变量。第二次配置时,之前的0 码力 | 166 页 | 6.54 MB | 1 年前3
 Conan 2.1 Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169 6.6 Makefile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Reference for BazelToolchain. • Reference for Bazel. • Build a simple Bazel project using Conan 6.6 Makefile Conan provides different tools to help manage your projects using Make. They can be imported from Documentation, Release 2.1.0 • MakeDeps: the dependencies generator for Make, which generates a Makefile containing definitions that the Make build tool can understand. Currently, there is no MakeToolchain0 码力 | 694 页 | 4.13 MB | 1 年前3 Conan 2.1 Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169 6.6 Makefile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Reference for BazelToolchain. • Reference for Bazel. • Build a simple Bazel project using Conan 6.6 Makefile Conan provides different tools to help manage your projects using Make. They can be imported from Documentation, Release 2.1.0 • MakeDeps: the dependencies generator for Make, which generates a Makefile containing definitions that the Make build tool can understand. Currently, there is no MakeToolchain0 码力 | 694 页 | 4.13 MB | 1 年前3
 Conan 2.10 Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 6.6 Makefile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . • Build a simple Bazel project using Conan • Build a simple Bazel 7.x project using Conan 6.6 Makefile Conan provides different tools to help manage your projects using Make. They can be imported from The most relevant tools are: • MakeDeps: the dependencies generator for Make, which generates a Makefile containing definitions that the Make build tool can understand. Currently, there is no MakeToolchain0 码力 | 803 页 | 5.02 MB | 10 月前3 Conan 2.10 Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 6.6 Makefile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . • Build a simple Bazel project using Conan • Build a simple Bazel 7.x project using Conan 6.6 Makefile Conan provides different tools to help manage your projects using Make. They can be imported from The most relevant tools are: • MakeDeps: the dependencies generator for Make, which generates a Makefile containing definitions that the Make build tool can understand. Currently, there is no MakeToolchain0 码力 | 803 页 | 5.02 MB | 10 月前3
 Conan 2.6 Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180 6.6 Makefile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . • Build a simple Bazel project using Conan • Build a simple Bazel 7.x project using Conan 6.6 Makefile Conan provides different tools to help manage your projects using Make. They can be imported from The most relevant tools are: • MakeDeps: the dependencies generator for Make, which generates a Makefile containing definitions that the Make build tool can understand. Currently, there is no MakeToolchain0 码力 | 777 页 | 4.91 MB | 10 月前3 Conan 2.6 Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180 6.6 Makefile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . • Build a simple Bazel project using Conan • Build a simple Bazel 7.x project using Conan 6.6 Makefile Conan provides different tools to help manage your projects using Make. They can be imported from The most relevant tools are: • MakeDeps: the dependencies generator for Make, which generates a Makefile containing definitions that the Make build tool can understand. Currently, there is no MakeToolchain0 码力 | 777 页 | 4.91 MB | 10 月前3
共 402 条
- 1
- 2
- 3
- 4
- 5
- 6
- 41














 
 