Skip to content

Commit 2dc306d

Browse files
committed
add Makefile
1 parent b1da85c commit 2dc306d

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
minitox: minitox.c
2+
$(CC) -std=c99 -o $@ $^ -ltoxcore
3+
clean:
4+
-rm -f minitox

README.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,20 @@ start with, therefore getting familiar with the project.
1616

1717
## Build
1818

19-
The only lib required is [toxcore](https://github.com/TokTok/c-toxcore):
19+
If [toxcore](https://github.com/TokTok/c-toxcore) has been installed into system path, Use
2020

2121
```sh
22-
$ gcc -o minitox minitox.c -I $TOX_H_DIR -L $TOX_LIB_DIR -Wl,-rpath $TOX_LIB_DIR -ltoxcore
22+
make
2323
```
24+
25+
Or link it manually (assume libtoxcore.so in TOX\_LIB\_DIR, tox.h in TOX\_H\_DIR/tox):
26+
27+
```sh
28+
$ gcc -o minitox minitox.c -I TOX_H_DIR -L TOX_LIB_DIR -Wl,-rpath $TOX_LIB_DIR -ltoxcore
29+
```
30+
31+
## Config
32+
33+
To keep simple, `minitox` does not provid command line options,except for `-h` and `--help`.
34+
To change its behaviour, you are encouraged to modify the source file and rebuild. The source
35+
file has been heavily commented.

0 commit comments

Comments
 (0)