Skip to content

Commit 654e56d

Browse files
committed
style: Update Readme
1 parent cb7f394 commit 654e56d

1 file changed

Lines changed: 43 additions & 14 deletions

File tree

README.md

Lines changed: 43 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Modern C++ Makefile Template
22

33
[![Make](https://img.shields.io/badge/Build-Make-6D00CC?style=flat&logo=cmake&logoColor=white)](https://www.gnu.org/software/make/)
4-
![Platform](https://img.shields.io/badge/Platform-Windows%20%7C%20Linux-lightgrey?style=flat)
4+
![Platform](https://img.shields.io/badge/Platform-Windows%20%7C%20Linux%20%7C%20macOS-lightgrey?style=flat)
55
[![C](https://img.shields.io/badge/Language-C-A8B9CC?style=flat&logo=c)](<https://en.wikipedia.org/wiki/C_(programming_language)>)
66
[![C++](https://img.shields.io/badge/Language-C%2B%2B-00599C?style=flat&logo=cplusplus&logoColor=white)](https://isocpp.org/)
77
![Status](https://img.shields.io/badge/Status-Stable-success?style=flat)
@@ -11,26 +11,29 @@
1111
[![GCC](https://img.shields.io/badge/Build-GCC-000000?style=flat&logo=gnu&logoColor=white)](https://gcc.gnu.org/)
1212

1313
A clean, lightweight, and cross-platform **Makefile** for C++ projects.
14-
Supports Windows (**MinGW-w64/MSYS2**), **Linux**, and **macOS** (Experimental) with minimal configuration.
14+
Supports Windows (**MinGW-w64/MSYS2**), **Linux**, and **macOS** with minimal configuration.
1515

1616
Designed to be simple, readable, and easy to extend, ideal for game engines, tools, small-to-medium applications, learning projects, or as a starting point.
1717

1818
![Demo](./assets/demo.gif)
1919

2020
## ⭐ Features
2121

22-
- Debug & Release configurations
23-
- Architecture-specific optimization (`-march=native` by default)
24-
- Dependency tracking with `.d` files
25-
- Assembly generation (`make asm`) and binary disassembly (`make disasm`)
26-
- Multi-core parallel builds support with clean handling
22+
-**Cross-Platform**: Windows, Linux, macOS with automatic detection
23+
-**Debug & Release**: Configurations with proper optimization levels
24+
-**Architecture Optimization**: Architecture-specific optimization (`-march=native` by default)
25+
-**Dependency Tracking**: Automatic `.d` file generation
26+
-**Assembly Output**: Generate assembly files (`make asm`) and disassembly (`make disasm`)
27+
-**Parallel Builds**: Multi-core compilation support with automatic verbosity reduction
28+
-**Improved UI**: Better build output with status indicators
29+
-**Two Templates**: Basic (simple) and Advanced (feature-rich)
2730

2831
## 🚩 Quick Start - Run the Examples
2932

3033
In the root directory are a main **Makefile** for building two simple examples:
3134

3235
- **Spinning ASCII Donut**: A terminal-based 3D donut animation (in `examples/donut-basic/`)
33-
- **ImGui + GLFW Demo**: A graphical window using ImGui and GLFW (in`examples/ImGui/`)
36+
- **ImGui + GLFW Demo**: A graphical window using ImGui and GLFW (in `examples/ImGui/`)
3437

3538
### Clone the repository
3639

@@ -41,17 +44,37 @@ cd Basic-Makefile-Template
4144

4245
### Steps to build and run the examples:
4346

44-
```Bash
47+
```bash
4548
# Option 1: View the spinning ASCII donut (terminal animation)
4649
make run-donut
4750

4851
# Option 2: Open the ImGui window (graphical demo with GLFW)
4952
make run-imgui
53+
54+
# Option 3: See available examples
55+
make list
56+
57+
# Option 4: Get help
58+
make help
5059
```
5160

5261
**Note**: To run the ImGui example, copy the required `glfw3.dll` from the `lib/` folder to the `build/app/` directory after building.
5362

54-
> If you want to know more commands type in the terminal `make help`
63+
**For help**: Type `make help` in the terminal to see all available commands.
64+
65+
## 📁 Build Output Structure (v1.0.3+)
66+
67+
```
68+
project/
69+
├── build/
70+
│ ├── app/ ← Executables
71+
│ ├── obj/ ← Object files (.o)
72+
│ ├── dep/ ← Dependency files (.d)
73+
│ └── asm/ ← Assembly files (.s) and disassembly
74+
└── src/
75+
```
76+
77+
> **Note**: In v1.0.2 and earlier, executables were in `build/bin/`. Update scripts if needed.
5578
5679
## Main Commands
5780

@@ -163,7 +186,7 @@ MyProject/
163186
│ └── myproject/
164187
├── lib/ # optional: .a, .lib, .dll files
165188
├── build/
166-
│ ├── bin/ # final executable
189+
│ ├── app/ # final executable
167190
│ ├── obj/ # object files
168191
│ ├── dep/ # .d dependency files
169192
│ └── asm/ # assembly & disassembly output
@@ -183,6 +206,11 @@ MyProject/
183206
- `make`
184207
- Dev packages depending on your project (e.g., `build-essential`, `libglfw3-dev`, `libgl1-mesa-dev`)
185208

209+
### 🍎 macOS
210+
211+
- Xcode Command Line Tools: `xcode-select --install`
212+
- Homebrew packages (optional): `brew install gcc clang`
213+
186214
### 🔧 Optional Tools
187215

188216
- `objdump` (for `make disasm`)
@@ -194,14 +222,15 @@ MyProject/
194222
- **Linking errors on Linux** → Install missing dev packages (e.g., **libglfw3-dev** on **Ubuntu/WSL**)
195223
- **`make` not found on Windows** → Use `mingw32-make` (included with **MinGW-w64**).
196224
- **No rule to make target** → Verify source files exist in `src/` (or added folders)
197-
- **Sanitizers not working on Windows** → Disabled by design (partial support in **_MinGW_**)
225+
- **Sanitizers not working on Windows** → Disabled by design (partial support in **MinGW**)
198226
- **Double slashes in paths** → Usually harmless; caused by empty variables in some shells
199227
- **Colors broken in CI** → Parallel mode auto-disables fancy output
200228
- **Too much output with `-j`** → Use `-jN` `-s` or redirect to log
229+
- **`clear` command not found (rare)** → On some Windows shells, fallback to `cls` happens automatically
201230

202-
This project has been primarily developed and tested on **Windows** and **Linux/WSL**.
231+
---
203232

204-
Support for **macOS** is still experimental and may present unexpected behavior.
233+
**Note**: This project has been primarily developed and tested on **Windows** and **Linux/WSL**. Support for **macOS** is not guaranteed and may require adjustments.
205234

206235
If you encounter any issues, platform-specific bugs, or inconsistencies, **your feedback is extremely valuable.** 🙏
207236

0 commit comments

Comments
 (0)