Browse Source

Merge pull request #102 from LelixSuper/develop

Fix examples and templates compiling on GNU/Linux
pull/107/head
Ray 9 years ago
parent
commit
5bcda7bf15
7 changed files with 343 additions and 145 deletions
  1. +59
    -26
      examples/Makefile
  2. +0
    -0
      src/Makefile
  3. +56
    -23
      templates/advance_game/Makefile
  4. +57
    -24
      templates/basic_game/Makefile
  5. +57
    -24
      templates/basic_test/Makefile
  6. +57
    -24
      templates/simple_game/Makefile
  7. +57
    -24
      templates/standard_game/Makefile

examples/makefile → examples/Makefile View File

@ -79,31 +79,65 @@ endif
# define any directories containing required header files # define any directories containing required header files
ifeq ($(PLATFORM),PLATFORM_RPI) ifeq ($(PLATFORM),PLATFORM_RPI)
INCLUDES = -I. -I../src -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads INCLUDES = -I. -I../../src -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads
else endif
INCLUDES = -I. -I../src ifeq ($(PLATFORM),PLATFORM_DESKTOP)
# external libraries headers # add standard directories for GNU/Linux
# GLFW3 ifeq ($(PLATFORM_OS),LINUX)
INCLUDES += -I../external/glfw3/include INCLUDES = -I. -I../src -I/usr/local/include/raylib/
# GLEW - Not required any more, replaced by GLAD else
#INCLUDES += -I../external/glew/include INCLUDES = -I. -I../../src -IC:/raylib/raylib/src
# OpenAL Soft # external libraries headers
INCLUDES += -I../external/openal_soft/include # 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 endif
# define library paths containing required libs # define library paths containing required libs
ifeq ($(PLATFORM),PLATFORM_RPI) ifeq ($(PLATFORM),PLATFORM_RPI)
LFLAGS = -L. -L../src -L/opt/vc/lib LFLAGS = -L. -L../../src -L/opt/vc/lib
else endif
LFLAGS = -L. -L../src ifeq ($(PLATFORM),PLATFORM_DESKTOP)
# external libraries to link with # add standard directories for GNU/Linux
# GLFW3 ifeq ($(PLATFORM_OS),LINUX)
LFLAGS += -L../external/glfw3/lib/$(LIBPATH) LFLAGS = -L. -L../../src
ifneq ($(PLATFORM_OS),OSX) else
# OpenAL Soft LFLAGS = -L. -L../../src -LC:/raylib/raylib/src
LFLAGS += -L../external/openal_soft/lib/$(LIBPATH) # external libraries to link with
# GLEW - Not required any more, replaced by GLAD # GLFW3
#LFLAGS += -L../external/glew/lib/$(LIBPATH) 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
endif endif
@ -114,9 +148,8 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
# libraries for Debian GNU/Linux desktop compiling # libraries for Debian GNU/Linux desktop compiling
# requires the following packages: # requires the following packages:
# libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev
LIBS = -lraylib -lglfw3 -lGLEW -lGL -lopenal -lm -pthread LIBS = -lraylib -lglfw3 -lGL -lopenal -lm -pthread -ldl -lX11 \
# on XWindow could require also below libraries, just uncomment -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor
#LIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor
else else
ifeq ($(PLATFORM_OS),OSX) ifeq ($(PLATFORM_OS),OSX)
# libraries for OS X 10.9 desktop compiling # libraries for OS X 10.9 desktop compiling
@ -202,9 +235,9 @@ EXAMPLES = \
fix_dylib \ 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 # in this case, the 'default' target entry is raylib
default: examples all: examples
# compile all examples # compile all examples
examples: $(EXAMPLES) examples: $(EXAMPLES)

src/makefile → src/Makefile View File


templates/advance_game/makefile → templates/advance_game/Makefile View File

@ -83,30 +83,64 @@ endif
# define any directories containing required header files # define any directories containing required header files
ifeq ($(PLATFORM),PLATFORM_RPI) ifeq ($(PLATFORM),PLATFORM_RPI)
INCLUDES = -I. -I../../src -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads INCLUDES = -I. -I../../src -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads
else endif
INCLUDES = -I. -I../../src -IC:/raylib/raylib/src ifeq ($(PLATFORM),PLATFORM_DESKTOP)
# external libraries headers # add standard directories for GNU/Linux
# GLFW3 ifeq ($(PLATFORM_OS),LINUX)
INCLUDES += -I../../external/glfw3/include INCLUDES = -I. -I../src -I/usr/local/include/raylib/
# GLEW - Not required any more, replaced by GLAD else
#INCLUDES += -I../external/glew/include INCLUDES = -I. -I../../src -IC:/raylib/raylib/src
# OpenAL Soft # external libraries headers
INCLUDES += -I../../external/openal_soft/include # 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 endif
# define library paths containing required libs # define library paths containing required libs
ifeq ($(PLATFORM),PLATFORM_RPI) ifeq ($(PLATFORM),PLATFORM_RPI)
LFLAGS = -L. -L../../src -L/opt/vc/lib LFLAGS = -L. -L../../src -L/opt/vc/lib
else endif
LFLAGS = -L. -L../../src -LC:/raylib/raylib/src ifeq ($(PLATFORM),PLATFORM_DESKTOP)
# external libraries to link with # add standard directories for GNU/Linux
# GLFW3 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) LFLAGS += -L../../external/glfw3/lib/$(LIBPATH)
ifneq ($(PLATFORM_OS),OSX) ifneq ($(PLATFORM_OS),OSX)
# OpenAL Soft # OpenAL Soft
LFLAGS += -L../../external/openal_soft/lib/$(LIBPATH) LFLAGS += -L../../external/openal_soft/lib/$(LIBPATH)
# GLEW: Not used, replaced by GLAD # GLEW
#LFLAGS += -L../../external/glew/lib/$(LIBPATH) LFLAGS += -L../../external/glew/lib/$(LIBPATH)
endif
endif endif
endif endif
@ -117,9 +151,8 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
# libraries for Debian GNU/Linux desktop compiling # libraries for Debian GNU/Linux desktop compiling
# requires the following packages: # requires the following packages:
# libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev
LIBS = -lraylib -lglfw3 -lGLEW -lGL -lopenal -lm -pthread LIBS = -lraylib -lglfw3 -lGL -lopenal -lm -pthread -ldl -lX11 \
# on XWindow could require also below libraries, just uncomment -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor
#LIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor
else else
ifeq ($(PLATFORM_OS),OSX) ifeq ($(PLATFORM_OS),OSX)
# libraries for OS X 10.9 desktop compiling # libraries for OS X 10.9 desktop compiling
@ -162,9 +195,9 @@ SCREENS = \
screens/screen_gameplay.o \ screens/screen_gameplay.o \
screens/screen_ending.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 # in this case, the 'default' target entry is advance_game
default: advance_game all: advance_game
# compile template - advance_game # compile template - advance_game
advance_game: advance_game.c $(SCREENS) advance_game: advance_game.c $(SCREENS)

templates/basic_game/makefile → templates/basic_game/Makefile View File

@ -83,30 +83,64 @@ endif
# define any directories containing required header files # define any directories containing required header files
ifeq ($(PLATFORM),PLATFORM_RPI) ifeq ($(PLATFORM),PLATFORM_RPI)
INCLUDES = -I. -I../../src -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads INCLUDES = -I. -I../../src -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads
else endif
INCLUDES = -I. -I../../src -IC:/raylib/raylib/src ifeq ($(PLATFORM),PLATFORM_DESKTOP)
# external libraries headers # add standard directories for GNU/Linux
# GLFW3 ifeq ($(PLATFORM_OS),LINUX)
INCLUDES += -I../../external/glfw3/include INCLUDES = -I. -I../src -I/usr/local/include/raylib/
# GLEW else
INCLUDES += -I../../external/glew/include INCLUDES = -I. -I../../src -IC:/raylib/raylib/src
# OpenAL Soft # external libraries headers
INCLUDES += -I../../external/openal_soft/include # 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 endif
# define library paths containing required libs # define library paths containing required libs
ifeq ($(PLATFORM),PLATFORM_RPI) ifeq ($(PLATFORM),PLATFORM_RPI)
LFLAGS = -L. -L../../src -L/opt/vc/lib LFLAGS = -L. -L../../src -L/opt/vc/lib
else endif
LFLAGS = -L. -L../../src -LC:/raylib/raylib/src ifeq ($(PLATFORM),PLATFORM_DESKTOP)
# external libraries to link with # add standard directories for GNU/Linux
# GLFW3 ifeq ($(PLATFORM_OS),LINUX)
LFLAGS += -L../../external/glfw3/lib/$(LIBPATH) LFLAGS = -L. -L../../src
ifneq ($(PLATFORM_OS),OSX) else
# OpenAL Soft LFLAGS = -L. -L../../src -LC:/raylib/raylib/src
LFLAGS += -L../../external/openal_soft/lib/$(LIBPATH) # external libraries to link with
# GLEW: Not used, replaced by GLAD # GLFW3
#LFLAGS += -L../../external/glew/lib/$(LIBPATH) 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
endif endif
@ -117,9 +151,8 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
# libraries for Debian GNU/Linux desktop compiling # libraries for Debian GNU/Linux desktop compiling
# requires the following packages: # requires the following packages:
# libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev
LIBS = -lraylib -lglfw3 -lGLEW -lGL -lopenal -lm -pthread LIBS = -lraylib -lglfw3 -lGL -lopenal -lm -pthread -ldl -lX11 \
# on XWindow could require also below libraries, just uncomment -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor
#LIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor
else else
ifeq ($(PLATFORM_OS),OSX) ifeq ($(PLATFORM_OS),OSX)
# libraries for OS X 10.9 desktop compiling # libraries for OS X 10.9 desktop compiling
@ -154,9 +187,9 @@ ifeq ($(PLATFORM),PLATFORM_WEB)
EXT = .html EXT = .html
endif 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 # in this case, the 'default' target entry is basic_game
default: basic_game all: basic_game
# compile template - basic_game # compile template - basic_game
basic_game: basic_game.c basic_game: basic_game.c

templates/basic_test/makefile → templates/basic_test/Makefile View File

@ -82,30 +82,64 @@ endif
# define any directories containing required header files # define any directories containing required header files
ifeq ($(PLATFORM),PLATFORM_RPI) ifeq ($(PLATFORM),PLATFORM_RPI)
INCLUDES = -I. -I../../src -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads INCLUDES = -I. -I../../src -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads
else endif
INCLUDES = -I. -I../../src -IC:/raylib/raylib/src ifeq ($(PLATFORM),PLATFORM_DESKTOP)
# external libraries headers # add standard directories for GNU/Linux
# GLFW3 ifeq ($(PLATFORM_OS),LINUX)
INCLUDES += -I../../external/glfw3/include INCLUDES = -I. -I../src -I/usr/local/include/raylib/
# GLEW else
INCLUDES += -I../../external/glew/include INCLUDES = -I. -I../../src -IC:/raylib/raylib/src
# OpenAL Soft # external libraries headers
INCLUDES += -I../../external/openal_soft/include # 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 endif
# define library paths containing required libs # define library paths containing required libs
ifeq ($(PLATFORM),PLATFORM_RPI) ifeq ($(PLATFORM),PLATFORM_RPI)
LFLAGS = -L. -L../../src -L/opt/vc/lib LFLAGS = -L. -L../../src -L/opt/vc/lib
else endif
LFLAGS = -L. -L../../src -LC:/raylib/raylib/src ifeq ($(PLATFORM),PLATFORM_DESKTOP)
# external libraries to link with # add standard directories for GNU/Linux
# GLFW3 ifeq ($(PLATFORM_OS),LINUX)
LFLAGS += -L../../external/glfw3/lib/$(LIBPATH) LFLAGS = -L. -L../../src
ifneq ($(PLATFORM_OS),OSX) else
# OpenAL Soft LFLAGS = -L. -L../../src -LC:/raylib/raylib/src
LFLAGS += -L../../external/openal_soft/lib/$(LIBPATH) # external libraries to link with
# GLEW # GLFW3
LFLAGS += -L../../external/glew/lib/$(LIBPATH) 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
endif endif
@ -116,9 +150,8 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
# libraries for Debian GNU/Linux desktop compiling # libraries for Debian GNU/Linux desktop compiling
# requires the following packages: # requires the following packages:
# libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev
LIBS = -lraylib -lglfw3 -lGLEW -lGL -lopenal -lm -pthread LIBS = -lraylib -lglfw3 -lGL -lopenal -lm -pthread -ldl -lX11 \
# on XWindow could require also below libraries, just uncomment -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor
#LIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor
else else
ifeq ($(PLATFORM_OS),OSX) ifeq ($(PLATFORM_OS),OSX)
# libraries for OS X 10.9 desktop compiling # libraries for OS X 10.9 desktop compiling
@ -153,9 +186,9 @@ ifeq ($(PLATFORM),PLATFORM_WEB)
EXT = .html EXT = .html
endif 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 # in this case, the 'default' target entry is basic_test
default: basic_test all: basic_test
# compile template - basic_test # compile template - basic_test
basic_test: basic_test.c basic_test: basic_test.c

templates/simple_game/makefile → templates/simple_game/Makefile View File

@ -83,30 +83,64 @@ endif
# define any directories containing required header files # define any directories containing required header files
ifeq ($(PLATFORM),PLATFORM_RPI) ifeq ($(PLATFORM),PLATFORM_RPI)
INCLUDES = -I. -I../../src -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads INCLUDES = -I. -I../../src -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads
else endif
INCLUDES = -I. -I../../src -IC:/raylib/raylib/src ifeq ($(PLATFORM),PLATFORM_DESKTOP)
# external libraries headers # add standard directories for GNU/Linux
# GLFW3 ifeq ($(PLATFORM_OS),LINUX)
INCLUDES += -I../../external/glfw3/include INCLUDES = -I. -I../src -I/usr/local/include/raylib/
# GLEW else
INCLUDES += -I../../external/glew/include INCLUDES = -I. -I../../src -IC:/raylib/raylib/src
# OpenAL Soft # external libraries headers
INCLUDES += -I../../external/openal_soft/include # 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 endif
# define library paths containing required libs # define library paths containing required libs
ifeq ($(PLATFORM),PLATFORM_RPI) ifeq ($(PLATFORM),PLATFORM_RPI)
LFLAGS = -L. -L../../src -L/opt/vc/lib LFLAGS = -L. -L../../src -L/opt/vc/lib
else endif
LFLAGS = -L. -L../../src -LC:/raylib/raylib/src ifeq ($(PLATFORM),PLATFORM_DESKTOP)
# external libraries to link with # add standard directories for GNU/Linux
# GLFW3 ifeq ($(PLATFORM_OS),LINUX)
LFLAGS += -L../../external/glfw3/lib/$(LIBPATH) LFLAGS = -L. -L../../src
ifneq ($(PLATFORM_OS),OSX) else
# OpenAL Soft LFLAGS = -L. -L../../src -LC:/raylib/raylib/src
LFLAGS += -L../../external/openal_soft/lib/$(LIBPATH) # external libraries to link with
# GLEW: Not used, replaced by GLAD # GLFW3
#LFLAGS += -L../../external/glew/lib/$(LIBPATH) 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
endif endif
@ -117,9 +151,8 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
# libraries for Debian GNU/Linux desktop compiling # libraries for Debian GNU/Linux desktop compiling
# requires the following packages: # requires the following packages:
# libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev
LIBS = -lraylib -lglfw3 -lGLEW -lGL -lopenal -lm -pthread LIBS = -lraylib -lglfw3 -lGL -lopenal -lm -pthread -ldl -lX11 \
# on XWindow could require also below libraries, just uncomment -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor
#LIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor
else else
ifeq ($(PLATFORM_OS),OSX) ifeq ($(PLATFORM_OS),OSX)
# libraries for OS X 10.9 desktop compiling # libraries for OS X 10.9 desktop compiling
@ -154,9 +187,9 @@ ifeq ($(PLATFORM),PLATFORM_WEB)
EXT = .html EXT = .html
endif 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 # in this case, the 'default' target entry is simple_game
default: simple_game all: simple_game
# compile template - simple_game # compile template - simple_game
simple_game: simple_game.c screens.o simple_game: simple_game.c screens.o

templates/standard_game/makefile → templates/standard_game/Makefile View File

@ -83,30 +83,64 @@ endif
# define any directories containing required header files # define any directories containing required header files
ifeq ($(PLATFORM),PLATFORM_RPI) ifeq ($(PLATFORM),PLATFORM_RPI)
INCLUDES = -I. -I../../src -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads INCLUDES = -I. -I../../src -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads
else endif
INCLUDES = -I. -I../../src -IC:/raylib/raylib/src ifeq ($(PLATFORM),PLATFORM_DESKTOP)
# external libraries headers # add standard directories for GNU/Linux
# GLFW3 ifeq ($(PLATFORM_OS),LINUX)
INCLUDES += -I../../external/glfw3/include INCLUDES = -I. -I../src -I/usr/local/include/raylib/
# GLEW else
INCLUDES += -I../../external/glew/include INCLUDES = -I. -I../../src -IC:/raylib/raylib/src
# OpenAL Soft # external libraries headers
INCLUDES += -I../../external/openal_soft/include # 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 endif
# define library paths containing required libs # define library paths containing required libs
ifeq ($(PLATFORM),PLATFORM_RPI) ifeq ($(PLATFORM),PLATFORM_RPI)
LFLAGS = -L. -L../../src -L/opt/vc/lib LFLAGS = -L. -L../../src -L/opt/vc/lib
else endif
LFLAGS = -L. -L../../src -LC:/raylib/raylib/src ifeq ($(PLATFORM),PLATFORM_DESKTOP)
# external libraries to link with # add standard directories for GNU/Linux
# GLFW3 ifeq ($(PLATFORM_OS),LINUX)
LFLAGS += -L../../external/glfw3/lib/$(LIBPATH) LFLAGS = -L. -L../../src
ifneq ($(PLATFORM_OS),OSX) else
# OpenAL Soft LFLAGS = -L. -L../../src -LC:/raylib/raylib/src
LFLAGS += -L../../external/openal_soft/lib/$(LIBPATH) # external libraries to link with
# GLEW: Not used, replaced by GLAD # GLFW3
#LFLAGS += -L../../external/glew/lib/$(LIBPATH) 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
endif endif
@ -117,9 +151,8 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
# libraries for Debian GNU/Linux desktop compiling # libraries for Debian GNU/Linux desktop compiling
# requires the following packages: # requires the following packages:
# libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev
LIBS = -lraylib -lglfw3 -lGLEW -lGL -lopenal -lm -pthread LIBS = -lraylib -lglfw3 -lGL -lopenal -lm -pthread -ldl -lX11 \
# on XWindow could require also below libraries, just uncomment -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor
#LIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor
else else
ifeq ($(PLATFORM_OS),OSX) ifeq ($(PLATFORM_OS),OSX)
# libraries for OS X 10.9 desktop compiling # libraries for OS X 10.9 desktop compiling
@ -162,9 +195,9 @@ SCREENS = \
screens/screen_gameplay.o \ screens/screen_gameplay.o \
screens/screen_ending.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 # in this case, the 'default' target entry is standard_game
default: standard_game all: standard_game
# compile template - standard_game # compile template - standard_game
standard_game: standard_game.c $(SCREENS) standard_game: standard_game.c $(SCREENS)

||||||
x
 
000:0
Loading…
Cancel
Save