当前位置:网站首页>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.备注
之前的错了,我真的服了
边栏推荐
- Machine Learning - Processing of Text Labels for Classification Problems (Feature Engineering)
- 图像形变(插值方法)
- MNIST手写数字识别 —— 从零构建感知机实现二分类
- latex-写论文时一些常用设置
- 度量学习(Metric learning、损失函数、triplet、三元组损失、fastreid)
- 中国联通、欧莱雅和钉钉都在争相打造的秘密武器?虚拟IP未来还有怎样的可能
- 基于BiGRU和GAN的数据生成方法
- [CV-Learning] Linear Classifier (SVM Basics)
- Copy攻城狮的年度之“战”|回顾2020
- The second official example analysis of the MOOSE platform - about creating a Kernel and solving the convection-diffusion equation
猜你喜欢

Pytest常用插件

【深度学习日记】第一天:Hello world,Hello CNN MNIST

PyTorch

浅谈外挂常识和如何防御

Copy Siege Lions "sticky" to AI couplets

How to get started with MOOSE platform - an example of how to run the official tutorial
![[CV-Learning] Linear Classifier (SVM Basics)](/img/94/b48e34b2c215ca47f8ca25ce97547e.png)
[CV-Learning] Linear Classifier (SVM Basics)

动手学深度学习_softmax回归

【论文阅读】Multi-View Spectral Clustering with Optimal Neighborhood Laplacian Matrix

YOLOV4流程图(方便理解)
随机推荐
0, deep learning 21 days learning challenge 】 【 set up learning environment
TensorFlow2 study notes: 8. tf.keras implements linear regression, Income dataset: years of education and income dataset
光条中心提取方法总结(一)
MFC读取点云,只能正常显示第一个,显示后面时报错
度量学习(Metric learning、损失函数、triplet、三元组损失、fastreid)
【论文阅读】Mining Cross-Image Semantics for Weakly Supervised Semantic Segmentation
MNIST Handwritten Digit Recognition - Lenet-5's First Commercial Grade Convolutional Neural Network
Vision Transformer 论文 + 详解( ViT )
[Deep Learning Diary] Day 1: Hello world, Hello CNN MNIST
Comparison of oracle's number and postgresql's numeric
PCL窗口操作
Copy攻城狮的年度之“战”|回顾2020
双向LSTM
关于DG(域泛化)领域的PCL方法的代码实例
Use of double pointers
MAE 论文《Masked Autoencoders Are Scalable Vision Learners》
2020-10-29
[Deep Learning 21 Days Learning Challenge] Memo: What does our neural network model look like? - detailed explanation of model.summary()
Data reading in yolov3 (1)
Introduction of linear regression 01 - API use cases