From 67a389b59685e0dd8f7080da1d4b0e70eaf0a02c Mon Sep 17 00:00:00 2001 From: Ray Date: Mon, 5 Jun 2017 23:31:09 +0200 Subject: [PATCH] Created Use raylib with Code Blocks (markdown) --- Use-raylib-with-Code-Blocks.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Use-raylib-with-Code-Blocks.md diff --git a/Use-raylib-with-Code-Blocks.md b/Use-raylib-with-Code-Blocks.md new file mode 100644 index 0000000..8a7811b --- /dev/null +++ b/Use-raylib-with-Code-Blocks.md @@ -0,0 +1,34 @@ +Guide provided by [Mark in raylib forum](http://forum.raylib.com/index.php?p=/discussion/133/raylib-in-code-blocks-a-how-to) + +First, under Project Settings check the box that says, *"This is a custom Makefile"*. + +Then, in your project's folder create a file named Makefile and paste the following: +```make +files = main.c +output = main.exe + +Debug: + gcc -g -o obj\Debug\$(output) $(files) \ + c:\raylib\raylib\raylib_icon \ + -Ic:\raylib\raylib\src \ + -Lc:\raylib\MinGW\bin \ + -Lc:\raylib\MinGW\include\GLFW \ + -Iexternal -lraylib -lglfw3 -lopengl32 -lgdi32 -lopenal32 -lwinmm \ + -std=c99 -Wl,-allow-multiple-definition -Wl,--subsystem,windows -Wall + +Release: + gcc -s -o obj\Debug\$(output) $(files) \ + c:\raylib\raylib\raylib_icon \ + -Ic:\raylib\raylib\src \ + -Lc:\raylib\MinGW\bin \ + -Lc:\raylib\MinGW\include\GLFW \ + -Iexternal -lraylib -lglfw3 -lopengl32 -lgdi32 -lopenal32 -lwinmm \ + -std=c99 -Wl,-allow-multiple-definition -Wl,--subsystem,windows + +cleanDebug: + del /F /Q obj\Debug\*.* + +cleanRelease: + del /F /Q obj\Release\*.* +``` +Change files and output variables as you see fit. \ No newline at end of file