{{announcement.body}}
{{announcement.title}}

The makefile Command in Windows [Snippet]

DZone 's Guide to

The makefile Command in Windows [Snippet]

Want an easy way to run make commands in Windows? Here's a simple solution.

· Open Source Zone ·
Free Resource

There are many misconceptions surrounding the working and usage of the famous make command in Windows.

Many people either end up using use nmakewhich is a make utility by Microsoft and is available via Visual Studio or install Cygwin, a Unix-like environment for Windows.

But all this extra effort is completely unnecessary when you have gnuwin32, which provides all GNU open source tools for Windows and offers them in the same flavor as in Linux.

Below is an easy 3-step installation guide for getting and using gnuwin32's make command: 

  1. Download binaries and dependencies from http://gnuwin32.sourceforge.net/packages/make.htm
  2. Extract both the packages into a directory, preferably C:\Program Files\GnuWin\
  3. Add the location of the bin folder inside that directory to the windows PATH environment variable.   
 Sample run: make label (On windows command prompt or any shell of your preference) 


Now that the Windows 10 distribution comes bundled with the capability to run Linux as a subsystem, you can directly enable that feature and use make command in the bash shell (in my opinion, if you can do that, you should definitely do it). Nonetheless, the above-mentioned steps work in all flavors of Windows OS


Follow me on twitter at @IamShivamMohan

Topics:
windows ,gnu ,open source ,make command ,makefile

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}