diff options
| author | victorfisac <[email protected]> | 2016-11-21 20:27:43 +0100 |
|---|---|---|
| committer | victorfisac <[email protected]> | 2016-11-21 20:27:43 +0100 |
| commit | 0716125ee93db7539a27e831eba3c856f55601ab (patch) | |
| tree | b4ee417efa904f26b6b08bd25d66538ebe267283 /examples/Makefile | |
| parent | 80f6b2f9635d8e4707b528337c39c0ba7bf9cf5f (diff) | |
| parent | 918fc002d0e75f5ea15036634edf8aa3fba9bedc (diff) | |
| download | raylib-0716125ee93db7539a27e831eba3c856f55601ab.tar.gz raylib-0716125ee93db7539a27e831eba3c856f55601ab.zip | |
Merge remote-tracking branch 'refs/remotes/raysan5/develop' into develop
Diffstat (limited to 'examples/Makefile')
| -rw-r--r-- | examples/Makefile | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/examples/Makefile b/examples/Makefile index 378f5edf..2cb75ff9 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -2,6 +2,8 @@ # # raylib makefile for desktop platforms, Raspberry Pi and HTML5 (emscripten) # +# NOTE: By default examples are compiled using raylib static library and OpenAL Soft shared library +# # Copyright (c) 2013-2016 Ramon Santamaria (@raysan5) # # This software is provided "as-is", without any express or implied warranty. In no event @@ -26,6 +28,9 @@ # WARNING: To compile to HTML5, code must be redesigned to use emscripten.h and emscripten_set_main_loop() PLATFORM ?= PLATFORM_DESKTOP +# define NO to use OpenAL Soft as static library (shared by default) +SHARED_OPENAL ?= YES + # determine PLATFORM_OS in case PLATFORM_DESKTOP selected ifeq ($(PLATFORM),PLATFORM_DESKTOP) # No uname.exe on MinGW!, but OS=Windows_NT on Windows! ifeq ($(UNAME),Msys) -> Windows @@ -62,12 +67,13 @@ endif # define compiler flags: # -O2 defines optimization level +# -s strip unnecessary data from build # -Wall turns on most, but not all, compiler warnings # -std=c99 use standard C from 1999 revision ifeq ($(PLATFORM),PLATFORM_RPI) - CFLAGS = -O2 -Wall -std=gnu99 -fgnu89-inline + CFLAGS = -O2 -s -Wall -std=gnu99 -fgnu89-inline else - CFLAGS = -O2 -Wall -std=c99 + CFLAGS = -O2 -s -Wall -std=c99 endif ifeq ($(PLATFORM),PLATFORM_WEB) CFLAGS = -O1 -Wall -std=c99 -s USE_GLFW=3 -s ASSERTIONS=1 --preload-file resources @@ -151,7 +157,14 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) else # libraries for Windows desktop compiling # NOTE: GLFW3 and OpenAL Soft libraries should be installed - LIBS = -lraylib -lglfw3 -lopengl32 -lopenal32 -lgdi32 + LIBS = -lraylib -lglfw3 -lopengl32 -lgdi32 + # if static OpenAL Soft required, define the corresponding libs + ifeq ($(SHARED_OPENAL),NO) + LIBS += -lopenal32 -lwinmm + CFLAGS += -Wl,-allow-multiple-definition + else + LIBS += -lopenal32dll + endif endif endif endif @@ -215,6 +228,8 @@ EXAMPLES = \ text_format_text \ text_font_select \ text_writing_anim \ + text_ttf_loading \ + text_bmfont_unordered \ models_geometric_shapes \ models_box_collisions \ models_billboard \ @@ -400,6 +415,14 @@ text_font_select: text_font_select.c text_writing_anim: text_writing_anim.c $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) +# compile [text] example - text ttf loading +text_ttf_loading: text_ttf_loading.c + $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) + +# compile [text] example - text bmfont unordered +text_bmfont_unordered: text_bmfont_unordered.c + $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) + # compile [models] example - basic geometric 3d shapes models_geometric_shapes: models_geometric_shapes.c $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDES) $(LFLAGS) $(LIBS) -D$(PLATFORM) $(WINFLAGS) |
