Page 1 of 1

Project source tree.

Posted: Sun Nov 06, 2011 10:06 pm
by sandras
My project is still very fresh so I'm thinking of how should the source tree be laid out. The directories should be logically placed and I don't think there should be too many levels, as it makes the navigation more difficult. I think I have to decide on the directory layout now, when there's still a small amount of files in the tree, as later, when there will be more files, it might be more difficult to change it.

So what does your project source tree look like?

For now, mine is like this.

build/
src/arch/x86-32/
src/include/
src/port/
tool/

Re: Project source tree.

Posted: Sun Nov 06, 2011 11:17 pm
by thepowersgang
Mine is a little more complex

Code: Select all

Modules/<class>/<name>
 - Kernel modules (Where class is Filesystem, Storage, Input, etc)
Kernel/arch/<arch>
 - Per-architecture code (x86, x86_64, armv7)
Kernel/vfs/
 - VFS code
Kernel/include
 - Kernel-land includes
Kernel/bin
 - Binary formats
Kernel/
 - Common kernel code
Usermode/Applications
Usermode/Libraries
Usermode/include

Re: Project source tree.

Posted: Mon Nov 07, 2011 5:23 am
by SDS
All of my projects have a similar layout

Code: Select all

proj_dir
  ├─  config               (Contains configuration details for different compilers etc.)
  ├─  doc                   
  ├─  dest                  (Built code ends up here)
  │    ├─  config 1
  │    └─ ...
  ├─  src
  │    ├─  include
  │    └─ ...
  ├─  tools                 (Tools for building/running the code etc.)
  └─  utils                  (Utilities for use in conjunction with the code).