The makefile Command in Windows [Snippet]
Want an easy way to run make commands in Windows? Here's a simple solution.
Join the DZone community and get the full member experience.Join For Free
There are many misconceptions surrounding the working and usage of the famous make command in Windows.
Many people either end up using use nmake, which 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:
- Download binaries and dependencies from http://gnuwin32.sourceforge.net/packages/make.htm
- Extract both the packages into a directory, preferably C:\Program Files\GnuWin\
- 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
Opinions expressed by DZone contributors are their own.
How to Use an Anti-Corruption Layer Pattern for Improved Microservices Communication
How To Use Git Cherry-Pick to Apply Selected Commits
Deploying Smart Contract on Ethereum Blockchain
A Complete Guide to Agile Software Development