Skip to content

Commit 2dd9ec9

Browse files
authored
Adding steps to build the project (#12)
1 parent dffaba3 commit 2dd9ec9

File tree

3 files changed

+66
-7
lines changed

3 files changed

+66
-7
lines changed

Brewfile.lock.json

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
"rebuild": 0,
88
"root_url": "https://ghcr.io/v2/homebrew/core",
99
"files": {
10+
"arm64_sequoia": {
11+
"cellar": ":any",
12+
"url": "https://ghcr.io/v2/homebrew/core/check/blobs/sha256:11f6f6c67483ebc4a230480a1b068882a8476afc52517d2d68de0ecc24ea305b",
13+
"sha256": "11f6f6c67483ebc4a230480a1b068882a8476afc52517d2d68de0ecc24ea305b"
14+
},
1015
"arm64_sonoma": {
1116
"cellar": ":any",
1217
"url": "https://ghcr.io/v2/homebrew/core/check/blobs/sha256:62db788052873713c484655c217bb221f71c794df5df63b7a68083df8805f598",
@@ -75,12 +80,12 @@
7580
"system": {
7681
"macos": {
7782
"sonoma": {
78-
"HOMEBREW_VERSION": "4.3.2",
79-
"HOMEBREW_PREFIX": "/usr/local",
83+
"HOMEBREW_VERSION": "4.3.23",
84+
"HOMEBREW_PREFIX": "/opt/homebrew",
8085
"Homebrew/homebrew-core": "api",
81-
"CLT": "15.1.0.0.1.1700200546",
82-
"Xcode": "15.1",
83-
"macOS": "14.2.1"
86+
"CLT": "15.3.0.0.1.1708646388",
87+
"Xcode": "15.4",
88+
"macOS": "14.6.1"
8489
}
8590
}
8691
}

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ ifeq ($(os),Linux)
1818
endif
1919

2020
ifeq ($(os),Darwin)
21-
test_cflags = $(flags) -I/usr/local/include
22-
test_ldflags = -L/usr/local/lib -lcheck -lm
21+
brew_prefix := $(shell brew --prefix check)
22+
test_cflags = $(flags) -I$(brew_prefix)/include
23+
test_ldflags = -L$(brew_prefix)/lib -lcheck -lm
2324
endif
2425

2526
all: $(exec) test

README.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,54 @@
11
# ERBx
2+
3+
Seamless Parsing for HTML, ERB, and more.
4+
5+
## Contributing
6+
7+
This project builds the ERBX program and its associated unit tests using a Makefile for automation. The Makefile provides several useful commands for compiling, running tests, and cleaning the project.
8+
9+
### Requirements
10+
11+
- **GCC**
12+
- **Check**: The project uses the [Check](https://libcheck.github.io/check/) library for unit testing
13+
14+
For Linux:
15+
```bash
16+
sudo apt-get install check
17+
```
18+
19+
For macOS (using Homebrew):
20+
```bash
21+
brew install check
22+
# or
23+
brew bundle
24+
```
25+
26+
### Commands
27+
28+
#### Build
29+
30+
Compiles all source files in `src/` and generates the `erbx` executable.
31+
32+
```bash
33+
make
34+
```
35+
36+
#### Test
37+
38+
Builds the test suite from files in `test/` and creates the `run_erbx_tests` executable to run the tests:
39+
40+
```bash
41+
make test && ./run_erbx_tests
42+
```
43+
44+
### Clean
45+
46+
Removes the `erbx`, `run_erbx_tests`, and all `.o` files.
47+
48+
```bash
49+
make clean
50+
```
51+
52+
## License
53+
54+
This project is licensed under the MIT License - see the [LICENSE](LICENSE.txt) file for details.

0 commit comments

Comments
 (0)