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