Change README
This commit is contained in:
parent
bde16591c5
commit
15d7304baf
2 changed files with 10 additions and 9 deletions
15
README.md
15
README.md
|
|
@ -28,6 +28,13 @@ By default 3 targets can be used `make` (or `make all` as usual default of makef
|
||||||
**Be careful** : `clean` will delete the object and binary output directories defined in `make.py`.
|
**Be careful** : `clean` will delete the object and binary output directories defined in `make.py`.
|
||||||
|
|
||||||
|
|
||||||
|
**Example :** from the root folder of a project :
|
||||||
|
|
||||||
|
```
|
||||||
|
git submodule add https://gitlab.com/corentin-pro/umake.git && cp umake/make* .
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## How it works
|
## How it works
|
||||||
|
|
||||||
### Project layout
|
### Project layout
|
||||||
|
|
@ -35,19 +42,13 @@ By default 3 targets can be used `make` (or `make all` as usual default of makef
|
||||||
µmake expects all the header and source files to be place in a directories specified in the configuration (in `make.py`).
|
µmake expects all the header and source files to be place in a directories specified in the configuration (in `make.py`).
|
||||||
Object files and final binaries are outputed also in directories specified in the configuration but objects files in `debug` and `release` (default) are separated.
|
Object files and final binaries are outputed also in directories specified in the configuration but objects files in `debug` and `release` (default) are separated.
|
||||||
|
|
||||||
The separation of objects files is meant to switch mode quickly (only binaries are rebuilt).
|
The separation of object/release objects files is meant to avoid rebuilding the whole project after debugging a single file.
|
||||||
|
|
||||||
To determine if a source file needs to be recompiled an hash is saved. The hashed are saved in a JSON file at the root of the object files directory (there are in fact 2 seperate files respectively in `debug` oand `release`).
|
To determine if a source file needs to be recompiled an hash is saved. The hashed are saved in a JSON file at the root of the object files directory (there are in fact 2 seperate files respectively in `debug` oand `release`).
|
||||||
|
|
||||||
If any header file changes every source files will be recompiled to avoid any issue (hence the small or medium-size project target for this tool). This could be address in the future if needed.
|
|
||||||
|
|
||||||
|
|
||||||
### Caveats
|
### Caveats
|
||||||
|
|
||||||
* Header files dependencies is not implemented (any change triggers all compilation)
|
|
||||||
|
|
||||||
* Knowing python is recommended to understand the tool for any usage above configuration change.
|
* Knowing python is recommended to understand the tool for any usage above configuration change.
|
||||||
|
|
||||||
* Targets management is not yet implemented (building all binaries), this can be easily address knowing python. A generic solution should be possible in the future.
|
|
||||||
|
|
||||||
* Template configuration is meant for C++ files (cpp/hpp) for now.
|
* Template configuration is meant for C++ files (cpp/hpp) for now.
|
||||||
|
|
|
||||||
4
make.py
4
make.py
|
|
@ -8,11 +8,11 @@ from umake import make
|
||||||
|
|
||||||
class Config:
|
class Config:
|
||||||
CC = 'g++' # Compiler to call
|
CC = 'g++' # Compiler to call
|
||||||
APPS = ['app_name'] # Output binaries (need to be found as .cpp directly in SOURCE_DIR)
|
APPS = ['app_name'] # Output binaries (path to source without extension)
|
||||||
IGNORE_APPS = []
|
IGNORE_APPS = []
|
||||||
JOB_COUNT = int(os.cpu_count() * 0.8) # Concurent jobs (multi-processing)
|
JOB_COUNT = int(os.cpu_count() * 0.8) # Concurent jobs (multi-processing)
|
||||||
|
|
||||||
BIN_DIR = Path('bin') # Output directory (binaries)
|
BIN_DIR = Path('bin') # Output directory (binaries)
|
||||||
INCLUDE_DIR = Path('include') # Include directory (header files)
|
INCLUDE_DIR = Path('include') # Include directory (header files)
|
||||||
OBJECT_DIR = Path('obj') # Temporary directory (object files)
|
OBJECT_DIR = Path('obj') # Temporary directory (object files)
|
||||||
SOURCE_DIR = Path('src') # Source directories
|
SOURCE_DIR = Path('src') # Source directories
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue