Embedthis GoAhead 3.3.1
Home >Source Code> Building from Source Code

# Quick Nav

- Supported Platforms
- Prepare the Environment
- Build Overview
- Repository Building
- Key Directories
- Building with Make
- Building with MakeMe
- Building with an ID

# See Also

# Building from Source Code

This document describes the process to build the software from source for a supported platform. The source distribution contains all the necessary source files, headers and tools to reconfigure, build and verify the software.

Several build environments are supported:

- Linux — Linux 2.6 with GNU C/C++
- Windows — Microsoft Windows 7 with Visual Studio 2010 or later
- Mac OSX — Mac OSX 10.7 (Lion) or later

The source code has been designed to run on FreeBSD, Linux, Mac OSX, Windows, VxWorks and other operating systems. It has been tested under Fedora and Ubuntu Linux based on the Linux 2.6 Kernel, Microsoft Windows 7, 8 (32 and 64-bit), VxWorks 6.X and MAC OS X 10.7. Both single and multi-cpu systems are supported.

If you are wanting to run the software to an unsupported platform, you are welcome to try your hand at adapting it to a new platform. The software is very portable. See the Porting Guide for more details.

If you want to build using source from the source code repository, please read these additional instructions.

## Preparing the Environment

Before building, you may need to install required tools such as cross-compilers, SDKs, and system libraries. If you wish to build the software with the support of third-party packages such as MatrixSSL or OpenSSL, you may need to download the source from the relevant vendor and build the required libraries for the software to utilize.

### Windows

To build on Windows, you will need to install Microsoft Visual Studio 10.0 or later. Either the full product or the express editions will work fine. You will also need to install the Windows SDK.

Before building or configuring, you need to define certain Microsoft compiler environment variables as described in the Microsoft Visual Studio installation. These variables are the PATH, INCLUDE and LIB variables. They need to be defined so they will contain references to where the Microsoft compiler and libraries are installed on your system. The vcvarsall.bat command supplied with Visual Studio is the normal way to define these variables.

### Unix / Linux

To build on Linux, you may need to install the libpam and zlib libraries.

## Build Overview

The software supports three methods of building from source. Building via make is the simplest and quickest way to build. Use make if you are looking to build and move on. Choose make also, if you need to integrate the product into an existing make-based build system.

Build via MakeMe is the better choice if you are cross-compiling or will be working with the software for a longer period of time. MakeMe offers a more configurable build and is faster and more flexible than make.

Select the appropriate instructions:

- How to build with Make
- How to build with MakeMe
- How to build with IDE

## Building from the Repository

You can checkout a copy of the product source code from the official source code repository via:

     git clone http://github.com/embedthis/goahead

There are three repository branches that you can select:

- stable — Source code for the most recent release.
- master — Most recent, quasi-stable development snapshot.
- dev — Current source code under active development. Least stable.

Once checked out, the normal instructions for building from source apply.

## Key Directories

Source trees contain the following key directories under the top directory.

Directory | Subdirectory | Description
--- | --- | ---
OS-ARCH-PROFILE |  | Build output directory.
| bin | Output binaries.
| inc | Include headers
| obj | Directory to hold generated objects.
releases |  | Generated release distributions.
package |  | Scripts for creating release distribution packages.
projects |  | Microsoft Visual Studio and Xcode project and workspace files.
src |  | Product source code.
| paks | Imported packages including OSdep.
test |  | Unit and integration tests.

### Key Build Files

Name | Description
--- | ---
configure | Build configuration script to use when building with MakeMe. This invokes MakeMe to configure GoAhead on the development system.
OS-ARCH-PROFILE.me | Platform specific MakeMe file. There will be one platform MakeMe file for each target platform.
main.me | Main MakeMe file for GoAhead. It specifies the GoAhead key settings and configured options.
start.me | Startup MakeMe file for GoAhead. This file refers to the relevant MakeMe files for platforms.
*/inc/me.h | Build header created by MakeMe and included in all source files.

© Embedthis Software LLC, 2003-2014. All rights reserved. Embedthis and Embedthis GoAhead are trademarks of Embedthis Software LLC.