Installing Make on Windows: Step-by-Step Guide #
Make
is a widely used build automation tool, mostly found on Linux and macOS systems. To use Make
on Windows, you need to install some additional tools. This guide walks you through how to install and configure Make
on Windows.
1. Install MSYS2 #
MSYS2 provides a Unix-like environment for Windows and includes tools like make
.
-
Step 1: Download MSYS2 from the official website: https://www.msys2.org/
-
Step 2: Run the installer and complete the installation.
-
Step 3: Launch MSYS2. Upon first launch, update the package database and core system packages:
pacman -Syu pacman -Su
⚠️ This step might take a few minutes.
2. Install Make #
Run the following command in the MSYS2 terminal to install make
:
pacman -S make
This will download and install GNU Make using MSYS2’s pacman
package manager.
3. Verify the Installation #
To confirm that make
is installed correctly, run:
make --version
You should see an output like:
GNU Make 4.x
...
4. Add Make to System PATH (Optional but Recommended) #
To use make
from anywhere in the command line (e.g., PowerShell or CMD), you need to add MSYS2’s bin
directory to your system PATH
.
-
Step 1: Open the “Environment Variables” window via the Start Menu.
-
Step 2: Go to System Properties → Advanced → Environment Variables.
-
Step 3: Under System Variables, find and edit the
Path
variable. -
Step 4: Click New and add:
C:\msys64\usr\bin
-
Step 5: Save and restart your computer.
5. Use Make #
Now, you can open a terminal (CMD or PowerShell) and run:
make --version
You should see the version information of GNU Make, which confirms everything is working properly.
Troubleshooting #
-
If
make
is not recognized, double-check that thePath
variable includes the correct MSYS2 path. -
Ensure MSYS2 is up to date:
pacman -Syu
-
Restart your system after updating environment variables.