diff options
author | Oxore <oxore@protonmail.com> | 2018-12-06 04:50:12 +0300 |
---|---|---|
committer | Oxore <oxore@protonmail.com> | 2018-12-06 04:50:12 +0300 |
commit | 0813c5e414de517ff0fef6cc9eedcb4d512f4fe8 (patch) | |
tree | 49d492f6d835163378341c37da62596ba92db4fb | |
parent | e3614f6eef762ca0c2e14736c8a20760c6d5661b (diff) |
Add prefix libs support in the Makefile
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | README.md | 22 |
2 files changed, 22 insertions, 3 deletions
@@ -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) @@ -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: |