当前位置:网站首页>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.备注
之前的错了,我真的服了
边栏推荐
猜你喜欢
亚马逊云科技Build On-Amazon Neptune基于知识图谱的推荐模型构建心得
度量学习(Metric learning、损失函数、triplet、三元组损失、fastreid)
Deep Learning Theory - Initialization, Parameter Adjustment
[Deep Learning 21 Days Learning Challenge] 1. My handwriting was successfully recognized by the model - CNN implements mnist handwritten digit recognition model study notes
Halcon缺陷检测
fill_between in Matplotlib; np.argsort() function
【论文阅读】Anchor-Free Person Search
[Deep Learning 21 Days Learning Challenge] 2. Complex sample classification and recognition - convolutional neural network (CNN) clothing image classification
Copy Siege Lion 5-minute online experience MindIR format model generation
Vision Transformer 论文 + 详解( ViT )
随机推荐
Copy Siege Lions "sticky" to AI couplets
【论文阅读】Mining Cross-Image Semantics for Weakly Supervised Semantic Segmentation
动手学深度学习_线性回归
How to grow into a senior engineer?
学习资料re-id
Image-Adaptive YOLO for Object Detection in Adverse Weather Conditions
Use of double pointers
MFC读取点云,只能正常显示第一个,显示后面时报错
【Copy攻城狮日志】飞浆学院强化学习7日打卡营-学习笔记
[Copy Siege Lion Log] Flying Pulp Academy Intensive Learning 7-Day Punch Camp-Study Notes
机器学习——分类问题对于文字标签的处理(特征工程)
Comparison of oracle's number and postgresql's numeric
在AWS-EC2中安装Minikube集群
Deep Learning Theory - Initialization, Parameter Adjustment
Machine Learning - Processing of Text Labels for Classification Problems (Feature Engineering)
腾讯、网易纷纷出手,火到出圈的元宇宙到底是个啥?
[Deep Learning 21-Day Learning Challenge] 3. Use a self-made dataset - Convolutional Neural Network (CNN) Weather Recognition
(导航页)OpenStack-M版-双节点手工搭建-附B站视频
DeblurGAN-v2: Deblurring (Orders-of-Magnitude) Faster and Better 图像去模糊
WARNING: sql version 9.2, server version 11.0. Some psql features might not work.