Fix: Wayland compilation
This commit is contained in:
23
Makefile
23
Makefile
@@ -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,13 +62,19 @@ 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)
|
||||||
|
|
||||||
.SUFFIXES: .c .o
|
.SUFFIXES: .c .o
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
$(CC) $(CFLAGS) -c -o $@ $<
|
$(CC) $(CFLAGS) -c -o $@ $<
|
||||||
|
|||||||
Reference in New Issue
Block a user