You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

174 lines
12 KiB

::basic_c_compilation
echo > Setup required Environment
echo -------------------------------------
SET RAYLIB_DIR=C:\raylib
ENV_SET PATH=$(RAYLIB_DIR)\mingw32\bin
cd $(CURRENT_DIRECTORY)
echo
echo > Compile simple C file
echo ----------------------------
gcc -o $(NAME_PART).exe $(FILE_NAME) -Wall -std=c99
echo
echo > Reset Environment
echo --------------------------
ENV_UNSET PATH
::raylib_compile_execute
echo > Setup required Environment
echo -------------------------------------
SET RAYLIB_DIR=C:\raylib
ENV_SET PATH=$(RAYLIB_DIR)\mingw32\bin
cd $(CURRENT_DIRECTORY)
echo
echo > Cleaning latest build
echo ---------------------------
cmd /c IF EXIST $(NAME_PART).exe del /F $(NAME_PART).exe
echo
echo > Compiling program
echo --------------------------
gcc -o $(NAME_PART).exe $(FILE_NAME) -s $(RAYLIB_DIR)\raylib\raylib.rc.o -I../../src -Iexternal -static -lraylib -lopengl32 -lgdi32 -lwinmm -std=c99
echo
echo > Reset Environment
echo --------------------------
ENV_UNSET PATH
echo
echo > Executing program
echo -------------------------
cmd /c IF EXIST $(NAME_PART).exe $(NAME_PART).exe
::raylib_makefile
echo > Choose compile options
echo -------------------------------
echo Set desired PLATFORM: DESKTOP, RPI, ANDROID, WEB
SET PLATFORM=PLATFORM_DESKTOP
echo
echo > Setup required Environment
echo -------------------------------------
SET RAYLIB_PATH=C:\raylib
ENV_SET PATH=$(RAYLIB_PATH)\mingw32\bin
cd $(CURRENT_DIRECTORY)
echo
echo > Execute makefile
echo -----------------------
mingw32-make PLATFORM=$(PLATFORM) -B
echo
echo > Reset Environment
echo --------------------------
ENV_UNSET PATH
::raylib_source_compile
echo > Choose compile options
echo -------------------------------
echo Set desired OpenGL API version: 1.1, 2.1, 3.3
SET GRAPHIC_API=GRAPHICS_API_OPENGL_33
echo
echo > Setup required Environment
echo -------------------------------------
SET RAYLIB_DIR=C:\raylib
ENV_SET PATH=$(RAYLIB_DIR)\mingw32\bin
//cd $(RAYLIB_DIR)\raylib\src
cd $(CURRENT_DIRECTORY)
echo
echo > Cleaning latest build
echo ---------------------------
cmd /c del /F *.o
cmd /c del /F libraylib.a
echo
echo > Compile raylib modules
echo ------------------------------
gcc -O2 -c rglfw.c -Wall -I. -Iexternal/glfw/include
gcc -O2 -c core.c -std=c99 -Wall -Iexternal/glfw/include -DPLATFORM_DESKTOP
gcc -O2 -c rlgl.c -std=c99 -Wall -D$(GRAPHIC_API)
gcc -O2 -c shapes.c -std=c99 -Wall -DPLATFORM_DESKTOP
gcc -O2 -c textures.c -std=c99 -Wall -DPLATFORM_DESKTOP
gcc -O2 -c text.c -std=c99 -Wall -DPLATFORM_DESKTOP
gcc -O2 -c models.c -std=c99 -Wall -DPLATFORM_DESKTOP
gcc -O2 -c audio.c -std=c99 -Wall -DPLATFORM_DESKTOP
gcc -O2 -c external/stb_vorbis.c -Wall -I.
gcc -O2 -c external/mini_al.c -Wall -I.
gcc -O2 -c utils.c -std=c99 -Wall -DPLATFORM_DESKTOP
echo
echo > Generate raylib library
echo ------------------------------
ar rcs libraylib.a core.o rglfw.o rlgl.o shapes.o textures.o text.o models.o audio.o mini_al.o stb_vorbis.o utils.o
echo
echo > Installing raylib library
echo -----------------------------
cmd /c copy raylib.h $(RAYLIB_DIR)\mingw32\i686-w64-mingw32\include /Y
cmd /c copy libraylib.a $(RAYLIB_DIR)\mingw32\i686-w64-mingw32\lib /Y
cmd /c copy raylib.h ..\release\include\raylib.h /Y
cmd /c copy libraylib.a ..\release\libs\win32\mingw32\libraylib.a /Y
echo
echo > Reset Environment
echo --------------------------
ENV_UNSET PATH
::raylib_source_compile_tcc
echo > Choose compile options
echo -------------------------------
echo Set desired OpenGL API version: 1.1, 2.1, 3.3
SET GRAPHIC_API=GRAPHICS_API_OPENGL_33
echo
echo > Setup required Environment
echo -------------------------------------
SET RAYLIB_DIR=C:\raylib
ENV_SET PATH=$(RAYLIB_DIR)\tcc
//cd $(RAYLIB_DIR)\raylib\src
cd $(CURRENT_DIRECTORY)
echo
echo > Cleaning latest build
echo ---------------------------
cmd /c del /F *.o
cmd /c del /F libraylib.a
echo
echo > Compile raylib modules
echo ------------------------------
tcc -c rglfw.c -Wall -I. -Iexternal/glfw/include
tcc -c core.c -std=c99 -Wall -Iexternal/glfw/include -DPLATFORM_DESKTOP
tcc -c rlgl.c -std=c99 -Wall -D$(GRAPHIC_API)
tcc -c shapes.c -std=c99 -Wall -DPLATFORM_DESKTOP
tcc -c textures.c -std=c99 -Wall -DPLATFORM_DESKTOP
tcc -c text.c -std=c99 -Wall -DPLATFORM_DESKTOP
tcc -c models.c -std=c99 -Wall -DPLATFORM_DESKTOP
tcc -c audio.c -std=c99 -Wall -DPLATFORM_DESKTOP
tcc -c external/stb_vorbis.c -Wall -I.
tcc -c external/mini_al.c -Wall -I.
tcc -c utils.c -std=c99 -Wall -DPLATFORM_DESKTOP
echo
echo > Generate raylib library
echo ------------------------------
tcc -ar rcs libraylib.a core.o rglfw.o rlgl.o shapes.o textures.o text.o models.o utils.o audio.o mini_al.o stb_vorbis.o utils.o
echo
echo > Installing raylib library
echo -----------------------------
cmd /c copy raylib.h $(RAYLIB_DIR)\mingw32\i686-w64-mingw32\include /Y
cmd /c copy libraylib.a $(RAYLIB_DIR)\mingw32\i686-w64-mingw32\lib /Y
cmd /c copy raylib.h ..\release\include\raylib.h /Y
cmd /c copy libraylib.a ..\release\libs\win32\mingw32\libraylib.a /Y
echo
echo > Reset Environment
echo --------------------------
ENV_UNSET PATH
::raylib_compile_execute_tcc
echo > Setup required Environment
echo -------------------------------------
SET RAYLIB_DIR=C:\raylib
ENV_SET PATH=$(RAYLIB_DIR)\tcc
cd $(CURRENT_DIRECTORY)
echo
echo > Cleaning latest build
echo ---------------------------
cmd /c IF EXIST $(NAME_PART).exe del /F $(NAME_PART).exe
echo
echo > Compiling program
echo --------------------------
tcc -o $(NAME_PART).exe $(FILE_NAME) -s -IC:\GitHub/raylib/src -LC:\GitHub/raylib/src -lraylib -lopengl32 -lgdi32 -std=c99 -Wall
echo
echo > Reset Environment
echo --------------------------
ENV_UNSET PATH
echo
echo > Executing program
echo -------------------------
cmd /c IF EXIST $(NAME_PART).exe $(NAME_PART).exe