Skip to content

Commit 6b7bfe7

Browse files
committed
update
1 parent 02c9000 commit 6b7bfe7

File tree

1 file changed

+31
-21
lines changed

1 file changed

+31
-21
lines changed

README.md

Lines changed: 31 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -87,36 +87,46 @@ for i = 0..3 {
8787
- GCC or Clang
8888
- `make`
8989

90-
### Build
91-
92-
Use the following commands to build and test the project:
90+
### 🛠️ Build
91+
92+
Use the following `make` targets to build, test, and manage the project:
93+
94+
| Command | Description |
95+
|---------------------|-----------------------------------------------------------------------------|
96+
| `make` or `make all`| Build the main `ggcode` compiler binary |
97+
| `make clean` | Remove all compiled binaries and build artifacts |
98+
| `make node` | Build the `libggcode.so` shared library for use in Node.js (via N-API) |
99+
| `make win` | Cross-compile a Windows-compatible executable (`ggcode.exe`) |
100+
| `make test` | Compile and Run all tests and display a summary |
101+
| `make tests` | Compile all unit test binaries into the `bin/` directory |
102+
---
93103

94-
| Command | Description |
95-
|---------------------|--------------------------------------------------|
96-
| `make` or `make all`| Build the main `ggcode` compiler binary |
97-
| `make tests` | Build all test binaries in the `bin/` directory |
98-
| `make test` | Run all tests and show a summary |
99-
| `make clean` | Remove build artifacts and test binaries |
104+
📦 **Output**
100105

101-
- The main binary will be named **`ggcode`** and generated in the root folder.
102-
- Test binaries are built from files matching `tests/test_*.c`.
103-
- Running `make test` will execute all tests and print a summary.
106+
- The main compiler binary is built as **`ggcode`** (or **`ggcode.exe`** on Windows) and placed in the project root.
107+
- Unit test binaries are compiled from `tests/test_*.c` and output to the `bin/` folder.
108+
- The Node.js-compatible shared library is built as **`libggcode.so`** via `make node`.
109+
- `make test` runs all available tests and outputs a unified pass/fail summary.
104110

105-
---
111+
## 🚀 Usage
106112

107-
## Usage
108-
109-
Compile and run a `.ggcode` file:
113+
To compile and run a `.ggcode` file:
110114

111115
```sh
112116
./ggcode path/to/file.ggcode
113117
```
114118

115-
**Example output:**
116-
```
117-
(EXPECT: X123 — should trigger)
118-
N10 G1 X123
119-
```
119+
### 🖱️ Double-Click or Run from Terminal
120+
121+
- On **Linux** or **Windows**, you can launch the executable directly from the terminal:
122+
```sh
123+
./ggcode # Compiles all `.ggcode` files in the current directory
124+
./ggcode myfile.ggcode # Compiles only the specified file
125+
```
126+
127+
### 📁 Batch Compilation
128+
129+
If no file is specified, GGcode will automatically compile **all `.ggcode` files** in the current directory.
120130

121131
---
122132

0 commit comments

Comments
 (0)