add readme and build script

This commit is contained in:
Gregory Gauthier 2025-12-17 17:09:38 +00:00
parent 640bc3eb41
commit f4c67ede2e
3 changed files with 40 additions and 1 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
.idea/
build/
cmake-build-debug/

27
README.md Normal file
View File

@ -0,0 +1,27 @@
# CORDLE - The C90 Version of Wordle
## Requirements
- C90 compiler (tested with gcc -std=c90)
- Standard C library
- Ncurses
## Build
```
$ ./build.sh
Building application.
Compile successful. Copying wordlists...
Build completed.
```
## Run
```
$ cd build/cordle
$ cordle
```
## Install
Just copy the `cordle` binary in the build directory to your `$PATH`. If you want to use the supplied wordlists, copy the `wordlists` directory to your binary directory as well. Or supply your own wordlist path using the command line options.

13
build.sh Normal file → Executable file
View File

@ -1,3 +1,14 @@
#!/usr/bin/env zsh
gcc -std=c90 -o cordle src/*.c -Iinclude -lncurses
mkdir -p build/cordle
echo "Building application."
gcc -std=c90 -o build/cordle/cordle src/*.c -Iinclude -lncurses
export RESULT=$?
# shellcheck disable=SC1073
if (( RESULT == 0 )); then
echo "Compile successful. Copying wordlists..."
cp -R wordlists build/cordle
echo "Build completed."
fi