2011-12-15 79 views
18

我一直想知道是否有C项目的默认目录布局。你知道,我应该放哪些文件夹等。是否有C项目默认目录布局?

所以我已经在SourceForge下载了很多项目的源代码,它们都是互不相同的。 一般来说,我发现了更多或更少的这种结构:

/project   (root project folder, has project name) 
    | 
    |____/bin  (the final executable file) 
    | 
    | 
    |____/doc  (project documentation) 
    | | 
    | |____/html (documentation on html) 
    | | 
    | |____/latex (documentation on latex) 
    | 
    | 
    |____/src  (every source file, .c and .c) 
    | | 
    | |____/test (unit testing files) 
    | 
    | 
    |____/obj  (where the generated .o files will be) 
    | 
    | 
    |____/lib  (any library dependences) 
    | 
    | 
    |____BUGS  (known bugs) 
    | 
    |____ChangeLog (list of changes and such) 
    | 
    |____COPYING  (project license and warranty info) 
    | 
    |____Doxyfile (Doxygen instructions file) 
    | 
    |____INSTALL  (install instructions) 
    |  | 
    |____Makefile (make instructions file) 
    | 
    |____README  (general readme of the project) 
    | 
    |____TODO  (todo list) 

是否有一个默认标准的地方?

编辑:对不起,真的。我意识到推荐的C项目目录文件有很多类似的问题。但是我看到有人说他们认为最好。我正在寻找一种标准,人们通常遵循的标准。

相关问题:

C - Starting a big project. File/Directory structure and names. Good example required

Folder structure for a C project

File and Folder structure of a App/Project based in C

Project Organization in C Best Practices

+1

我怀疑你拥有的是如何接近标准,因为你会发现。 – NPE 2011-12-15 16:19:32

+2

所以我想我会把它记录下来,并使之成为正式的默认值! Muhahaha>:D – alexdantas 2011-12-15 16:57:20

回答

9

我会说 “不”,和你的经验证据似乎支持这一点。

我通常感到困惑对周围当我需要doc/docs/之间做出选择......