当前位置: 首页 > news >正文

长葛网站建设公司上海网站建设在哪

长葛网站建设公司,上海网站建设在哪,注册域名去哪个网站好,怎么查公司的邮箱目录 一、Makefile概述 二、Makefile变量 三、Makefile符号 一、Makefile格式 1. 基本格式#xff1a; targets : prerequisties [tab键]command target#xff1a;目标文件#xff0c;可以是 OjectFile#xff0c;也可以是执行文件#xff0c;还可以是一个标签 targets : prerequisties [tab键]command target目标文件可以是 OjectFile也可以是执行文件还可以是一个标签Label。prerequisite要生成那个 target 所需要的文件或是目标。command是 make 需要执行的命令。 # 可以自定义make命令在系统命令前加 会隐藏系统命令的打印(base) [rootlocalhost 03_test]# vim makefile (base) [rootlocalhost 03_test]# cat makefile debug:echo hello (base) [rootlocalhost 03_test]# make debug echo hello hello (base) [rootlocalhost 03_test]# vim makefile (base) [rootlocalhost 03_test]# cat makefile debug:echo hello (base) [rootlocalhost 03_test]# make debug hello (base) [rootlocalhost 03_test]# vim makefile (base) [rootlocalhost 03_test]# cat makefile debug:echo hellotest:echo this is a test (base) [rootlocalhost 03_test]# make test this is a test (base) [rootlocalhost 03_test]# 2. Makefile规则 make 会在当前目录下找到一个名字叫 Makefile 或 makefile 的文件如果找到它会找文件中第一个目标文件target并把这个文件作为最终的目标文件如果 target 文件不存在或是 target 文件依赖的 .o 文件(prerequities)的文件修改时间要比 target 这个文件新就会执行后面所定义的命令 command 来生成 target 这个文件如果 target 依赖的 .o 文件prerequisties也存在make 会在当前文件中找到 target 为 .o 文件的依赖性如果找到再根据那个规则生成 .o 文件 3. 伪目标 伪目标不是一个文件只是一个标签。我们要显示地指明这个“目标”才能让其生效。 伪目标取名不能和文件名重名否则不会执行命令。 为了避免 target 和 Makefile 同级目录下 文件/文件夹 重名的这种情况我们可以使用一个特殊的标记 .PHONY 来显式地指明一个目标是 伪目标向 make 说明不管是否有这个文件/文件夹这个目标就是 伪目标。 .PHONY : clean 只要有这个声明不管是否有 clean 文件/文件夹要运行 clean 这个目标只有make clean 这个命令。 二、Makefile变量 # 变量的定义需要给初值cpp : src/main.cpp obj : objs/main.o # 变量的引用用()或{}$(obj) : ${cpp}g -c $(cpp) -o ${obj}compile: $(obj) # 预定义变量$ 目标(targe)的完整名称 $ 第一个依赖项(prerequisties)的名称 ^ 所有依赖项(prerequisties)的名称 (base) [rootlocalhost 04_test]# ls makefile objs src (base) [rootlocalhost 04_test]# ls src/ main.cpp (base) [rootlocalhost 04_test]# ls objs/ (base) [rootlocalhost 04_test]# vim makefile (base) [rootlocalhost 04_test]# cat makefile cpp : src/main.cpp obj : objs/main.o$(obj) : $(cpp)g -c $(cpp) -o $(obj)compile: $(obj)debug:echo $(cpp)echo $(obj)clean:rm -rf objs.PHONY: debug clean (base) [rootlocalhost 04_test]# make compile g -c src/main.cpp -o objs/main.o (base) [rootlocalhost 04_test]# ls objs/ main.o (base) [rootlocalhost 04_test]# make debug src/main.cpp objs/main.o (base) [rootlocalhost 04_test]# make clean rm -rf objs (base) [rootlocalhost 04_test]# ls makefile src (base) [rootlocalhost 04_test]# 三、Makefile符号 # 可变赋值符 (base) [rootlocalhost 05_test]# vim makefile (base) [rootlocalhost 05_test]# cat makefile HOST_ARCH aarch64 TARGET_ARCH $(HOST_ARCH)# ... # # ...HOST_ARCH amd64debug:echo ${TARGET_ARCH} (base) [rootlocalhost 05_test]# make debug amd64 (base) [rootlocalhost 05_test]# # 立即赋值符 :(base) [rootlocalhost 05_test]# vim makefile (base) [rootlocalhost 05_test]# cat makefile HOST_ARCH : aarch64 TARGET_ARCH : $(HOST_ARCH)# ... # # ...HOST_ARCH : amd64debug:echo ${TARGET_ARCH} (base) [rootlocalhost 05_test]# make debug aarch64 (base) [rootlocalhost 05_test]# # 默认赋值符 ? # 若该变量已定义则不做任何操作 # 若该变量未定义则求值并分配(base) [rootlocalhost 05_test]# vim makefile (base) [rootlocalhost 05_test]# cat makefile HOST_ARCH aarch64 HOST_ARCH ? amd64 TARGET_ARCH ? amd64debug:echo ${HOST_ARCH}echo ${TARGET_ARCH} (base) [rootlocalhost 05_test]# make debug aarch64 amd64 (base) [rootlocalhost 05_test]# # 累加 (base) [rootlocalhost 05_test]# vim makefile (base) [rootlocalhost 05_test]# cat makefile include_path /usr/include CXXFLAGS : -m64 -fPIC -g -00 -stdc11 -w -fopenmp CXXFLAGS $(include_path)debug:echo ${CXXFLAGS} (base) [rootlocalhost 05_test]# make debug -m64 -fPIC -g -00 -stdc11 -w -fopenmp /usr/include (base) [rootlocalhost 05_test]# # 续行符 /(base) [rootlocalhost 05_test]# vim makefile (base) [rootlocalhost 05_test]# cat makefile LDLIBS : cudart opencv_core \gomp nvinfer protobuf cudnn pthread \cublas nvcaffe_parser nvinfer_plugin debug:echo ${LDLIBS} (base) [rootlocalhost 05_test]# make debug cudart opencv_core gomp nvinfer protobuf cudnn pthread cublas nvcaffe_parser nvinfer_plugin (base) [rootlocalhost 05_test]# # 通配符 * %# *: 通配符表示匹配任意字符串可以用在目录名或文件名中 # %: 通配符表示匹配任意字符串并将匹配到的字符串作为变量使用
http://www.dnsts.com.cn/news/37217.html

相关文章:

  • 网站由哪三部分组成网络运营和网站运营
  • 自己怎么做视频网站wordpress 多重排序
  • 上海技术公司做网站百度一下京东
  • 写网站的教程包含导航栏至少包含三个布局
  • 微信分身网页版网址网站 seo
  • 做静态网站的软件唐山地区网站开发公司
  • 网站权重等级wordpress插件导出
  • 徐州新站百度快照优化网站 版本 白名单 wap 解析
  • 怎样使用wordpress无锡做网站优化
  • WordPress蜘蛛爬行插件泉州seo关键词排名
  • 怎么提高网站打开速度公司起名大全免费版
  • 学校网站建设费用wordpress文章一部分加密
  • 做网站如何选择颜色电子商务网站建设与管理的背景
  • 做网站设计需要学会哪些信阳做网站的
  • 建设营销网站的四个步骤找兼职h5网站开发人员
  • 蓟县网站建设流媒体视频网站建设
  • 专门做拼花网站php如何自学做网站
  • 搭建cms网站做网站制作怎么样
  • 企业网站优化要多少钱synology建设网站
  • 企业怎么建网站临泉网站建设
  • 网站建设确认报告建一个类似京东的网站
  • 网站的控制面板门户网站的营销方式
  • 用rp怎样做网站成都网站商城建设
  • 重庆网站搭建哪里可以做定制图片软件
  • 用wordpress 帮客户建站计算机就业岗位有哪些
  • 正规的网站建设专业公司wordpress页面显示错乱
  • 郑州市建设厅官方网站衡阳seo快速排名
  • 网站制作费用属于广告费吗各大网站注册记录
  • 特色设计网站推荐小说网站防盗做的好处
  • 网站群管理平台建设湖北省住房与城乡建设厅网站