mirror of
https://github.com/dexoron/dcr.git
synced 2026-10-21 19:49:36 +00:00
- Updated build and run commands to accept a --target option for specifying target platforms. - Enhanced documentation to include cross-compilation usage and supported targets. - Modified configuration to allow target-specific settings and toolchains. - Introduced a new test command to run project tests with specified profiles and targets. - Improved handling of target directories and output structure for different platforms. - Added support for multiple targets in the configuration file. - Implemented inheritance for workspace and dependencies based on target and profile.
41 lines
1.1 KiB
Markdown
41 lines
1.1 KiB
Markdown
# Project structure
|
|
|
|
## Minimal project
|
|
|
|
```text
|
|
project/
|
|
- dcr.toml
|
|
- src/
|
|
- - main.c
|
|
```
|
|
|
|
## Typical generated/optional files
|
|
|
|
```text
|
|
project/
|
|
- dcr.toml
|
|
- dcr.lock
|
|
- src/
|
|
- - ... source files ...
|
|
- target/
|
|
- - debug/
|
|
- - - obj/
|
|
- - - deps/
|
|
- - release/
|
|
- - - obj/
|
|
- - - deps/
|
|
```
|
|
|
|
## Meaning
|
|
|
|
- `dcr.toml`: main project configuration.
|
|
- `dcr.lock`: generated lock file for resolved path dependencies.
|
|
- `src/`: recursively scanned source directory.
|
|
- `target/<target>/<profile>/obj/`: cached object files for incremental rebuild (where `<target>` is `native` or target triple).
|
|
- `target/<target>/<profile>/deps/`: synchronized copies of path dependencies.
|
|
- `target/<target>/<profile>/<name>` (or `.exe` on Windows): output for `kind = "bin"`.
|
|
- `target/<target>/<profile>/lib<name>.a` (or `<name>.lib` on Windows): output for `kind = "staticlib"`.
|
|
- `target/<target>/<profile>/lib<name>.so` (or `.dylib` on macOS, `<name>.dll` on Windows): output for `kind = "sharedlib"`.
|
|
|
|
If `build.target` is set, the final artifact is written to that custom directory, while object cache still stays in `target/<target>/<profile>/obj`.
|