linux中makefile与gcc编译的比较
2017-08-29 09:28
169 查看
makefile
先查看helloworld.c和Makefile的内容(注意,TAB用在命令前面), 再删掉编译后的文件hello
gcc编译
先查看helloworld.c和Makefile的内容(注意,TAB用在命令前面), 再删掉编译后的文件hello
root@ubuntu:~/lesson/chap1/1-1# more helloworld.c Makefile :::::::::::::: helloword.c :::::::::::::: #include<stdio.h> int main() { printf("hello world\n"); return 0; } :::::::::::::: Makefile :::::::::::::: hello:helloworld.c gcc -o hello helloworld.c clean: rm hello root@ubuntu:~/lesson/chap1/1-1# make gcc -o hello helloworld.c root@ubuntu:~/lesson/chap1/1-1# ls hello helloworld.c Makefile root@ubuntu:~/lesson/chap1/1-1# make clean rm hello root@ubuntu:~/lesson/chap1/1-1#
gcc编译
root@ubuntu:~/lesson/chap1/1-1# gcc helloword.c root@ubuntu:~/lesson/chap1/1-1# ls a.out helloword.c Makefile root@ubuntu:~/lesson/chap1/1-1#
相关文章推荐
- Linux下GCC和Makefile实例(从GCC的编译到Makefile的引入)
- Linux GCC 开发入门(一) -- 使用makefile 命令行编译
- Linux下GCC和Makefile实例(从GCC的编译到Makefile的引入)
- Linux下GCC和Makefile实例(从GCC的编译到Makefile的引入)
- Linux学习篇------gcc编译及Makefile基本知识
- Linux下GCC和Makefile实例(从GCC的编译到Makefile的引入) 转
- Linux下GCC和Makefile实例(从GCC的编译到Makefile的引入)
- Linux下GCC和Makefile实例(从GCC的编译到Makefile的引入)
- Linux下GCC和Makefile实例(从GCC的编译到Makefile的引入)
- 在Linux中使用VS Code编译调试C++项目(gcc/g++、Makefile入门、vs code)
- Linux下GCC和Makefile实例(从GCC的编译到Makefile的引入)
- Linux GCC编译、gdb调试、makefile、动态链接库的创建
- Linux中gcc,g++常用编译选项以及makefile的编写
- Linux上gcc编译常见错误解析
- Ubuntu12.04嵌入式交叉编译环境arm-linux-gcc搭建过程,图解
- linux-gcc 编译时头文件和库文件搜索路径(转)
- Linux 环境开发--gcc 编译以及动态连接
- Linux中编写自动编译的makefile的方法,以及详细解析。
- codeblocks交叉编译ARM-LINUX-GCC生成能够在ARM中运行的文件
- 【linux】——gcc编译命令【转】