Home >Source Code> Building from Source Code

Quick Nav

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:

The source code has been designed to run on FreeBSD, Linux, Mac OSX, Solaris Windows, VxWorks and other operating systems. It has been tested under Fedora and Ubuntu Linux based on the Linux 2.6 Kernel, Microsoft Windows XP, Vista, 7 (32 and 64-bit), VxWorks 5.4, 6.3 and MAC OSX 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 quite 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 bit is the better choice if you are cross-compiling or will be working with the software for a longer period of time. Bit offers a more configurable build and is faster and more flexible than make.

Select the appropriate instructions:

Building SSL Providers

Appweb support four SSL providers: OpenSSL, MatrixSSL, Mocana NanoSSL and EST. EST is included with Appweb and no additional instructions are required. If building MatrixSSL or Mocana NanoSSL from source code, please consult the additional SSL Provider Build Instructions.

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/appweb-4

There are three repository branches that you can select:

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
bits Bit configuration and scripts.
packs Bit extension packs.
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 Eclipse project and workspace files.
src Product source code.
deps Dependant libraries including MPR, Http, Pcre.
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 Bit. This invokes Bit to configure Appweb on the development system.
OS-ARCH-PROFILE.bit Platform specific Bit file. There will be one platform bit file for each target platform.
main.bit Main Bit file for Appweb. It specifies the Appweb key settings and configured options.
start.bit Startup bit file for Appweb. This file refers to the relevant Bit files for platforms.
*/inc/bit.h Build header created by Bit and included in all source files.

© Embedthis Software LLC, 2003-2013. All rights reserved. Embedthis, Appweb, ESP, Ejscript and Embedthis GoAhead are trademarks of Embedthis Software LLC.