Building Overview

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.

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 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.

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 with 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:

Key Directories

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

Directory Description
build Build output directory.
build/bin Binaries directory.
build/obj Binaries directory.
build/inc Include headers directory.
package Scripts for creating release distribution images.
projects Microsoft Visual Studio and Xcode project and workspace files.
src Product source code.
src/paks Imported packages.
samples Sample source code and examples
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 the software on the development system.
build/OS-ARCH-PROFILE/platform.me Platform specific MakeMe file. There will be one platform MakeMe file for each target platform.
pak.json Pak description file. It specifies the version and Pak dependencies.
main.me Main MakeMe file. It specifies key product settings and configured options.
start.me Startup MakeMe file. This file refers to the relevant MakeMe files for platforms.
build/OS-ARCH-PLATFORM/inc/me.h Build header created by MakeMe and included in all source files.

© Embedthis Software. All rights reserved.