Ana içeriğe geç

Windows’a MinGW-w64 ve Make Kurulumu

· loading · loading · ·
Kerim Turak
HDL Verilog HDL
HDL
Yazar
Kerim Turak
Digital IC Design & Verification Engineer
Table of Contents

1. Installing GNU Make
#

Although mingw32-make.exe comes with some MinGW packages, it may not work seamlessly as make. For consistency, install the actual make.exe.

1.1 Download Make
#

choco install make

or

scoop install make

1.2 Set Up Make Files
#

  1. Extract GNU Make to a directory like C:\make.

  2. Add this path to your system Path:

    C:\make\bin
    
  3. Open Terminal or CMD and run:

make --version

If you see something like:

GNU Make 4.3

Then Make was installed successfully.


2. Makefile Usage (Test Example)
#

Let’s test if everything works by compiling a simple C program using a Makefile.

2.1 Sample Files
#

File: hello.c

#include <stdio.h>

int main() {
    printf("Hello, MinGW!\n");
    return 0;
}

File: Makefile

CC=gcc
CFLAGS=-Wall

all: hello.exe

hello.exe: hello.c
	$(CC) $(CFLAGS) -o hello.exe hello.c

clean:
	rm -f hello.exe

2.2 Run Make
#

Open CMD or PowerShell, navigate to the folder:

cd C:\Users\kerim\mingw_test
make

Expected output:

gcc -Wall -o hello.exe hello.c

Run the program:

hello.exe

Expected result:

Hello, MinGW!

3. (Optional) Using MSYS2 for Easier MinGW Management
#

Alternatively, you can use MSYS2, which includes MinGW-w64 and a package manager (pacman).

3.1 Install MSYS2
#

pacman -Syu
pacman -S mingw-w64-x86_64-gcc
pacman -S mingw-w64-x86_64-make
  • To run make with MSYS2:
mingw32-make
  • To compile manually:
gcc hello.c -o hello.exe

✅ Conclusion
#

You can now run Makefiles on Windows using MinGW-w64 and GNU Make! 🎯

With this guide, you have:

  • ✅ Installed 64-bit GCC (MinGW-w64)
  • ✅ Installed GNU Make
  • ✅ Successfully tested Makefile execution

Related

RISC-V GCC Toolchain Kurulumu
· loading · loading
Kerim Turak
HDL Verilog HDL
HDL
RISC-V Imperas
· loading · loading
Kerim Turak
HDL Verilog HDL
HDL
RISC-V Ortamı Kurulumu
· loading · loading
Kerim Turak
HDL Verilog HDL
HDL
RISC-V Spike Kurulumu
· loading · loading
Kerim Turak
HDL Verilog HDL
HDL
SystemVerilog Formatter
· loading · loading
Kerim Turak
HDL Verilog HDL
HDL
Ubuntu Başlangıç Yüklemeleri
· loading · loading
Kerim Turak
HDL Verilog HDL
HDL