diff --git a/external/glfw3/glfw3.dll b/external/glfw3/glfw3.dll deleted file mode 100644 index b5457bde3..000000000 Binary files a/external/glfw3/glfw3.dll and /dev/null differ diff --git a/external/openal_soft/openal32.dll b/external/openal_soft/openal32.dll deleted file mode 100644 index 1e3bddd56..000000000 Binary files a/external/openal_soft/openal32.dll and /dev/null differ diff --git a/src/Makefile b/src/Makefile index 244675e2f..7f15bd2f8 100644 --- a/src/Makefile +++ b/src/Makefile @@ -81,14 +81,14 @@ CFLAGS = -O1 -Wall -std=gnu99 -fgnu89-inline -Wno-missing-braces # define any directories containing required header files ifeq ($(PLATFORM),PLATFORM_RPI) - INCLUDES = -I. -I/opt/vc/include -I/opt/vc/include/interface/vmcs_host/linux -I/opt/vc/include/interface/vcos/pthreads + INCLUDES = -I. -Iexternal -I/opt/vc/include -I/opt/vc/include/interface/vmcs_host/linux -I/opt/vc/include/interface/vcos/pthreads else - INCLUDES = -I. -I../src -# external libraries headers -# GLFW3 - INCLUDES += -I../external/glfw3/include -# OpenAL Soft - INCLUDES += -I../external/openal_soft/include +# STB libraries and others + INCLUDES = -I. -Iexternal +# GLFW3 library + INCLUDES += -Iexternal/glfw3/include +# OpenAL Soft library + INCLUDES += -Iexternal/openal_soft/include endif # define all object files required @@ -121,10 +121,6 @@ core.o: core.c rlgl.o: rlgl.c $(CC) -c rlgl.c $(CFLAGS) $(INCLUDES) -D$(PLATFORM) -D$(GRAPHICS) -# compile glad module -glad.o: glad.c - $(CC) -c glad.c $(CFLAGS) $(INCLUDES) - # compile shapes module shapes.o: shapes.c $(CC) -c shapes.c $(CFLAGS) $(INCLUDES) -D$(PLATFORM) -D$(GRAPHICS) @@ -145,10 +141,6 @@ models.o: models.c audio.o: audio.c $(CC) -c audio.c $(CFLAGS) $(INCLUDES) -D$(PLATFORM) -# compile stb_vorbis library -stb_vorbis.o: stb_vorbis.c - $(CC) -c stb_vorbis.c -O1 $(INCLUDES) -D$(PLATFORM) - # compile utils module utils.o: utils.c $(CC) -c utils.c $(CFLAGS) $(INCLUDES) -D$(PLATFORM) @@ -161,6 +153,14 @@ camera.o: camera.c gestures.o: gestures.c $(CC) -c gestures.c $(CFLAGS) $(INCLUDES) -D$(PLATFORM) +# compile glad module +glad.o: external/glad.c + $(CC) -c external/glad.c $(CFLAGS) $(INCLUDES) + +# compile stb_vorbis library +stb_vorbis.o: external/stb_vorbis.c + $(CC) -c external/stb_vorbis.c -O1 $(INCLUDES) -D$(PLATFORM) + # clean everything clean: ifeq ($(PLATFORM),PLATFORM_DESKTOP) diff --git a/src/audio.c b/src/audio.c index b5514b12b..ad1d7ebaf 100644 --- a/src/audio.c +++ b/src/audio.c @@ -51,13 +51,13 @@ #endif //#define STB_VORBIS_HEADER_ONLY -#include "stb_vorbis.h" // OGG loading functions +#include "external/stb_vorbis.h" // OGG loading functions #define JAR_XM_IMPLEMENTATION -#include "jar_xm.h" // XM loading functions +#include "external/jar_xm.h" // XM loading functions #define JAR_MOD_IMPLEMENTATION -#include "jar_mod.h" // MOD loading functions +#include "external/jar_mod.h" // MOD loading functions //---------------------------------------------------------------------------------- // Defines and Macros diff --git a/src/core.c b/src/core.c index d229e1f86..4ba7505b9 100644 --- a/src/core.c +++ b/src/core.c @@ -55,11 +55,11 @@ #include // Macros for reporting and retrieving error conditions through error codes #if defined(PLATFORM_OCULUS) - #define PLATFORM_DESKTOP // Enable PLATFORM_DESKTOP code-base + #define PLATFORM_DESKTOP // Enable PLATFORM_DESKTOP code-base #endif #if defined(PLATFORM_DESKTOP) - #include "glad.h" // GLAD library: Manage OpenGL headers and extensions + #include "external/glad.h" // GLAD library: Manage OpenGL headers and extensions #endif #if defined(PLATFORM_OCULUS) diff --git a/src/glad.c b/src/external/glad.c similarity index 100% rename from src/glad.c rename to src/external/glad.c diff --git a/src/glad.h b/src/external/glad.h similarity index 100% rename from src/glad.h rename to src/external/glad.h diff --git a/external/glfw3/COPYING.txt b/src/external/glfw3/COPYING.txt similarity index 100% rename from external/glfw3/COPYING.txt rename to src/external/glfw3/COPYING.txt diff --git a/external/glfw3/include/GLFW/glfw3.h b/src/external/glfw3/include/GLFW/glfw3.h similarity index 100% rename from external/glfw3/include/GLFW/glfw3.h rename to src/external/glfw3/include/GLFW/glfw3.h diff --git a/external/glfw3/include/GLFW/glfw3native.h b/src/external/glfw3/include/GLFW/glfw3native.h similarity index 100% rename from external/glfw3/include/GLFW/glfw3native.h rename to src/external/glfw3/include/GLFW/glfw3native.h diff --git a/external/glfw3/lib/linux/libglfw3.a b/src/external/glfw3/lib/linux/libglfw3.a similarity index 100% rename from external/glfw3/lib/linux/libglfw3.a rename to src/external/glfw3/lib/linux/libglfw3.a diff --git a/external/glfw3/lib/osx/libglfw.3.0.dylib b/src/external/glfw3/lib/osx/libglfw.3.0.dylib similarity index 100% rename from external/glfw3/lib/osx/libglfw.3.0.dylib rename to src/external/glfw3/lib/osx/libglfw.3.0.dylib diff --git a/external/glfw3/lib/osx/libglfw.3.dylib b/src/external/glfw3/lib/osx/libglfw.3.dylib similarity index 100% rename from external/glfw3/lib/osx/libglfw.3.dylib rename to src/external/glfw3/lib/osx/libglfw.3.dylib diff --git a/external/glfw3/lib/osx/libglfw.dylib b/src/external/glfw3/lib/osx/libglfw.dylib similarity index 100% rename from external/glfw3/lib/osx/libglfw.dylib rename to src/external/glfw3/lib/osx/libglfw.dylib diff --git a/external/glfw3/lib/win32/libglfw3.a b/src/external/glfw3/lib/win32/libglfw3.a similarity index 100% rename from external/glfw3/lib/win32/libglfw3.a rename to src/external/glfw3/lib/win32/libglfw3.a diff --git a/external/glfw3/lib/win32/libglfw3dll.a b/src/external/glfw3/lib/win32/libglfw3dll.a similarity index 100% rename from external/glfw3/lib/win32/libglfw3dll.a rename to src/external/glfw3/lib/win32/libglfw3dll.a diff --git a/src/jar_mod.h b/src/external/jar_mod.h similarity index 100% rename from src/jar_mod.h rename to src/external/jar_mod.h diff --git a/src/jar_xm.h b/src/external/jar_xm.h similarity index 100% rename from src/jar_xm.h rename to src/external/jar_xm.h diff --git a/external/openal_soft/COPYING b/src/external/openal_soft/COPYING similarity index 100% rename from external/openal_soft/COPYING rename to src/external/openal_soft/COPYING diff --git a/external/openal_soft/include/AL/al.h b/src/external/openal_soft/include/AL/al.h similarity index 100% rename from external/openal_soft/include/AL/al.h rename to src/external/openal_soft/include/AL/al.h diff --git a/external/openal_soft/include/AL/alc.h b/src/external/openal_soft/include/AL/alc.h similarity index 100% rename from external/openal_soft/include/AL/alc.h rename to src/external/openal_soft/include/AL/alc.h diff --git a/external/openal_soft/include/AL/alext.h b/src/external/openal_soft/include/AL/alext.h similarity index 100% rename from external/openal_soft/include/AL/alext.h rename to src/external/openal_soft/include/AL/alext.h diff --git a/external/openal_soft/include/AL/efx-creative.h b/src/external/openal_soft/include/AL/efx-creative.h similarity index 100% rename from external/openal_soft/include/AL/efx-creative.h rename to src/external/openal_soft/include/AL/efx-creative.h diff --git a/external/openal_soft/include/AL/efx-presets.h b/src/external/openal_soft/include/AL/efx-presets.h similarity index 100% rename from external/openal_soft/include/AL/efx-presets.h rename to src/external/openal_soft/include/AL/efx-presets.h diff --git a/external/openal_soft/include/AL/efx.h b/src/external/openal_soft/include/AL/efx.h similarity index 100% rename from external/openal_soft/include/AL/efx.h rename to src/external/openal_soft/include/AL/efx.h diff --git a/external/openal_soft/lib/win32/libOpenAL32.dll.a b/src/external/openal_soft/lib/win32/libOpenAL32.dll.a similarity index 100% rename from external/openal_soft/lib/win32/libOpenAL32.dll.a rename to src/external/openal_soft/lib/win32/libOpenAL32.dll.a diff --git a/src/stb_image.h b/src/external/stb_image.h similarity index 100% rename from src/stb_image.h rename to src/external/stb_image.h diff --git a/src/stb_image_resize.h b/src/external/stb_image_resize.h similarity index 100% rename from src/stb_image_resize.h rename to src/external/stb_image_resize.h diff --git a/src/stb_image_write.h b/src/external/stb_image_write.h similarity index 100% rename from src/stb_image_write.h rename to src/external/stb_image_write.h diff --git a/src/stb_rect_pack.h b/src/external/stb_rect_pack.h similarity index 100% rename from src/stb_rect_pack.h rename to src/external/stb_rect_pack.h diff --git a/src/stb_truetype.h b/src/external/stb_truetype.h similarity index 100% rename from src/stb_truetype.h rename to src/external/stb_truetype.h diff --git a/src/stb_vorbis.c b/src/external/stb_vorbis.c similarity index 100% rename from src/stb_vorbis.c rename to src/external/stb_vorbis.c diff --git a/src/stb_vorbis.h b/src/external/stb_vorbis.h similarity index 100% rename from src/stb_vorbis.h rename to src/external/stb_vorbis.h diff --git a/src/tinfl.c b/src/external/tinfl.c similarity index 100% rename from src/tinfl.c rename to src/external/tinfl.c diff --git a/src/libraylib.bc b/src/libraylib.bc index 21039250f..0b385eb88 100644 Binary files a/src/libraylib.bc and b/src/libraylib.bc differ diff --git a/src/rlgl.c b/src/rlgl.c index 756fba757..9a102c014 100644 --- a/src/rlgl.c +++ b/src/rlgl.c @@ -48,7 +48,7 @@ #ifdef __APPLE__ #include // OpenGL 3 library for OSX #else - #include "glad.h" // GLAD library, includes OpenGL headers + #include "external/glad.h" // GLAD library, includes OpenGL headers #endif #endif diff --git a/src/text.c b/src/text.c index cef0ebcbf..b5f7ad0cf 100644 --- a/src/text.c +++ b/src/text.c @@ -34,7 +34,7 @@ // Following libs are used on LoadTTF() #define STB_TRUETYPE_IMPLEMENTATION -#include "stb_truetype.h" // Required for: stbtt_BakeFontBitmap() +#include "external/stb_truetype.h" // Required for: stbtt_BakeFontBitmap() // Rectangle packing functions (not used at the moment) //#define STB_RECT_PACK_IMPLEMENTATION diff --git a/src/textures.c b/src/textures.c index 432d34266..518348f40 100644 --- a/src/textures.c +++ b/src/textures.c @@ -40,12 +40,12 @@ // NOTE: Includes Android fopen function map #define STB_IMAGE_IMPLEMENTATION -#include "stb_image.h" // Required for: stbi_load() +#include "external/stb_image.h" // Required for: stbi_load() // NOTE: Used to read image data (multiple formats support) #define STB_IMAGE_RESIZE_IMPLEMENTATION -#include "stb_image_resize.h" // Required for: stbir_resize_uint8() - // NOTE: Used for image scaling on ImageResize() +#include "external/stb_image_resize.h" // Required for: stbir_resize_uint8() + // NOTE: Used for image scaling on ImageResize() //---------------------------------------------------------------------------------- // Defines and Macros diff --git a/src/utils.c b/src/utils.c index 97561ee67..5340b3e53 100644 --- a/src/utils.c +++ b/src/utils.c @@ -42,10 +42,11 @@ #if defined(PLATFORM_DESKTOP) || defined(PLATFORM_RPI) #define STB_IMAGE_WRITE_IMPLEMENTATION - #include "stb_image_write.h" // Required for: stbi_write_png() + #include "external/stb_image_write.h" // Required for: stbi_write_png() #endif -#include "tinfl.c" +#include "external/tinfl.c" // Required for: tinfl_decompress_mem_to_mem() + // NOTE: Deflate algorythm data decompression //---------------------------------------------------------------------------------- // Global Variables Definition