diff options
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/Makefile | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/examples/Makefile b/examples/Makefile index 21482851..6ca8b6cf 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -96,6 +96,12 @@ ifeq ($(PLATFORM),PLATFORM_RPI) PLATFORM_OS=LINUX endif endif +ifeq ($(PLATFORM),PLATFORM_DRM) + UNAMEOS=$(shell uname) + ifeq ($(UNAMEOS),Linux) + PLATFORM_OS=LINUX + endif +endif # RAYLIB_PATH adjustment for different platforms. # If using GNU make, we can get the full path to the top of the tree. Windows? BSD? @@ -112,6 +118,9 @@ endif ifeq ($(PLATFORM),PLATFORM_RPI) RAYLIB_PATH ?= /home/pi/raylib endif +ifeq ($(PLATFORM),PLATFORM_DRM) + RAYLIB_PATH ?= /home/pi/raylib +endif ifeq ($(PLATFORM),PLATFORM_WEB) # Emscripten required variables @@ -221,6 +230,9 @@ endif ifeq ($(PLATFORM),PLATFORM_RPI) CFLAGS += -std=gnu99 endif +ifeq ($(PLATFORM),PLATFORM_DRM) + CFLAGS += -std=gnu99 -DEGL_NO_X11 +endif ifeq ($(PLATFORM),PLATFORM_WEB) # -Os # size optimization # -O2 # optimization level 2, if used, also set --memory-init-file 0 @@ -259,6 +271,10 @@ ifeq ($(PLATFORM),PLATFORM_RPI) INCLUDE_PATHS += -I/opt/vc/include/interface/vmcs_host/linux INCLUDE_PATHS += -I/opt/vc/include/interface/vcos/pthreads endif +ifeq ($(PLATFORM),PLATFORM_DRM) + # DRM required libraries + INCLUDE_PATHS += -I/usr/include/libdrm +endif ifeq ($(PLATFORM),PLATFORM_DESKTOP) ifeq ($(PLATFORM_OS),BSD) # Consider -L$(RAYLIB_H_INSTALL_PATH) @@ -299,6 +315,10 @@ ifeq ($(PLATFORM),PLATFORM_RPI) LDFLAGS += -L/opt/vc/lib endif +ifeq ($(PLATFORM),PLATFORM_DRM) + LDFLAGS += -lGLESv2 -lEGL -ldrm -lgbm +endif + # Define any libraries required on linking # if you want to link libraries (libname.so or libname.a), use the -lname ifeq ($(PLATFORM),PLATFORM_DESKTOP) @@ -351,6 +371,11 @@ ifeq ($(PLATFORM),PLATFORM_RPI) # NOTE: Required packages: libasound2-dev (ALSA) LDLIBS = -lraylib -lbrcmGLESv2 -lbrcmEGL -lpthread -lrt -lm -lbcm_host -ldl endif +ifeq ($(PLATFORM),PLATFORM_DRM) + # Libraries for DRM compiling + # NOTE: Required packages: libasound2-dev (ALSA) + LDLIBS = -lraylib -lGLESv2 -lEGL -lpthread -lrt -lm -lgbm -ldrm -ldl +endif ifeq ($(PLATFORM),PLATFORM_WEB) # Libraries for web (HTML5) compiling LDLIBS = $(RAYLIB_RELEASE_PATH)/libraylib.a @@ -522,6 +547,10 @@ ifeq ($(PLATFORM),PLATFORM_RPI) find . -type f -executable -delete rm -fv *.o endif +ifeq ($(PLATFORM),PLATFORM_DRM) + find . -type f -executable -delete + rm -fv *.o +endif ifeq ($(PLATFORM),PLATFORM_WEB) del *.o *.html *.js endif |
