当前位置:网站首页>makefile基础学习
makefile基础学习
2022-08-04 05:30:00 【Btobk】
Makefile 工程文件
严格的规则,格式
1.为什么需要makefile
1)工程的配置文件,工程管理,减少工作量,多个文件汇总到一个文件,只用执行make就行
2)Make命令依赖于makefile文件,否则会提示找不到规则
3)会告诉make命令如何编辑,如何执行代码
2.格式
目标:依赖
命令
命令前面有一个tab键
*hello:hello.c
gcc hello.c-o hello
在当前目录下需要有:hello.c,makefile
引入变量机制:cc = gcc,简化流程,防止以后改编译器
Hello:hello.c
$(cc) hello.c -o hello
3.自动变量
[email protected]:代表所有目标
$<:代表第一个依赖
$^:代表所有的依赖
cc = gcc
Hello:hello.c
$(cc) $^ -o [email protected]
4.隐式规则
vim makefile
使用make执行,【-f】可以指定文件(除默认文件)【v】,【n】,【s】,【w】,【C】【help】
【clean】清除
5.模式规则
可以全部编译,也可以指定一个文件进行编译
%类似余*,每一个.c,每一个.o

6.备注
之前的错了,我真的服了
边栏推荐
- 【CV-Learning】Image Classification
- Various commands such as creating a new user in postgresql
- No matching function for call to ‘RCTBridgeModuleNameForClass‘
- WARNING: sql version 9.2, server version 11.0. Some psql features might not work.
- (TensorFlow) - detailed explanation of tf.variable_scope and tf.name_scope
- latex-写论文时一些常用设置
- 关于DG(域泛化)领域的PCL方法的代码实例
- [Introduction to go language] 12. Pointer
- PCL1.12 解决memory.h中EIGEN处中断问题
- 多层LSTM
猜你喜欢

TensorFlow2 study notes: 6. Overfitting and underfitting, and their mitigation solutions

浅谈游戏音效测试点

DeblurGAN-v2: Deblurring (Orders-of-Magnitude) Faster and Better 图像去模糊

MNIST Handwritten Digit Recognition - Lenet-5's First Commercial Grade Convolutional Neural Network

语音驱动嘴型与面部动画生成的现状和趋势

MNIST手写数字识别 —— 从零构建感知机实现二分类

Attention Is All You Need(Transformer)

MOOSE平台官方第二个例子分析——关于创建Kernel,求解对流扩散方程

Amazon Cloud Technology Build On-Amazon Neptune's Knowledge Graph-Based Recommendation Model Building Experience

Copy攻城狮5分钟在线体验 MindIR 格式模型生成
随机推荐
SQL注入详解
MNIST手写数字识别 —— 图像分析法实现二分类
MNIST手写数字识别 —— Lenet-5首个商用级别卷积神经网络
WARNING: sql version 9.2, server version 11.0. Some psql features might not work.
MNIST手写数字识别 —— 基于Mindspore快速构建感知机实现十分类
AIDL communication between two APPs
打金?工作室?账号被封?游戏灰黑产离我们有多近
Copy Siege Lion 5-minute online experience MindIR format model generation
动手学深度学习_线性回归
投稿相关
Usage of RecyclerView
详解近端策略优化
PostgreSQL schema (Schema)
Deep Adversarial Decomposition: A Unified Framework for Separating Superimposed Images
[Go language entry notes] 13. Structure (struct)
tensorRT教程——tensor RT OP理解(实现自定义层,搭建网络)
Copy Siege Lions "sticky" to AI couplets
Usage of Thread, Handler and IntentService
腾讯、网易纷纷出手,火到出圈的元宇宙到底是个啥?
图像形变(插值方法)