当前位置:网站首页>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.备注
之前的错了,我真的服了
边栏推荐
- WARNING: sql version 9.2, server version 11.0. Some psql features might not work.
- Image-Adaptive YOLO for Object Detection in Adverse Weather Conditions
- Usage of RecyclerView
- Golang environment variable settings (2)--GOMODULE & GOPROXY
- MNIST手写数字识别 —— 图像分析法实现二分类
- [Deep Learning Diary] Day 1: Hello world, Hello CNN MNIST
- tensorRT教程——使用tensorRT OP 搭建自己的网络
- MOOSE平台使用入门攻略——如何运行官方教程的例子
- 浅谈游戏音效测试点
- Linear Regression 02---Boston Housing Price Prediction
猜你喜欢

MAE 论文《Masked Autoencoders Are Scalable Vision Learners》

【CV-Learning】线性分类器(SVM基础)

TensorFlow2 study notes: 5. Common activation functions

亚马逊云科技Build On-Amazon Neptune基于知识图谱的推荐模型构建心得

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

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

MOOSE平台使用入门攻略——如何运行官方教程的例子

【论文阅读】SPANET: SPATIAL PYRAMID ATTENTION NETWORK FOR ENHANCED IMAGE RECOGNITION

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

PyTorch
随机推荐
Pytorch问题总结
关于DG(域泛化)领域的PCL方法的代码实例
Copy Siege Lions "sticky" to AI couplets
光条中心提取方法总结(二)
PyTorch
空洞卷积
TensorRT 5 初步认识
MNIST Handwritten Digit Recognition - Lenet-5's First Commercial Grade Convolutional Neural Network
度量学习(Metric learning)—— 基于分类损失函数(softmax、交叉熵、cosface、arcface)
Lee‘s way of Deep Learning 深度学习笔记
【代码学习】
[Deep Learning 21-Day Learning Challenge] 3. Use a self-made dataset - Convolutional Neural Network (CNN) Weather Recognition
图像合并水平拼接
[Go language entry notes] 13. Structure (struct)
SQL注入详解
[CV-Learning] Semantic Segmentation
基于BiGRU和GAN的数据生成方法
详解近端策略优化
TensorFlow2 study notes: 8. tf.keras implements linear regression, Income dataset: years of education and income dataset
JPEG2jpg