Skip to content

Commit f770422

Browse files
committed
Updated readme, removed Makefile
1 parent 966c4ed commit f770422

2 files changed

Lines changed: 35 additions & 39 deletions

File tree

Makefile

Lines changed: 0 additions & 35 deletions
This file was deleted.

README.md

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,46 @@ The interpreter traverses the AST in breadth-first order, calling functions on i
3030

3131
## Building
3232

33-
This code is made to build on a Unix-compatible machine (sorry Windows users). Just call `make` and it will output the server binary in `bin/server`. There are no other dependencies.
33+
This code is mostly cross-platform. The Basic interactive shell is cross-platform, but the server target is currently only buildable on Unix-like systems.
3434

35-
But before that, you need to have the two folders, `bin` and `obj` present in the project directory, if not present.
35+
CMake is required to build this project. No other external libraries are needed.
36+
37+
### Steps to build
38+
39+
1. Create a "build" directory to store all the build artifacts, and cd into the directory.
40+
41+
```shell
42+
mkdir build
43+
cd build/
44+
```
45+
46+
2. Configure the project
47+
48+
```shell
49+
cmake ..
50+
```
51+
52+
3. Build the whole project
53+
54+
```shell
55+
cmake --build .
56+
```
3657

3758
## Running
3859

39-
From the repository folder, run `bin/server`. Don't run it from the bin directory, as it requires the *static* folder to be present in the pwd (You can just move one or the other so that those two are in the same directory).
60+
### Interactive shell
61+
62+
You can run the interactive shell, which is the `BasicIO` target as:
63+
64+
```shell
65+
build/BasicIO
66+
```
67+
68+
### Server
69+
70+
From the repository folder, run `build/server`. Don't run it from the build directory, as it requires the *static* folder to be present in the pwd (You can just move one or the other so that those two are in the same directory).
4071

41-
This will start an HTTP server on port `1111` (You can change this by changing `LISTEN_PORT` constant in `main.c`)
72+
This will start an HTTP server on port `1111` (You can change this by changing `LISTEN_PORT` constant in `http_server_main.c`)
4273

4374
Start a browser and head over to [http://localhost:1111/](http://localhost:1111/). It will present to you a sort-of IDE where you can type in code and execute it.
4475

0 commit comments

Comments
 (0)