windowsmakefilegnu-make

How to install and use "make" in Windows?


I'm following the instructions of someone whose repository I cloned to my machine. I want to use the make command as part of setting up the code environment, but I'm using Windows. I searched online, but I could only find a make.exe file, a make-4.1.tar.gz file (I don't know what to do with it next) and instructions for how to download MinGW (for GNU; but after installing it I didn't find any mention of "make").

How do I use make in Windows without a GNU compiler or related packages?


Solution

  • make is a GNU command so the only way you can get it on Windows is installing a Windows version like the one provided by GNUWin32. Anyway, there are several options for getting that:

    1. Directly download from Make for Windows

    2. Using Chocolatey. First you need to install this package manager. Once installed you simply need to install make (you may need to run it in an elevated/admin command prompt) :

      choco install make
      
    3. Other recommended option is installing a Windows Subsystem for Linux (WSL/WSL2), so you'll have a Linux distribution of your choice embedded in Windows 10 where you'll be able to install make, gccand all the tools you need to build C programs.

    4. For older Windows versions (MS Windows 2000 / XP / 2003 / Vista / 2008 / 7 with msvcrt.dll) you can use GnuWin32.

    An outdated alternative was MinGw, but the project seems to be abandoned so it's better to go for one of the previous choices.