Motion-Matching icon indicating copy to clipboard operation
Motion-Matching copied to clipboard

Again Makefile for build in Linux ::)

Open blogdron opened this issue 3 years ago • 4 comments

Use make build_depends && make mmatching && make run

CC=g++
INCLUDE_DIR = -I./
INCLUDE_DIR+= -I./depends/raylib/raylib/include
INCLUDE_DIR+= -I./depends/raygui/src
LIBRARY_DIR = -L./depends/raylib/raylib
LIBRARY_DIR+= -L./depends/raylib/raylib/external/glfw/src
LIBRARY_LINK = -lraylib -lglfw3 -ldl -pthread
BUILD_DEP = $(INCLUDE_DIR) $(LIBRARY_DIR) $(LIBRARY_LINK)

all: mmatching

clean:
	-rm mmatching

mmatching:
	$(CC) controller.c -o $@ $(BUILD_DEP)

run:
	./mmatching;



build_depends:
	mkdir -p depends/raygui
	mkdir -p depends/raylib
	git clone --depth 1 https://github.com/raysan5/raylib.git depends/raylib
	git clone --depth 1 https://github.com/raysan5/raygui depends/raygui
	cd depends/raylib && cmake . && make

patch-back:
	mv controller.old.c controller.c


.SILENT: clean

P.S.:

Im not have gamepad :( If you don't, then you can apply a patch. Only move and zoom works. The rest I did not touch. Basic keyboard support -> https://gist.github.com/blogdron/2a14307a34112f8d605ee2198855b8af

wasd move key pad 1 zoom in key pad 2 zoom out You need to apply a patch for it. Maybe it will be useful to someone

blogdron avatar Oct 21 '21 12:10 blogdron

My xbox one controller didn't work ootb, but I'm not sure if it should on Linux :) -- appears to be related to either raylib's input system or more likely glfw's gamepad bindings.

bmahlbrand avatar Oct 21 '21 21:10 bmahlbrand

@bmahlbrand Follow the patch link, apply it to get the ability to control the character from keyboard. If you do not know how to apply patches, then simply remove the red lines from the source and add the green ones manually and rebuild the source.

Or check this https://packages.debian.org/sid/xboxdrv As far as I understand, this controller will only work after some actions

blogdron avatar Oct 22 '21 08:10 blogdron

There is something missing in the last line.

It should be something like this.

.SILENT:clean

bbagwang avatar Nov 07 '21 14:11 bbagwang

@bbagwang thanks ::)

blogdron avatar Nov 07 '21 16:11 blogdron