Install Make on Windows
Make is a build automation tool that reads Makefiles to compile and link code. Windows does not include Make by default, but you can add it through several straightforward methods. The two most common approaches are installing MSYS2, which provides a full Unix-like environment with make, or using Chocolatey, the Windows package manager, for a quicker command-line install. If you already use WSL (Windows Subsystem for Linux), make is available there as well. Each option has trade-offs in terms of integration with your existing workflow and how much of a Unix environment you want on your machine.
More from this site
Keep reading the latest coverage
Method 1: Install Make via MSYS2
MSYS2 provides a Unix-like terminal and package manager for Windows. It is the most common way to get a native GNU Make build environment.
Once installed, you can verify the setup by opening a new MSYS2 terminal and typing make --version. If the command prints a version number, make is ready to use. You can now run make inside the MSYS2 terminal or reference make from a script by using the full path to the MSYS2 binary.
Method 2: Install Make with Chocolatey
Chocolatey simplifies package management on Windows. If you already have Chocolatey installed, you can add make without managing a full Unix environment.
This method places make on your system PATH, so it works from any standard Windows command prompt or PowerShell window. It is the fastest route if you only need make and do not want the rest of the MSYS2 environment.
Method 3: Use WSL (Windows Subsystem for Linux)
If you develop inside WSL, make is already available in most Linux distributions. Open your WSL terminal and run the package manager for your distro, for example sudo apt install make on Ubuntu or Debian-based systems.
WSL is ideal if your project already lives in a Linux-like build environment. You can edit files in Windows and run make inside WSL, giving you access to the full GNU toolchain without dual-booting or using a virtual machine.
Verify Your Installation
Regardless of the method you chose, confirm that make is correctly installed by running a simple command in a new terminal window.
| Command | Expected Output | Context |
|---|---|---|
| make --version | GNU Make version string | Confirms make is on PATH |
| where make (CMD) or which make (MSYS2/WSL) | Full path to make executable | Shows which make is being used |
If the command is not recognized, restart your terminal or check that the installation directory is on your system PATH. For MSYS2, the make executable typically lives under C:\msys64\usr\bin. For Chocolatey, it is usually in C:\ProgramData\chocolatey\lib\make or a similar location on PATH.
Basic Make Usage on Windows
Once make is installed, create a file named Makefile in your project directory. A minimal Makefile defines targets and the commands to build them. For example, a simple C project might have a target that runs gcc to compile source files. Run make in the same directory as the Makefile, and make will execute the default target.
Make reads the Makefile line by line, executing each shell command in the context of a terminal. On Windows, MSYS2 and WSL provide a POSIX-compatible shell, while Chocolatey-installed make runs in cmd.exe or PowerShell by default. If your Makefile uses Unix-specific shell syntax, MSYS2 or WSL will give you fewer compatibility issues.
Troubleshooting Common Issues
- make not found: The terminal session may be old. Close and reopen it, or manually add the make installation directory to your PATH.
- Permission errors: On MSYS2, ensure the terminal is running with the correct environment (MINGW64 or UCRT64) and that you have write permissions to the project directory.
- Shell incompatibility: If a recipe fails because it expects bash features, switch to MSYS2 or WSL where a bash-compatible shell is available.
Installing make on Windows is a single-step process once you choose the right method for your workflow. MSYS2 gives you the most complete build environment, Chocolatey is the quickest for a standalone install, and WSL keeps you inside a Linux ecosystem. After installation, a simple make --version confirms everything is working and your build automation is ready.