git.strcat.st

/strcat/minitox.git/ - summarytreelogarchive

subject
add Makefile
commit
2dc306d8bb88e7ef3d0618577a122375eefe0e69
date
2018-06-25T07:15:12Z
message
diff
 Makefile  |  4 ++++
 README.md | 16 ++++++++++++++--
 2 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..3f169b8
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,4 @@
+minitox: minitox.c
+	$(CC) -std=c99 -o $@ $^ -ltoxcore
+clean:
+	-rm -f minitox
diff --git a/README.md b/README.md
index 90737cc..ef54147 100644
--- a/README.md
+++ b/README.md
@@ -16,8 +16,20 @@ start with, therefore getting familiar with the project.
 
 ## Build
 
-The only lib required is [toxcore](https://github.com/TokTok/c-toxcore):
+If [toxcore](https://github.com/TokTok/c-toxcore) has been installed into system path, Use
 
 ```sh
-$ gcc -o minitox minitox.c -I $TOX_H_DIR -L $TOX_LIB_DIR -Wl,-rpath $TOX_LIB_DIR -ltoxcore
+make
 ```
+
+Or link it manually (assume libtoxcore.so in TOX\_LIB\_DIR, tox.h in TOX\_H\_DIR/tox):
+
+```sh
+$ gcc -o minitox minitox.c -I TOX_H_DIR -L TOX_LIB_DIR -Wl,-rpath $TOX_LIB_DIR -ltoxcore
+```
+
+## Config
+
+To keep simple, `minitox` does not provid command line options,except for `-h` and `--help`.
+To change its behaviour, you are encouraged to modify the source file and rebuild. The source
+file has been heavily commented.