Merge pull request #5 from debiatan/support_linux_desktop
Small fixes to support the Debian/GNU Linux distro. Hopefully Ubuntu too.
This commit is contained in:
commit
05ccc4fd42
3 changed files with 27 additions and 3 deletions
|
@ -24,7 +24,7 @@
|
||||||
#**************************************************************************************************
|
#**************************************************************************************************
|
||||||
|
|
||||||
# define raylib platform (by default, compile for RPI)
|
# define raylib platform (by default, compile for RPI)
|
||||||
# Other possible platform: PLATFORM_DESKTOP
|
# Other possible platforms: PLATFORM_DESKTOP PLATFORM_DESKTOP_LINUX
|
||||||
PLATFORM ?= PLATFORM_RPI
|
PLATFORM ?= PLATFORM_RPI
|
||||||
|
|
||||||
# define compiler: gcc for C program, define as g++ for C++
|
# define compiler: gcc for C program, define as g++ for C++
|
||||||
|
@ -49,7 +49,11 @@ else
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# define library paths containing required libs
|
# define library paths containing required libs
|
||||||
LFLAGS = -L. -L../src -L/opt/vc/lib
|
ifeq ($(PLATFORM),PLATFORM_DESKTOP_LINUX)
|
||||||
|
LFLAGS = -L. -L../src
|
||||||
|
else
|
||||||
|
LFLAGS = -L. -L../src -L/opt/vc/lib
|
||||||
|
endif
|
||||||
|
|
||||||
# define any libraries to link into executable
|
# define any libraries to link into executable
|
||||||
# if you want to link libraries (libname.so or libname.a), use the -lname
|
# if you want to link libraries (libname.so or libname.a), use the -lname
|
||||||
|
@ -57,11 +61,18 @@ ifeq ($(PLATFORM),PLATFORM_RPI)
|
||||||
# libraries for Raspberry Pi compiling
|
# libraries for Raspberry Pi compiling
|
||||||
# NOTE: OpenAL Soft library should be installed (libopenal1 package)
|
# NOTE: OpenAL Soft library should be installed (libopenal1 package)
|
||||||
LIBS = -lraylib -lGLESv2 -lEGL -lpthread -lrt -lm -lbcm_host -lopenal
|
LIBS = -lraylib -lGLESv2 -lEGL -lpthread -lrt -lm -lbcm_host -lopenal
|
||||||
|
else
|
||||||
|
ifeq ($(PLATFORM),PLATFORM_DESKTOP_LINUX)
|
||||||
|
# libraries for Debian GNU/Linux desktop compiling
|
||||||
|
# requires the following packages:
|
||||||
|
# libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev
|
||||||
|
LIBS = -lraylib -lglfw -lGLEW -lGL -lopenal
|
||||||
else
|
else
|
||||||
# libraries for Windows desktop compiling
|
# libraries for Windows desktop compiling
|
||||||
# NOTE: GLFW3 and OpenAL Soft libraries should be installed
|
# NOTE: GLFW3 and OpenAL Soft libraries should be installed
|
||||||
LIBS = -lraylib -lglfw3 -lglew32 -lopengl32 -lopenal32 -lgdi32
|
LIBS = -lraylib -lglfw3 -lglew32 -lopengl32 -lopenal32 -lgdi32
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
# define additional parameters and flags for windows
|
# define additional parameters and flags for windows
|
||||||
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
ifeq ($(PLATFORM),PLATFORM_DESKTOP)
|
||||||
|
@ -238,8 +249,13 @@ clean:
|
||||||
ifeq ($(PLATFORM),PLATFORM_RPI)
|
ifeq ($(PLATFORM),PLATFORM_RPI)
|
||||||
rm -f *.o
|
rm -f *.o
|
||||||
# find . -executable -delete
|
# find . -executable -delete
|
||||||
|
else
|
||||||
|
ifeq ($(PLATFORM),PLATFORM_DESKTOP_LINUX)
|
||||||
|
find . -type f -executable -delete
|
||||||
|
rm -f *.o
|
||||||
else
|
else
|
||||||
del *.o *.exe
|
del *.o *.exe
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
@echo Cleaning done
|
@echo Cleaning done
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#**************************************************************************************************
|
#**************************************************************************************************
|
||||||
|
|
||||||
# define raylib platform (by default, compile for RPI)
|
# define raylib platform (by default, compile for RPI)
|
||||||
# Other possible platform: PLATFORM_DESKTOP
|
# Other possible platforms: PLATFORM_DESKTOP PLATFORM_DESKTOP_LINUX
|
||||||
PLATFORM ?= PLATFORM_RPI
|
PLATFORM ?= PLATFORM_RPI
|
||||||
|
|
||||||
# define raylib graphics api depending on selected platform
|
# define raylib graphics api depending on selected platform
|
||||||
|
@ -119,8 +119,13 @@ stb_vorbis.o: stb_vorbis.c
|
||||||
clean:
|
clean:
|
||||||
ifeq ($(PLATFORM),PLATFORM_RPI)
|
ifeq ($(PLATFORM),PLATFORM_RPI)
|
||||||
rm -f *.o libraylib.a
|
rm -f *.o libraylib.a
|
||||||
|
else
|
||||||
|
ifeq ($(PLATFORM),PLATFORM_DESKTOP_LINUX)
|
||||||
|
find . -type f -executable -delete
|
||||||
|
rm -f *.o libraylib.a
|
||||||
else
|
else
|
||||||
del *.o libraylib.a
|
del *.o libraylib.a
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
@echo Cleaning done
|
@echo Cleaning done
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,9 @@
|
||||||
|
|
||||||
|
|
||||||
#include "stb_vorbis.h"
|
#include "stb_vorbis.h"
|
||||||
|
#ifdef __linux
|
||||||
|
#include <alloca.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef STB_VORBIS_HEADER_ONLY
|
#ifndef STB_VORBIS_HEADER_ONLY
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue