当前位置:网站首页>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.备注
之前的错了,我真的服了
边栏推荐
- 空洞卷积
- A code example of the PCL method in the domain of DG (Domain Generalization)
- Transformer
- ConnectionRefusedError: [Errno 111] Connection refused问题解决
- target has libraries with conflicting names: libcrypto.a and libssl.a.
- DeblurGAN-v2: Deblurring (Orders-of-Magnitude) Faster and Better 图像去模糊
- 基于PyTorch的FCN-8s语义分割模型搭建
- 图像形变(插值方法)
- 【CV-Learning】线性分类器(SVM基础)
- 度量学习(Metric learning、损失函数、triplet、三元组损失、fastreid)
猜你喜欢

Pytorch语义分割理解

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

中国联通、欧莱雅和钉钉都在争相打造的秘密武器?虚拟IP未来还有怎样的可能

浅谈游戏音效测试点

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

Attention Is All You Need(Transformer)

双向LSTM

Jupyter Notebook installed library;ModuleNotFoundError: No module named 'plotly' solution.

CSDN大礼包--高校圆桌派大礼包

Golang环境变量设置(二)--GOMODULE&GOPROXY
随机推荐
[CV-Learning] Convolutional Neural Network Preliminary Knowledge
TensorFlow2 study notes: 5. Common activation functions
AIDL communication between two APPs
度量学习(Metric learning)—— 基于分类损失函数(softmax、交叉熵、cosface、arcface)
2020-10-19
计算某像素点法线
Various commands such as creating a new user in postgresql
"A minute" Copy siege lion log 】 【 run MindSpore LeNet model
Linear Regression 02---Boston Housing Price Prediction
MOOSE平台官方第二个例子分析——关于创建Kernel,求解对流扩散方程
Introduction to Convolutional Neural Networks
【深度学习日记】第一天:Hello world,Hello CNN MNIST
MNIST Handwritten Digit Recognition - From Perceptrons to Convolutional Neural Networks
【CV-Learning】线性分类器(SVM基础)
TensorFlow2 study notes: 7. Optimizer
光条中心提取方法总结(二)
[Deep Learning 21 Days Learning Challenge] Memo: What does our neural network model look like? - detailed explanation of model.summary()
Golang环境变量设置(二)--GOMODULE&GOPROXY
Copy攻城狮信手”粘“来 AI 对对联
Copy Siege Lions "sticky" to AI couplets