TechBuzzPro

How to Install and Use Make on Windows

· 6 min read · Windows & PC

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

You can install GNU Make on Windows in a few minutes by using a package manager such as Chocolatey or MSYS2, or by downloading a prebuilt binary. Once installed, you run make from a terminal in the folder containing your Makefile. The steps below cover the most reliable methods, how to verify the installation, and how to avoid the common pitfalls that trip up Windows users.

What You'll Need

  • A Windows 10 or Windows 11 PC with administrator rights (needed for system-wide installation).
  • A terminal: Command Prompt, PowerShell, or a Unix-like shell such as Git Bash or MSYS2.
  • An internet connection to download the installer or package manager.
  • Basic familiarity with running commands from a terminal.

Step-by-Step

  1. Choose an installation method. The two most practical options are Chocolatey (simplest for most users) and MSYS2 (best if you also need a Unix-like toolchain). A third option is downloading a prebuilt make.exe from a trusted source such as the ezwinports project on SourceForge, but package managers handle updates and dependencies more cleanly.
  2. Install Chocolatey (if using that method). Open PowerShell as Administrator (right-click Start, choose Terminal (Admin) or Windows PowerShell (Admin)). Run the official install command from the Chocolatey website. The command is a single long PowerShell line; copy it exactly from the official docs. After it finishes, close and reopen the terminal so the choco command is recognised.
  3. Install Make via Chocolatey. In an Administrator terminal, run choco install make. Confirm any prompts. Chocolatey downloads GNU Make and places it on your PATH automatically.
  4. Alternative: install via MSYS2. Download the MSYS2 installer from the official MSYS2 site and run it. After installation, open the MSYS2 UCRT64 (or MINGW64) terminal and run pacman -Syu to update the package database, then pacman -S make to install Make. This gives you a Unix-style environment where Make behaves like it does on Linux.
  5. Verify the installation. Open a new terminal (Command Prompt, PowerShell, or the MSYS2 shell) and run make --version. You should see output like GNU Make 4.x followed by copyright information. If you see “'make' is not recognized as an internal or external command”, the PATH has not updated—see Troubleshooting.
  6. Create a simple Makefile. In any folder, create a file named exactly Makefile (no extension). A minimal example that prints a message:
    hello:
    	echo Hello from Make on Windows
    
    Note that the indentation before echo must be a real tab character, not spaces. Most editors can be configured to insert tabs for Makefiles.
  7. Run Make. Open a terminal in that folder (in File Explorer, type cmd in the address bar and press Enter, or use “Open in Terminal”). Run make. You should see the echo output. Run make hello to invoke the target by name.
  8. Use Make with real build tasks. A typical C project Makefile might compile main.c into main.exe using gcc. For example:
    CC = gcc
    main.exe: main.c
    	$(CC) -o main.exe main.c
    clean:
    	del main.exe
    
    Run make to build and make clean to remove the output. On Windows, shell commands inside recipes run through cmd.exe by default, so use Windows commands (del, copy) unless you are in an MSYS2 or Git Bash environment where Unix commands are available.
  9. Understand the shell difference. GNU Make on Windows uses cmd.exe as its shell unless you set SHELL in the Makefile or run Make from a Unix-like terminal. This affects path separators, quoting, and available commands. If your Makefile was written for Linux, expect to adjust recipes or run it inside MSYS2.
  10. Add Make to PATH manually if needed. If you installed a standalone binary, place make.exe in a folder such as C:\Tools\make and add that folder to the system PATH via Settings > System > About > Advanced system settings > Environment Variables. Edit the Path variable and add the folder. Reopen terminals afterwards.

Common Mistakes

  • Using spaces instead of tabs. Make requires a tab character at the start of every recipe line. Spaces produce “missing separator” errors. Configure your editor to show whitespace and insert tabs for Makefiles.
  • Naming the file incorrectly. The file must be named Makefile (or makefile, or GNUmakefile). Makefile.txt will be ignored because Windows hides known extensions by default—enable “File name extensions” in File Explorer's View menu to check.
  • Running Make from the wrong folder. Make looks for the Makefile in the current directory. If you run it elsewhere, you get “No targets specified and no makefile found.” Use cd to navigate first, or pass -f path\to\Makefile.
  • Assuming Linux commands work. Recipes run in cmd.exe by default. Commands like rm, cp, and ls are not available unless you use MSYS2, Git Bash, or another Unix-like environment.
  • Forgetting to reopen the terminal. PATH changes only apply to new terminal sessions. After installing, close every terminal window and open a fresh one before testing make --version.

Tips

  • Use make -n to preview what Make would run without executing anything—handy for debugging recipes.
  • Use make -j4 to run up to four jobs in parallel on multi-core machines, speeding up builds.
  • Keep your Makefile in version control alongside your source code so builds are reproducible.
  • If you work with C or C++, install a compiler such as MinGW-w64 or use MSYS2's toolchain so Make has something to call.
  • Prefer MSYS2 if your project's Makefile assumes a Unix shell; it provides bash, rm, cp, and other tools that recipes commonly rely on.

Troubleshooting

  • “'make' is not recognized”. The PATH does not include Make's folder. Reopen the terminal; if it still fails, check that the install folder is in the system PATH (Environment Variables) and that make.exe exists there. Restart the PC if necessary.
  • “missing separator”. A recipe line starts with spaces instead of a tab. Fix the indentation in your editor.
  • “No targets specified and no makefile found”. You are in the wrong directory or the file is misnamed. Run dir to confirm the Makefile is present and named correctly.
  • Commands fail with “not recognized”. The recipe uses a Unix command that cmd.exe does not have. Either rewrite the recipe with Windows equivalents or run Make inside MSYS2 or Git Bash.
  • Permission errors during installation. Run the installer or package manager as Administrator. Chocolatey requires an elevated terminal.
  • Antivirus blocks the installer. Temporarily allow the download from the official source, or use the package manager, which typically avoids this issue.

Frequently Asked Questions

Do I need a compiler to use Make?

No. Make is a build automation tool that runs commands you specify. You only need a compiler if your Makefile invokes one, such as gcc for C code.

Can I use Make without installing anything?

Not reliably. Windows does not ship with GNU Make. You need to install it via a package manager or a prebuilt binary. Some IDEs bundle their own build tools, but those are not the same as a system-wide make command.

Why does my Makefile work on Linux but not on Windows?

Recipes run in cmd.exe by default, so Unix commands and path separators may fail. Running Make inside MSYS2 or Git Bash, or rewriting recipes with Windows commands, resolves most differences.

How do I uninstall Make?

If installed with Chocolatey, run choco uninstall make in an Administrator terminal. If installed via MSYS2, use pacman -R make. For a standalone binary, delete make.exe and remove its folder from PATH.

Does Make work in PowerShell?

Yes, you can run make from PowerShell, but recipes still execute through cmd.exe unless you change the SHELL variable in the Makefile. PowerShell-specific syntax inside recipes will not work as expected.

What is the difference between Make and NMake?

NMake is Microsoft's build tool that ships with Visual Studio. It uses similar concepts but a different syntax and is not compatible with GNU Makefiles. Use GNU Make if you want cross-platform Makefiles.