This document explains how to build the Mako Server. Using the Mako Server is explained in a separate document.
The make directory contains a generic makefile. You may use the makefile for building the server. The make directory also contains a few ready-to-use build scripts, which calls the makefile. See the README file in the make directory for details.
As an option to using the makefile, you may include the source files directly in your build-process and/or IDE.
Mako Server Source Files:
src/makoMain.c | Required | The Mako Server startup code sets up a configurable standalone server using BAS.c. |
../../amalgamation/BAS.c | Required | The Barracuda App Server library. See ../../amalgamation/README.txt for details. |
src/SendError.c | Optional | Traps errors and optionally reports the errors, including asserts, if enabled. You may use another error handler or remove the call in makoMain.c. |
obj/LspZip.c | Optional | Zip file converted to C array by bin2c and assembled by running BuildInternalZip. Exclude by compiling with macro USE_EMBEDDED_ZIP=0. |
../../xrc/sql/ls_sqlite3.c | Optional | Lua SQLite Lua bindings. |
../../xrc/sql/luasql.c | Optional | Lua SQLite Lua bindings. |
../../xrc/sql/sqlite3.c | Optional | SQLite database. |
* When compiled for Windows, include all C files in the src/Windows subdirectory. These files enable the server to be installed as a Windows service.
In general, you should always include the external resource file mako.zip with the Mako Server executable since this resource file includes additional resources that make components such as the TraceLogger and the File Manager work. The internal ZIP file, which may be removed, should only be used as a fallback if mako.zip is not found. The server aborts if the Mako Server is compiled without the internal ZIP file and if the Mako Server fails to mount mako.zip.
The default is to include SQLite, however, you may compile the Mako Server with no built-in SQL support. You may also include the ITTIA embeddable database.
The Mako Server can be compiled directly on the command line without using the makefile. The following example compiles the Mako Server for POSIX/Linux without using SQLite and without using the internal ZIP file (obj/LspZip.c).
Start by setting the include path:
Set the required C compiler flags:
The following must be added to CFLAGS if compiled for a 64 bit processor:
Compile and link:
See the following file for details: make/README.txt