My first post in this series ended with an attempt to build GNU make from the source code. I decided to investigate the possibilities for installing GNU make on a Windows system, and indeed I found a much easier method than building it from the source code: namely, install Cygwin and use its package manager to also install GNU make.
To review, Cygwin is: 1) a DLL which acts as a Linux API emulation layer providing substantial Linux API functionality; 2) a collection of tools which provide Linux look and feel.
Why do we need such a tool if we want to work with Threading Building Blocks on a Windows system? Well, if you simply want to use TBB, you may not have to actually build it. But, if you want to work with the TBB code itself (for example, if you're considering contributing to the project), then certainly you'll need to be able to build the software. And to do this, you need GNU make and a Bourne or BASH compatible shell. Cygwin provides both of these.
Installing Cygwin with GNU make
To install Cygwin, go to the Cygwin home page and click the "Install or update now" link. Save the "setup.exe" file in a convenient location on your hard drive (or on your desktop).
Figure 1. Cygwin Setup Icon
Launching Cygwin setup.exe will bring you into the "Cygwin Net Release Setup Program":
Figure 2. Cygwin Net Release Setup Program
Clicking "Next" will bring you to a window that lets you choose your download source. If your Windows machine is connected to the Internet, select "Install from Internet." This will generally be the simplest way to work with Cygwin whenever you want to refresh your install or add new packages.
Next, you select your installation directory:
Figure 3. Cygwin Setup - Choose Installation Directory
and a directory where the Cygwin installation files will be stored:
Figure 4. Cygwin Setup - Select Local Package Directory
The next screen lets you select an Internet Connection type. "Direct Connection" will work for most people. If you have a proxy host, enter the proxy information.
Figure 5. Cygwin Setup - Select Connection Type
The next window asks you to select a download site. Scroll down the list and find a server you believe is geographically close to you. Highlight the server and click "Next."
Selecting the Cygwin GNU make package
Now you are brought to a window that lets you select the packages you'd like to be included in your Cygwin installation. This is where you can identify GNU make for installation into your Cygwin system. Click the "Devel" option:
Figure 6. Cygwin Setup - Select Packages
then scroll down to "make: The GNU version of the 'make' utility" and click "Skip" to activate your selection of GNU make:
Figure 7. Cygwin Setup - Selecting GNU make
You only need the binary version of GNU make, so you can leave the "Bin?" column checked and the "Src?" column unchecked.
Completing your Cygwin installation
Click "Next" to continue with your Cygwin installation (you may have to click Next more than once). Finally, you'll see the Cygwin installation progress window:
Figure 8. Cygwin Setup - Installation progress window
If all goes well, the next window you see will tell you that the installation is complete. Select the icons you'd like to have created and click "Finish" to exit the Cygwin setup program.
Cygwin provides a very convenient setup and installation system for getting a Unix/Linux shell onto your Windows system, and adding Linux packages such as GNU make. These are required if you want to build the Threading Building Blocks software.
In addition, you need to identify a compiler that GNU make can access. The choices include GCC (the GNU Compiler Collection), cl.exe (the Visual Studio C++ compiler), and Intel's C++ compiler. Other standard C++ compilers should also work for building Threading Building Blocks, since the TBB software is standards-based.