当前位置: 技术问答>linux和unix
FreeBSD下C++语言工程文件的编译问题
来源: 互联网 发布时间:2015-01-28
本文导语: 我刚接触FreeBSD系统,可以编译单独的文件,却无法组织多文件的编译,比如在Windows下以.prj组织工程文件编译,在FreeBSD下用什么方式呢?希望能详细一点!谢谢! | makefile基本上是一个sheel ...
我刚接触FreeBSD系统,可以编译单独的文件,却无法组织多文件的编译,比如在Windows下以.prj组织工程文件编译,在FreeBSD下用什么方式呢?希望能详细一点!谢谢!
|
makefile基本上是一个sheel
目标: 依赖
实现
proc: proc.o
cc -c proc proc.o
目标: 依赖
实现
proc: proc.o
cc -c proc proc.o
|
This is a simple GNU make guide. Hope it will be helpful. It you need the English ver., I will email you or you can find it from web.
http://www.fanqiang.com/a4/b2/20010419/121916.html
"gcc -M or -MM" will help you to get the 目标: 依赖 relatrions. But the files organization depends on your project and you ability of controlling source code.
There are a lot of source code in FreeBSD system, which is worthy of referncing.
If you like use automake and autoconf, there should be some typical way to ask you to organize your codes. There is a 388pp English book to show that. Hehe... I didn't finish reading it.
http://www.fanqiang.com/a4/b2/20010419/121916.html
"gcc -M or -MM" will help you to get the 目标: 依赖 relatrions. But the files organization depends on your project and you ability of controlling source code.
There are a lot of source code in FreeBSD system, which is worthy of referncing.
If you like use automake and autoconf, there should be some typical way to ask you to organize your codes. There is a 388pp English book to show that. Hehe... I didn't finish reading it.
|
用make吧(没用过的话,随便拿本unix之类的书看看)
把你要编译的都在开始时列出来,然后是编译规则.
把你要编译的都在开始时列出来,然后是编译规则.