- Supported Platforms
- Prepare the Environment
- Build Overview
- Repository Building
- Key Directories
- Building with Make
- Building with Bit
- Building with an ID
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, 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.
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.
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:
- 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.
Source trees contain the following key directories under the top directory.
|bits||Bit configuration and scripts.|
|packs||Bit extension packs.|
|OS-ARCH-PROFILE||Build output directory.|
|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
|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.|