diff --git a/examples/makefile b/examples/Makefile similarity index 88% rename from examples/makefile rename to examples/Makefile index 2a9e88ba3..e62488ae1 100644 --- a/examples/makefile +++ b/examples/Makefile @@ -79,31 +79,65 @@ endif # define any directories containing required header files ifeq ($(PLATFORM),PLATFORM_RPI) - INCLUDES = -I. -I../src -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -else - INCLUDES = -I. -I../src -# external libraries headers -# GLFW3 - INCLUDES += -I../external/glfw3/include -# GLEW - Not required any more, replaced by GLAD - #INCLUDES += -I../external/glew/include -# OpenAL Soft - INCLUDES += -I../external/openal_soft/include + INCLUDES = -I. -I../../src -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads +endif +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + # add standard directories for GNU/Linux + ifeq ($(PLATFORM_OS),LINUX) + INCLUDES = -I. -I../src -I/usr/local/include/raylib/ + else + INCLUDES = -I. -I../../src -IC:/raylib/raylib/src + # external libraries headers + # GLFW3 + INCLUDES += -I../../external/glfw3/include + # GLEW - Not required any more, replaced by GLAD + #INCLUDES += -I../external/glew/include + # OpenAL Soft + INCLUDES += -I../../external/openal_soft/include + endif endif # define library paths containing required libs ifeq ($(PLATFORM),PLATFORM_RPI) - LFLAGS = -L. -L../src -L/opt/vc/lib -else - LFLAGS = -L. -L../src -# external libraries to link with -# GLFW3 - LFLAGS += -L../external/glfw3/lib/$(LIBPATH) - ifneq ($(PLATFORM_OS),OSX) - # OpenAL Soft - LFLAGS += -L../external/openal_soft/lib/$(LIBPATH) - # GLEW - Not required any more, replaced by GLAD - #LFLAGS += -L../external/glew/lib/$(LIBPATH) + LFLAGS = -L. -L../../src -L/opt/vc/lib +endif +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + # add standard directories for GNU/Linux + ifeq ($(PLATFORM_OS),LINUX) + LFLAGS = -L. -L../../src + else + LFLAGS = -L. -L../../src -LC:/raylib/raylib/src + # external libraries to link with + # GLFW3 + LFLAGS += -L../../external/glfw3/lib/$(LIBPATH) + ifneq ($(PLATFORM_OS),OSX) + # OpenAL Soft + LFLAGS += -L../../external/openal_soft/lib/$(LIBPATH) + # GLEW: Not used, replaced by GLAD + #LFLAGS += -L../../external/glew/lib/$(LIBPATH) + endif + endif +endif + +# define library paths containing required libs +ifeq ($(PLATFORM),PLATFORM_RPI) + LFLAGS = -L. -L../../src -L/opt/vc/lib +endif +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + # add standard directories for GNU/Linux + ifeq ($(PLATFORM_OS),LINUX) + LFLAGS = -L. -L../../src + else + LFLAGS = -L. -L../../src -LC:/raylib/raylib/src + # external libraries to link with + # GLFW3 + LFLAGS += -L../../external/glfw3/lib/$(LIBPATH) + ifneq ($(PLATFORM_OS),OSX) + # OpenAL Soft + LFLAGS += -L../../external/openal_soft/lib/$(LIBPATH) + # GLEW + LFLAGS += -L../../external/glew/lib/$(LIBPATH) + endif endif endif @@ -114,9 +148,8 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) # libraries for Debian GNU/Linux desktop compiling # requires the following packages: # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev - LIBS = -lraylib -lglfw3 -lGLEW -lGL -lopenal -lm -pthread - # on XWindow could require also below libraries, just uncomment - #LIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor + LIBS = -lraylib -lglfw3 -lGL -lopenal -lm -pthread -ldl -lX11 \ + -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor else ifeq ($(PLATFORM_OS),OSX) # libraries for OS X 10.9 desktop compiling @@ -202,9 +235,9 @@ EXAMPLES = \ fix_dylib \ -# typing 'make' will invoke the first target entry in the file, +# typing 'make' will invoke the default target entry called 'all', # in this case, the 'default' target entry is raylib -default: examples +all: examples # compile all examples examples: $(EXAMPLES) diff --git a/src/makefile b/src/Makefile similarity index 100% rename from src/makefile rename to src/Makefile diff --git a/templates/advance_game/makefile b/templates/advance_game/Makefile similarity index 77% rename from templates/advance_game/makefile rename to templates/advance_game/Makefile index e19eb746a..d790fe261 100644 --- a/templates/advance_game/makefile +++ b/templates/advance_game/Makefile @@ -83,30 +83,64 @@ endif # define any directories containing required header files ifeq ($(PLATFORM),PLATFORM_RPI) INCLUDES = -I. -I../../src -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -else - INCLUDES = -I. -I../../src -IC:/raylib/raylib/src -# external libraries headers -# GLFW3 - INCLUDES += -I../../external/glfw3/include -# GLEW - Not required any more, replaced by GLAD - #INCLUDES += -I../external/glew/include -# OpenAL Soft - INCLUDES += -I../../external/openal_soft/include +endif +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + # add standard directories for GNU/Linux + ifeq ($(PLATFORM_OS),LINUX) + INCLUDES = -I. -I../src -I/usr/local/include/raylib/ + else + INCLUDES = -I. -I../../src -IC:/raylib/raylib/src + # external libraries headers + # GLFW3 + INCLUDES += -I../../external/glfw3/include + # GLEW - Not required any more, replaced by GLAD + #INCLUDES += -I../external/glew/include + # OpenAL Soft + INCLUDES += -I../../external/openal_soft/include + endif endif # define library paths containing required libs ifeq ($(PLATFORM),PLATFORM_RPI) LFLAGS = -L. -L../../src -L/opt/vc/lib -else - LFLAGS = -L. -L../../src -LC:/raylib/raylib/src - # external libraries to link with - # GLFW3 +endif +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + # add standard directories for GNU/Linux + ifeq ($(PLATFORM_OS),LINUX) + LFLAGS = -L. -L../../src + else + LFLAGS = -L. -L../../src -LC:/raylib/raylib/src + # external libraries to link with + # GLFW3 + LFLAGS += -L../../external/glfw3/lib/$(LIBPATH) + ifneq ($(PLATFORM_OS),OSX) + # OpenAL Soft + LFLAGS += -L../../external/openal_soft/lib/$(LIBPATH) + # GLEW: Not used, replaced by GLAD + #LFLAGS += -L../../external/glew/lib/$(LIBPATH) + endif + endif +endif + +# define library paths containing required libs +ifeq ($(PLATFORM),PLATFORM_RPI) + LFLAGS = -L. -L../../src -L/opt/vc/lib +endif +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + # add standard directories for GNU/Linux + ifeq ($(PLATFORM_OS),LINUX) + LFLAGS = -L. -L../../src + else + LFLAGS = -L. -L../../src -LC:/raylib/raylib/src + # external libraries to link with + # GLFW3 LFLAGS += -L../../external/glfw3/lib/$(LIBPATH) - ifneq ($(PLATFORM_OS),OSX) - # OpenAL Soft - LFLAGS += -L../../external/openal_soft/lib/$(LIBPATH) - # GLEW: Not used, replaced by GLAD - #LFLAGS += -L../../external/glew/lib/$(LIBPATH) + ifneq ($(PLATFORM_OS),OSX) + # OpenAL Soft + LFLAGS += -L../../external/openal_soft/lib/$(LIBPATH) + # GLEW + LFLAGS += -L../../external/glew/lib/$(LIBPATH) + endif endif endif @@ -117,9 +151,8 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) # libraries for Debian GNU/Linux desktop compiling # requires the following packages: # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev - LIBS = -lraylib -lglfw3 -lGLEW -lGL -lopenal -lm -pthread - # on XWindow could require also below libraries, just uncomment - #LIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor + LIBS = -lraylib -lglfw3 -lGL -lopenal -lm -pthread -ldl -lX11 \ + -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor else ifeq ($(PLATFORM_OS),OSX) # libraries for OS X 10.9 desktop compiling @@ -162,9 +195,9 @@ SCREENS = \ screens/screen_gameplay.o \ screens/screen_ending.o \ -# typing 'make' will invoke the first target entry in the file, +# typing 'make' will invoke the default target entry called 'all', # in this case, the 'default' target entry is advance_game -default: advance_game +all: advance_game # compile template - advance_game advance_game: advance_game.c $(SCREENS) diff --git a/templates/basic_game/makefile b/templates/basic_game/Makefile similarity index 74% rename from templates/basic_game/makefile rename to templates/basic_game/Makefile index 057320403..428c980ae 100644 --- a/templates/basic_game/makefile +++ b/templates/basic_game/Makefile @@ -83,30 +83,64 @@ endif # define any directories containing required header files ifeq ($(PLATFORM),PLATFORM_RPI) INCLUDES = -I. -I../../src -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -else - INCLUDES = -I. -I../../src -IC:/raylib/raylib/src -# external libraries headers -# GLFW3 - INCLUDES += -I../../external/glfw3/include -# GLEW - INCLUDES += -I../../external/glew/include -# OpenAL Soft - INCLUDES += -I../../external/openal_soft/include +endif +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + # add standard directories for GNU/Linux + ifeq ($(PLATFORM_OS),LINUX) + INCLUDES = -I. -I../src -I/usr/local/include/raylib/ + else + INCLUDES = -I. -I../../src -IC:/raylib/raylib/src + # external libraries headers + # GLFW3 + INCLUDES += -I../../external/glfw3/include + # GLEW - Not required any more, replaced by GLAD + #INCLUDES += -I../external/glew/include + # OpenAL Soft + INCLUDES += -I../../external/openal_soft/include + endif endif # define library paths containing required libs ifeq ($(PLATFORM),PLATFORM_RPI) LFLAGS = -L. -L../../src -L/opt/vc/lib -else - LFLAGS = -L. -L../../src -LC:/raylib/raylib/src - # external libraries to link with - # GLFW3 - LFLAGS += -L../../external/glfw3/lib/$(LIBPATH) - ifneq ($(PLATFORM_OS),OSX) - # OpenAL Soft - LFLAGS += -L../../external/openal_soft/lib/$(LIBPATH) - # GLEW: Not used, replaced by GLAD - #LFLAGS += -L../../external/glew/lib/$(LIBPATH) +endif +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + # add standard directories for GNU/Linux + ifeq ($(PLATFORM_OS),LINUX) + LFLAGS = -L. -L../../src + else + LFLAGS = -L. -L../../src -LC:/raylib/raylib/src + # external libraries to link with + # GLFW3 + LFLAGS += -L../../external/glfw3/lib/$(LIBPATH) + ifneq ($(PLATFORM_OS),OSX) + # OpenAL Soft + LFLAGS += -L../../external/openal_soft/lib/$(LIBPATH) + # GLEW: Not used, replaced by GLAD + #LFLAGS += -L../../external/glew/lib/$(LIBPATH) + endif + endif +endif + +# define library paths containing required libs +ifeq ($(PLATFORM),PLATFORM_RPI) + LFLAGS = -L. -L../../src -L/opt/vc/lib +endif +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + # add standard directories for GNU/Linux + ifeq ($(PLATFORM_OS),LINUX) + LFLAGS = -L. -L../../src + else + LFLAGS = -L. -L../../src -LC:/raylib/raylib/src + # external libraries to link with + # GLFW3 + LFLAGS += -L../../external/glfw3/lib/$(LIBPATH) + ifneq ($(PLATFORM_OS),OSX) + # OpenAL Soft + LFLAGS += -L../../external/openal_soft/lib/$(LIBPATH) + # GLEW + LFLAGS += -L../../external/glew/lib/$(LIBPATH) + endif endif endif @@ -117,9 +151,8 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) # libraries for Debian GNU/Linux desktop compiling # requires the following packages: # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev - LIBS = -lraylib -lglfw3 -lGLEW -lGL -lopenal -lm -pthread - # on XWindow could require also below libraries, just uncomment - #LIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor + LIBS = -lraylib -lglfw3 -lGL -lopenal -lm -pthread -ldl -lX11 \ + -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor else ifeq ($(PLATFORM_OS),OSX) # libraries for OS X 10.9 desktop compiling @@ -154,9 +187,9 @@ ifeq ($(PLATFORM),PLATFORM_WEB) EXT = .html endif -# typing 'make' will invoke the first target entry in the file, +# typing 'make' will invoke the default target entry called 'all', # in this case, the 'default' target entry is basic_game -default: basic_game +all: basic_game # compile template - basic_game basic_game: basic_game.c diff --git a/templates/basic_test/makefile b/templates/basic_test/Makefile similarity index 74% rename from templates/basic_test/makefile rename to templates/basic_test/Makefile index a0ed2608f..835484f6b 100644 --- a/templates/basic_test/makefile +++ b/templates/basic_test/Makefile @@ -82,30 +82,64 @@ endif # define any directories containing required header files ifeq ($(PLATFORM),PLATFORM_RPI) INCLUDES = -I. -I../../src -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -else - INCLUDES = -I. -I../../src -IC:/raylib/raylib/src -# external libraries headers -# GLFW3 - INCLUDES += -I../../external/glfw3/include -# GLEW - INCLUDES += -I../../external/glew/include -# OpenAL Soft - INCLUDES += -I../../external/openal_soft/include +endif +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + # add standard directories for GNU/Linux + ifeq ($(PLATFORM_OS),LINUX) + INCLUDES = -I. -I../src -I/usr/local/include/raylib/ + else + INCLUDES = -I. -I../../src -IC:/raylib/raylib/src + # external libraries headers + # GLFW3 + INCLUDES += -I../../external/glfw3/include + # GLEW - Not required any more, replaced by GLAD + #INCLUDES += -I../external/glew/include + # OpenAL Soft + INCLUDES += -I../../external/openal_soft/include + endif endif # define library paths containing required libs ifeq ($(PLATFORM),PLATFORM_RPI) LFLAGS = -L. -L../../src -L/opt/vc/lib -else - LFLAGS = -L. -L../../src -LC:/raylib/raylib/src - # external libraries to link with - # GLFW3 - LFLAGS += -L../../external/glfw3/lib/$(LIBPATH) - ifneq ($(PLATFORM_OS),OSX) - # OpenAL Soft - LFLAGS += -L../../external/openal_soft/lib/$(LIBPATH) - # GLEW - LFLAGS += -L../../external/glew/lib/$(LIBPATH) +endif +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + # add standard directories for GNU/Linux + ifeq ($(PLATFORM_OS),LINUX) + LFLAGS = -L. -L../../src + else + LFLAGS = -L. -L../../src -LC:/raylib/raylib/src + # external libraries to link with + # GLFW3 + LFLAGS += -L../../external/glfw3/lib/$(LIBPATH) + ifneq ($(PLATFORM_OS),OSX) + # OpenAL Soft + LFLAGS += -L../../external/openal_soft/lib/$(LIBPATH) + # GLEW: Not used, replaced by GLAD + #LFLAGS += -L../../external/glew/lib/$(LIBPATH) + endif + endif +endif + +# define library paths containing required libs +ifeq ($(PLATFORM),PLATFORM_RPI) + LFLAGS = -L. -L../../src -L/opt/vc/lib +endif +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + # add standard directories for GNU/Linux + ifeq ($(PLATFORM_OS),LINUX) + LFLAGS = -L. -L../../src + else + LFLAGS = -L. -L../../src -LC:/raylib/raylib/src + # external libraries to link with + # GLFW3 + LFLAGS += -L../../external/glfw3/lib/$(LIBPATH) + ifneq ($(PLATFORM_OS),OSX) + # OpenAL Soft + LFLAGS += -L../../external/openal_soft/lib/$(LIBPATH) + # GLEW + LFLAGS += -L../../external/glew/lib/$(LIBPATH) + endif endif endif @@ -116,9 +150,8 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) # libraries for Debian GNU/Linux desktop compiling # requires the following packages: # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev - LIBS = -lraylib -lglfw3 -lGLEW -lGL -lopenal -lm -pthread - # on XWindow could require also below libraries, just uncomment - #LIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor + LIBS = -lraylib -lglfw3 -lGL -lopenal -lm -pthread -ldl -lX11 \ + -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor else ifeq ($(PLATFORM_OS),OSX) # libraries for OS X 10.9 desktop compiling @@ -153,9 +186,9 @@ ifeq ($(PLATFORM),PLATFORM_WEB) EXT = .html endif -# typing 'make' will invoke the first target entry in the file, +# typing 'make' will invoke the default target entry called 'all', # in this case, the 'default' target entry is basic_test -default: basic_test +all: basic_test # compile template - basic_test basic_test: basic_test.c diff --git a/templates/simple_game/makefile b/templates/simple_game/Makefile similarity index 74% rename from templates/simple_game/makefile rename to templates/simple_game/Makefile index 41fef740a..707f858d1 100644 --- a/templates/simple_game/makefile +++ b/templates/simple_game/Makefile @@ -83,30 +83,64 @@ endif # define any directories containing required header files ifeq ($(PLATFORM),PLATFORM_RPI) INCLUDES = -I. -I../../src -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -else - INCLUDES = -I. -I../../src -IC:/raylib/raylib/src -# external libraries headers -# GLFW3 - INCLUDES += -I../../external/glfw3/include -# GLEW - INCLUDES += -I../../external/glew/include -# OpenAL Soft - INCLUDES += -I../../external/openal_soft/include +endif +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + # add standard directories for GNU/Linux + ifeq ($(PLATFORM_OS),LINUX) + INCLUDES = -I. -I../src -I/usr/local/include/raylib/ + else + INCLUDES = -I. -I../../src -IC:/raylib/raylib/src + # external libraries headers + # GLFW3 + INCLUDES += -I../../external/glfw3/include + # GLEW - Not required any more, replaced by GLAD + #INCLUDES += -I../external/glew/include + # OpenAL Soft + INCLUDES += -I../../external/openal_soft/include + endif endif # define library paths containing required libs ifeq ($(PLATFORM),PLATFORM_RPI) LFLAGS = -L. -L../../src -L/opt/vc/lib -else - LFLAGS = -L. -L../../src -LC:/raylib/raylib/src - # external libraries to link with - # GLFW3 - LFLAGS += -L../../external/glfw3/lib/$(LIBPATH) - ifneq ($(PLATFORM_OS),OSX) - # OpenAL Soft - LFLAGS += -L../../external/openal_soft/lib/$(LIBPATH) - # GLEW: Not used, replaced by GLAD - #LFLAGS += -L../../external/glew/lib/$(LIBPATH) +endif +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + # add standard directories for GNU/Linux + ifeq ($(PLATFORM_OS),LINUX) + LFLAGS = -L. -L../../src + else + LFLAGS = -L. -L../../src -LC:/raylib/raylib/src + # external libraries to link with + # GLFW3 + LFLAGS += -L../../external/glfw3/lib/$(LIBPATH) + ifneq ($(PLATFORM_OS),OSX) + # OpenAL Soft + LFLAGS += -L../../external/openal_soft/lib/$(LIBPATH) + # GLEW: Not used, replaced by GLAD + #LFLAGS += -L../../external/glew/lib/$(LIBPATH) + endif + endif +endif + +# define library paths containing required libs +ifeq ($(PLATFORM),PLATFORM_RPI) + LFLAGS = -L. -L../../src -L/opt/vc/lib +endif +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + # add standard directories for GNU/Linux + ifeq ($(PLATFORM_OS),LINUX) + LFLAGS = -L. -L../../src + else + LFLAGS = -L. -L../../src -LC:/raylib/raylib/src + # external libraries to link with + # GLFW3 + LFLAGS += -L../../external/glfw3/lib/$(LIBPATH) + ifneq ($(PLATFORM_OS),OSX) + # OpenAL Soft + LFLAGS += -L../../external/openal_soft/lib/$(LIBPATH) + # GLEW + LFLAGS += -L../../external/glew/lib/$(LIBPATH) + endif endif endif @@ -117,9 +151,8 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) # libraries for Debian GNU/Linux desktop compiling # requires the following packages: # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev - LIBS = -lraylib -lglfw3 -lGLEW -lGL -lopenal -lm -pthread - # on XWindow could require also below libraries, just uncomment - #LIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor + LIBS = -lraylib -lglfw3 -lGL -lopenal -lm -pthread -ldl -lX11 \ + -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor else ifeq ($(PLATFORM_OS),OSX) # libraries for OS X 10.9 desktop compiling @@ -154,9 +187,9 @@ ifeq ($(PLATFORM),PLATFORM_WEB) EXT = .html endif -# typing 'make' will invoke the first target entry in the file, +# typing 'make' will invoke the default target entry called 'all', # in this case, the 'default' target entry is simple_game -default: simple_game +all: simple_game # compile template - simple_game simple_game: simple_game.c screens.o diff --git a/templates/standard_game/makefile b/templates/standard_game/Makefile similarity index 77% rename from templates/standard_game/makefile rename to templates/standard_game/Makefile index 90f0e6f2f..6c67be42a 100644 --- a/templates/standard_game/makefile +++ b/templates/standard_game/Makefile @@ -83,30 +83,64 @@ endif # define any directories containing required header files ifeq ($(PLATFORM),PLATFORM_RPI) INCLUDES = -I. -I../../src -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -else - INCLUDES = -I. -I../../src -IC:/raylib/raylib/src -# external libraries headers -# GLFW3 - INCLUDES += -I../../external/glfw3/include -# GLEW - INCLUDES += -I../../external/glew/include -# OpenAL Soft - INCLUDES += -I../../external/openal_soft/include +endif +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + # add standard directories for GNU/Linux + ifeq ($(PLATFORM_OS),LINUX) + INCLUDES = -I. -I../src -I/usr/local/include/raylib/ + else + INCLUDES = -I. -I../../src -IC:/raylib/raylib/src + # external libraries headers + # GLFW3 + INCLUDES += -I../../external/glfw3/include + # GLEW - Not required any more, replaced by GLAD + #INCLUDES += -I../external/glew/include + # OpenAL Soft + INCLUDES += -I../../external/openal_soft/include + endif endif # define library paths containing required libs ifeq ($(PLATFORM),PLATFORM_RPI) LFLAGS = -L. -L../../src -L/opt/vc/lib -else - LFLAGS = -L. -L../../src -LC:/raylib/raylib/src - # external libraries to link with - # GLFW3 - LFLAGS += -L../../external/glfw3/lib/$(LIBPATH) - ifneq ($(PLATFORM_OS),OSX) - # OpenAL Soft - LFLAGS += -L../../external/openal_soft/lib/$(LIBPATH) - # GLEW: Not used, replaced by GLAD - #LFLAGS += -L../../external/glew/lib/$(LIBPATH) +endif +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + # add standard directories for GNU/Linux + ifeq ($(PLATFORM_OS),LINUX) + LFLAGS = -L. -L../../src + else + LFLAGS = -L. -L../../src -LC:/raylib/raylib/src + # external libraries to link with + # GLFW3 + LFLAGS += -L../../external/glfw3/lib/$(LIBPATH) + ifneq ($(PLATFORM_OS),OSX) + # OpenAL Soft + LFLAGS += -L../../external/openal_soft/lib/$(LIBPATH) + # GLEW: Not used, replaced by GLAD + #LFLAGS += -L../../external/glew/lib/$(LIBPATH) + endif + endif +endif + +# define library paths containing required libs +ifeq ($(PLATFORM),PLATFORM_RPI) + LFLAGS = -L. -L../../src -L/opt/vc/lib +endif +ifeq ($(PLATFORM),PLATFORM_DESKTOP) + # add standard directories for GNU/Linux + ifeq ($(PLATFORM_OS),LINUX) + LFLAGS = -L. -L../../src + else + LFLAGS = -L. -L../../src -LC:/raylib/raylib/src + # external libraries to link with + # GLFW3 + LFLAGS += -L../../external/glfw3/lib/$(LIBPATH) + ifneq ($(PLATFORM_OS),OSX) + # OpenAL Soft + LFLAGS += -L../../external/openal_soft/lib/$(LIBPATH) + # GLEW + LFLAGS += -L../../external/glew/lib/$(LIBPATH) + endif endif endif @@ -117,9 +151,8 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) # libraries for Debian GNU/Linux desktop compiling # requires the following packages: # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev - LIBS = -lraylib -lglfw3 -lGLEW -lGL -lopenal -lm -pthread - # on XWindow could require also below libraries, just uncomment - #LIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor + LIBS = -lraylib -lglfw3 -lGL -lopenal -lm -pthread -ldl -lX11 \ + -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor else ifeq ($(PLATFORM_OS),OSX) # libraries for OS X 10.9 desktop compiling @@ -162,9 +195,9 @@ SCREENS = \ screens/screen_gameplay.o \ screens/screen_ending.o \ -# typing 'make' will invoke the first target entry in the file, +# typing 'make' will invoke the default target entry called 'all', # in this case, the 'default' target entry is standard_game -default: standard_game +all: standard_game # compile template - standard_game standard_game: standard_game.c $(SCREENS)