Improve building and DRM support
This commit is contained in:
parent
fc082f0837
commit
062f5c3359
28
makefile
28
makefile
@ -7,10 +7,17 @@ LUA ?= luajit/src/luajit
|
||||
WINDRES ?= windres
|
||||
|
||||
CFLAGS += -Iluajit/src -Iraylib/src -Iraygui/src
|
||||
LDFLAGS += -Lluajit/src -Lraylib -lraylib
|
||||
LDFLAGS += luajit/src/libluajit.a raylib/libraylib.a
|
||||
|
||||
MODULES := raymath rlgl easings gestures physac raygui
|
||||
|
||||
# raylib settings
|
||||
PLATFORM ?= PLATFORM_DESKTOP
|
||||
GRAPHICS ?= GRAPHICS_API_OPENGL_33
|
||||
|
||||
USE_WAYLAND_DISPLAY ?= FALSE
|
||||
USE_EXTERNAL_GLFW ?= FALSE
|
||||
|
||||
ifeq ($(OS),Windows_NT)
|
||||
LDFLAGS += -lopengl32 -lgdi32 -lwinmm -static
|
||||
EXTERNAL_FILES := src/res/icon.res
|
||||
@ -20,7 +27,12 @@ else ifeq ($(shell uname),Darwin)
|
||||
-Wl,-pagezero_size,10000,-image_base,100000000
|
||||
EXTERNAL_FILES :=
|
||||
else
|
||||
LDFLAGS += -ldl -lX11 -lpthread
|
||||
LDFLAGS += -ldl -lpthread
|
||||
ifeq ($(PLATFORM),PLATFORM_DRM)
|
||||
LDFLAGS += -ldrm -lGLESv2 -lEGL -lgbm
|
||||
else
|
||||
LDFLAGS += -lX11
|
||||
endif
|
||||
EXTERNAL_FILES :=
|
||||
endif
|
||||
|
||||
@ -30,10 +42,17 @@ all: raylua_s raylua_e luajit raylib
|
||||
$(CC) -c -o $@ $< $(CFLAGS)
|
||||
|
||||
luajit:
|
||||
$(MAKE) -C luajit amalg CC=$(CC) BUILDMODE=static MACOSX_DEPLOYMENT_TARGET=10.13
|
||||
$(MAKE) -C luajit amalg \
|
||||
CC=$(CC) BUILDMODE=static \
|
||||
MACOSX_DEPLOYMENT_TARGET=10.13
|
||||
|
||||
raylib:
|
||||
$(MAKE) CC=$(CC) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" -C raylib/src
|
||||
$(MAKE) -C raylib/src \
|
||||
CC=$(CC) AR=$(AR) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" \
|
||||
USE_WAYLAND_DISPLAY="$(USE_WAYLAND_DISPLAY)" \
|
||||
USE_EXTERNAL_GLFW="$(USE_EXTERNAL_GLFW)" \
|
||||
PLATFORM="$(PLATFORM)" GRAPHICS="$(GRAPHICS)"
|
||||
|
||||
|
||||
raylua_s: src/raylua_s.o $(EXTERNAL_FILES) libraylua.a
|
||||
$(CC) -o $@ $^ $(LDFLAGS) luajit/src/libluajit.a
|
||||
@ -73,6 +92,7 @@ clean:
|
||||
src/lib/miniz.o
|
||||
$(MAKE) -C luajit clean
|
||||
$(MAKE) -C raylib/src clean
|
||||
rm -f raylib/libraylib.a
|
||||
|
||||
.PHONY: all src/autogen/bind.c src/autogen/boot.c raylua_s raylua_e luajit \
|
||||
raylib clean
|
||||
|
@ -302,7 +302,8 @@ ffi.cdef [[
|
||||
FLAG_WINDOW_HIDDEN = 128,
|
||||
FLAG_WINDOW_ALWAYS_RUN = 256,
|
||||
FLAG_MSAA_4X_HINT = 32,
|
||||
FLAG_VSYNC_HINT = 64
|
||||
FLAG_VSYNC_HINT = 64,
|
||||
FLAG_INTERLACED_HINT = 512
|
||||
} ConfigFlag;
|
||||
|
||||
typedef enum {
|
||||
|
Loading…
Reference in New Issue
Block a user