Update README.md
This commit is contained in:
43
README.md
43
README.md
@@ -1,46 +1,41 @@
|
|||||||
**Basic Overview**
|
**Basic Overview**
|
||||||
This is a lightweight/dependency free C build system built entirely around standard POSIX tools. It introduces a python style virtual environment for your C projects using a simple shell script. It tracks your compiler, linker flags, and build options in a local state file without needing cmake or other heavy build generators.
|
makemake is a lightweight/dependency-free C build system built entirely around standard POSIX tools. It brings a python-style virtual environment to your C projects using a simple shell script. It tracks your compiler, linker flags, project version, and build options in a local state file without needing cmake or other heavy build generators.
|
||||||
|
|
||||||
**Example Use**
|
**Example Use**
|
||||||
To get started with a fresh project create your directory and run the initialization command.
|
To get started with a fresh project, create your directory and run the initialization command:
|
||||||
|
|
||||||
`make init`
|
`make init`
|
||||||
|
|
||||||
Next activate your virtual environment by sourcing the configuration script into your current shell session.
|
Next, activate your virtual environment by sourcing the configuration script into your current shell session:
|
||||||
|
|
||||||
`. config/activate` (or `source config/activate`) the former is simply POSIX compliant.
|
`. config/activate` (or `source config/activate` — the former is simply POSIX compliant).
|
||||||
|
|
||||||
Once you are inside the environment you can run your builds and clean up whenever you want.
|
Once you are inside the environment, you can run your builds and clean up whenever you want:
|
||||||
|
|
||||||
`make debug`
|
`make debug`
|
||||||
`make build`
|
`make build`
|
||||||
`make release`
|
|
||||||
`make clean`
|
`make clean`
|
||||||
|
|
||||||
**What Each Build Target Does**
|
**What Each Build Target Does**
|
||||||
|
|
||||||
* init sets up the required folder structure and generates the activation script
|
* **init** sets up the required folder structure and generates the activation script.
|
||||||
* debug compiles your code with debug symbols enabled and optimization turned off
|
* **debug** compiles your code using your configured debug flags (typically with debug symbols enabled and optimization turned off).
|
||||||
* build compiles your code for regular development use using your custom flags
|
* **build** compiles your code using your configured build flags (typically used for optimized production binaries).
|
||||||
* release updates the internal version timestamp and compiles an optimized production binary
|
* **clean** removes all intermediate object files, generated makefiles, and output binaries.
|
||||||
* clean removes all intermediate object files and generated makefiles
|
|
||||||
|
|
||||||
**Example env_set Commands**
|
**Example env_set Commands**
|
||||||
You can adjust your toolchain and compiler options dynamically using the `env_set` function while the environment is active.
|
You can adjust your toolchain, compiler options, and project version dynamically using the `env_set` function while the environment is active.
|
||||||
|
|
||||||
|
|
||||||
Example uses:
|
Example uses:
|
||||||
```
|
|
||||||
env_set CC cc
|
* `env_set CC cc`
|
||||||
env_set CFLAGS -std=c17 -pedantic -Wall -Wextra
|
* `env_set VERSION _v1.0.0`
|
||||||
env_set DEBUG_FLAGS -g3 -O0
|
* `env_set CFLAGS -std=c17 -pedantic -Wall -Wextra`
|
||||||
env_set RELEASE_FLAGS -O2 -DNDEBUG
|
* `env_set DEBUG_FLAGS -g3 -O0`
|
||||||
env_set LIBS -lm
|
* `env_set BUILD_FLAGS -O2 -DNDEBUG`
|
||||||
```
|
* `env_set LIBS -lm`
|
||||||
|
|
||||||
**Tips**
|
**Tips**
|
||||||
|
|
||||||
1: If you update a .h file you MUST do a `make clean` before building again otherwise the header changes will not be used.
|
1. If you update a `.h` file you MUST do a `make clean` before building again, otherwise the header changes will not be used.
|
||||||
|
2. If you remove a `.c` file, you MUST do a `make clean` or manually remove `.o` files, otherwise they will never be wiped (even if they are no longer linked, it will just waste some disk-space).
|
||||||
|
|
||||||
2: if you remove a .c file, you MUST do a `make clean` or manually remove .o files, otherwise they will never be wiped (even if they are no longer linked, it will just waste some disk-space)
|
|
||||||
Reference in New Issue
Block a user