summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile3
-rw-r--r--README.md22
2 files changed, 22 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index f9a15a3..41b61b6 100644
--- a/Makefile
+++ b/Makefile
@@ -16,6 +16,7 @@ SOURCES:=$(wildcard $(SRC)/*.c)
OBJECTS:=$(SOURCES:$(SRC)/%.c=$(BUILD)/%.c.o)
DEPENDS:=$(OBJECTS:.o=.d)
+INCLUDE+=$(PREFIX)/include
INCLUDE+=include
INCLUDE+=$(MUNIT)
INCLUDE:=$(INCLUDE:%=-I%)
@@ -34,6 +35,8 @@ CFLAGS+=-g3
CFLAGS+=-O0
CFLAGS+=-MD
+LDFLAGS+=-L$(PREFIX)/lib
+LDFLAGS+=-Wl,-rpath=$(PREFIX)/lib
LDFLAGS+=$(COMMON)
LDFLAGS_TETRIS+=$(LDFLAGS)
diff --git a/README.md b/README.md
index 223fd32..ee55e5c 100644
--- a/README.md
+++ b/README.md
@@ -18,7 +18,7 @@ __Compilation and use__
Compilation:
```
-make all
+make
```
File named "tetris" is the final binary. Run it. Hit *S* to start game.
@@ -29,14 +29,30 @@ File named "tetris" is the final binary. Run it. Hit *S* to start game.
- `Space` - hard drop.
- `P` - pause.
-Cleaning:
+Force exclude producing test binary:
+```
+make NOTEST=1
+```
+
+Clean:
```
make clean
```
+__Compilation with libs in prefix__
+
+Probably your package manager does not have `SFML` and/or `CSFML` in repos.
+You can build them in prefix and then specify `PREFIX` path when running `make`:
+```
+make PREFIX=$(pwd)/deps/prefix
+```
+
+It is better to use absolute path, so you can then put produced `tetris` binary to any other place and have prefix location unchanged.
+
__Windows__
-Look at the [repo releases](https://github.com/Oxore/tetris-csfml/releases)! Now I have some windows binaries there!
+Look at the [repo releases](https://github.com/Oxore/tetris-csfml/releases)!
+Windows compilation flow currently is unsupported, but sometimes I put Windows binary releases there.
### TODO: