A C runtime for the sol programming language.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
cmake/Modules Remove extraneous files. Jul 18, 2013
.gitignore Switch from NetBeans to using CMake for portability. Jan 24, 2013
CMakeLists.txt Update POSIX version to silence warnings on Linux Aug 28, 2013
LICENSE Added the LICENSE file to the repository. Jul 18, 2013
README.markdown Update README Aug 28, 2013
runtime.c Fix issue with Function global initialization Oct 7, 2014
runtime.h Stylistic change: organization and cleanup Aug 28, 2013
sol.c Remove frozen objects Aug 30, 2013
sol.h Remove frozen objects Aug 30, 2013
solar.c Stylistic change: organization and cleanup Aug 28, 2013
solar.h Stylistic change: organization and cleanup Aug 28, 2013
solerror.c Add portable implementations of asprintf and vasprintf. Aug 28, 2013
solerror.h Add some additionall error handling macros. Aug 8, 2013
solevent.c Remove frozen objects Aug 30, 2013
solevent.h Stylistic change: organization and cleanup Aug 28, 2013
solfunc.c Implement the basics of sol runtime macros Aug 30, 2013
solfunc.h Implement the basics of sol runtime macros Aug 30, 2013
sollist.c Remove frozen objects Aug 30, 2013
sollist.h Remove frozen objects Aug 30, 2013
solop.c Add @list function to create object-mode lists Oct 14, 2013
solop.h Add @list function to create object-mode lists Oct 14, 2013
soltoken.c Stylistic change: organization and cleanup Aug 28, 2013
soltoken.h Stylistic change: organization and cleanup Aug 28, 2013
soltypes.c Stylistic change: organization and cleanup Aug 28, 2013
soltypes.h Stylistic change: organization and cleanup Aug 28, 2013
solutils.c Stylistic change: organization and cleanup Aug 28, 2013
solutils.h Add portable implementations of asprintf and vasprintf. Aug 28, 2013
uthash.h Initial commit. Dec 28, 2012

README.markdown

Building libsol

Building libsol only requires a C compiler (preferably Clang or GCC) and a few dependencies.

Requirements

To build libsol, you'll need to have the following installed on your system:

  • libYAML - a C YAML parser
  • libuv - a C event library, originally designed for use in Node.js

If you're running Debian, you can get libYAML from the lib-yaml-0-2 and lib-yaml-dev packages. libuv does not currently distribute packages, so it will need to be built from source (see the libuv readme).

Building

The libsol project can be built using CMake. It is installed to the /usr/local directories. Currently, most Unix-based operating systems should be supported, including Linux and Mac OS X.

It is recommended that you keep all build files in a subdirectory to avoid cluttering the repository. The build folder is automatically ignored in the .gitignore file, so you could build the project using GNU Make like this:

cd libsol
mkdir build
cd build
cmake ..
make
sudo make install

Alternatively, you can specify other generators to use other build systems. For example, you could generate an Xcode project with the following command:

cmake -G Xcode ..

Compiling Sol Programs

In order to compile a sol program, you will need to have generated a C source file from a standard sol source file. This can be done with the solc utility. This will output a .c file, which can then be compiled with the following command (using Clang):

clang -lsol -o my-program my-program.c

This should generate a standard executable which can be run view the command line as usual.