MakeFile Making

makefile demo

# Run this line when useing `make` command
# default is the target which is an output id in this makefile
# name after `:` are the dependent targets, when run this line `make` command will check if this target already exists in the makefile
# if not exists, `make` will run the dependent target line to create the target
# the second line is command area, in this area, you can run any valid command yout like, but because of it's target, we put the clang or
# gcc in the area
default: makefile
clang main.c tools.c # tools.o is an output target which is an global in this makefile
tools.o: default makefile
clang tools.c -c # app is an output target which is an global in this makefile
app: default tools.o
clang main.o tools.o
# I'm sure if you use Linux or Unix now and then, and install some applications by source code, you must be familiar with this `clean`
# We often some clean action is the area, such as `rm -rf someconffile` and so on.
# There are three brothers named `clean`, `mrproper` and 'disclean' in a single makefile
clean:
rm -rf main.o tools.o disclean: clean
rm -rf a.out

最新文章

  1. 示例开发过程记录:meteor,react,apollo
  2. 插入视频(youtube)
  3. 1071. Speech Patterns (25)
  4. Matlab中图片保存的5种方法
  5. EVA资料
  6. Linux平台块设备到字符设备(裸设备)的三种映射方式(转载)
  7. 使用自定义的item、Adapter和AsyncTask、第三方开源框架PullToRefresh联合使用实现自定义的下拉列表(从网络加载图片显示在item中的ImageView)
  8. PHP获取当前页面完整url地址,包括参数的函数
  9. Spring in action记录
  10. 输入和输出--javase中的路径
  11. 代码管理必备-----git使用上传码云
  12. C++删除文件末尾字符
  13. ReactNative调研结果
  14. Confluence 6 使用 Fail2Ban 来限制登录尝试
  15. python之itemgetter函数:对字典列表进行多键排序
  16. 008、Docker 组件如何协作(2018-12-25 周二)
  17. IOS初级:UIwindow
  18. UWP简单示例(一):快速合成音乐MV
  19. Mac下使用zsh不执行/etc/profile文件
  20. go语言基础之同级目录

热门文章

  1. android studio中配置X5 webview时的一个坑
  2. SQL 分组后拼接字符串
  3. javascript 获取iframe元素的方法
  4. 【1】循序渐进学 Zabbix :初识与基础依赖环境搭建( LNMP )
  5. GoogLeNet InceptionV2/V3/V4
  6. Android下创建一个输入法
  7. 「BZOJ 1831」「AHOI 2008」逆序对「贪心」
  8. 「洛谷P3768」简单的数学题 莫比乌斯反演+杜教筛
  9. Swift 4.0 正式发布,更快更兼容更好用
  10. Android layout布局属性、标签属性总结大全