当前位置:网站首页>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.备注
之前的错了,我真的服了
边栏推荐
- 如何用Pygame制作简单的贪吃蛇游戏
- 2020-10-29
- target has libraries with conflicting names: libcrypto.a and libssl.a.
- 度量学习(Metric learning)—— 基于分类损失函数(softmax、交叉熵、cosface、arcface)
- [Deep Learning 21 Days Learning Challenge] 1. My handwriting was successfully recognized by the model - CNN implements mnist handwritten digit recognition model study notes
- Lee‘s way of Deep Learning 深度学习笔记
- 【CV-Learning】Image Classification
- 在AWS-EC2中安装Minikube集群
- Copy攻城狮信手”粘“来 AI 对对联
- MFC 打开与保存点云PCD文件
猜你喜欢

典型CCN网络——efficientNet(2019-Google-已开源)

度量学习(Metric learning)—— 基于分类损失函数(softmax、交叉熵、cosface、arcface)

MAE 论文《Masked Autoencoders Are Scalable Vision Learners》

No matching function for call to ‘RCTBridgeModuleNameForClass‘

Golang environment variable settings (2)--GOMODULE & GOPROXY

Copy攻城狮5分钟在线体验 MindIR 格式模型生成

Use of double pointers

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

Amazon Cloud Technology Build On 2022 - AIot Season 2 IoT Special Experiment Experience

MNIST手写数字识别 —— Lenet-5首个商用级别卷积神经网络
随机推荐
Data reading in yolov3 (1)
TensorFlow2 study notes: 8. tf.keras implements linear regression, Income dataset: years of education and income dataset
Thunderbolt turns off automatic updates
浅谈游戏音效测试点
代码庆端午--粽你心意
动手学深度学习_卷积神经网络CNN
亚马逊云科技Build On-Amazon Neptune基于知识图谱的推荐模型构建心得
Deep Learning Theory - Initialization, Parameter Adjustment
[Copy Siege Lion Log] Flying Pulp Academy Intensive Learning 7-Day Punch Camp-Study Notes
Attention Is All You Need(Transformer)
0, deep learning 21 days learning challenge 】 【 set up learning environment
强化学习中,Q-Learning与Sarsa的差别有多大?
浅谈外挂常识和如何防御
投稿相关
latex-写论文时一些常用设置
空洞卷积
审稿意见回复
学习资料re-id
AWS使用EC2降低DeepRacer的训练成本:DeepRacer-for-cloud的实践操作
2020-10-19