Fix: Wayland compilation

This commit is contained in:
PedroEdiaz
2024-10-17 12:56:33 -06:00
parent 502ff0daeb
commit 6218c5d576

View File

@@ -15,6 +15,17 @@ CFLAGS = \
-I./ext/glfw/include \ -I./ext/glfw/include \
-Wall -Wno-unused-function -std=c99 \ -Wall -Wno-unused-function -std=c99 \
WAYLAND-LIB = \
xdg-shell \
relative-pointer-unstable-v1 \
xdg-decoration-unstable-v1 \
pointer-constraints-unstable-v1 \
viewporter \
idle-inhibit-unstable-v1 \
fractional-scale-v1 \
xdg-activation-v1 \
wayland
help: help:
@echo "Para compilar el proyecto a tu sistema operativo" @echo "Para compilar el proyecto a tu sistema operativo"
@echo "porfavor usa uno de los siguientes comandos:" @echo "porfavor usa uno de los siguientes comandos:"
@@ -51,8 +62,14 @@ cocoa: $(OBJ)
$(MAKE) BKN=_GLFW_COCOA libglfw.so $(MAKE) BKN=_GLFW_COCOA libglfw.so
$(CC) -framework OpenGL -o $(BIN) $(OBJ) -L. -lGLEW -lGL -lglfw $(CC) -framework OpenGL -o $(BIN) $(OBJ) -L. -lGLEW -lGL -lglfw
libglfw.so: libglfw.so: wayland.h
$(CC) -fPIC -shared -D$(BKN) -D_GLFW_BUILD_DLL ./ext/glfw/src/*.c -o $@ $(CC) -fPIC -shared -D$(BKN) -D_GLFW_BUILD_DLL -Iext/glfw/deps/wayland ./ext/glfw/src/*.c -o $@
wayland.h:
for i in $(WAYLAND-LIB); do \
wayland-scanner client-header ext/glfw/deps/wayland/$$i.xml ext/glfw/deps/wayland/$$i-client-protocol.h; \
wayland-scanner private-code ext/glfw/deps/wayland/$$i.xml ext/glfw/deps/wayland/$$i-client-protocol-code.h; \
done
clean: clean:
rm $(OBJ) $(BIN) rm $(OBJ) $(BIN)