Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Again Makefile for build in Linux ::) #1

Open
blogdron opened this issue Oct 21, 2021 · 4 comments
Open

Again Makefile for build in Linux ::) #1

blogdron opened this issue Oct 21, 2021 · 4 comments

Comments

@blogdron
Copy link

blogdron commented Oct 21, 2021

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

@bmahlbrand
Copy link

bmahlbrand commented Oct 21, 2021

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.

@blogdron
Copy link
Author

@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

@bbagwang
Copy link

bbagwang commented Nov 7, 2021

There is something missing in the last line.

It should be something like this.

.SILENT:clean

@blogdron
Copy link
Author

blogdron commented Nov 7, 2021

@bbagwang thanks ::)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants