Basic makefile for c program
It's followed by the dependencies which as you can see is the OBJS macro, because Then we set the "OBJ_NAME" macro that specifiesĪfter setting these two macros, we have the "all" target which compiles the program. At the top we declare and set the "OBJS" macro which specifies which files we're compiling. Menu either by A) right clicking My Computer and selecting Properties or B) going to the Control Panel and selecting the system menu. In a directory I created C:\mingw_dev_lib 2)Next you're going to want to get up the path for mingw so you can run mingw commands in any directory. I recommend putting it in a folder that you dedicate to holding all your development libraries for MinGW. Inside of i686-w64-mingw32 are the include, lib, and bin folders which contain everything we need compile and run SDL applications.
It doesn't matter if you have a 64bit operating system, since we are compiling 32bit binaries we will be using the 32bit library. We will be using the 32bit binaries for this tutorial set. This is important: most compilers still compile 32bit binaries by default to maximize compatibility.
That folder there should be a bunch of folders and files, most importantly i686-w64-mingw32 which contains the 32bit library and x86_64-w64-mingw32 whichĬontains the 64bit library. Open up the tar archive and the should be a folder called SDL2-2. Open the gzip archive and there should be a tar archive.