Building jAsm

jAsm currently compiles in Code::Blocks for Linux or Visual Studio 2015 for Windows. A CMake file is also included for command line builds.

Command line build with CMake in Linux

To build with CMake you need CMake 3.5, Clang, git and python3 installed.

sudo apt-get install cmake clang git python3

Run the following commands from the root of the project.

export CXX=/usr/bin/clang++
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
sudo make install

Code::Blocks on Linux

Download Code::Blocks and the clang compiler using something like apt-get on Ubuntu.

sudo apt-get install codeblocks clang

Double click on the jasm.workspace file to open the project. Select the Release configuration and build. You will get a jasm binary in jasm/bin/release.

You may need to install the gcc compiler (g++) as well to get the standard includes in case you get build errors. I'm afraid I'm not sure about this.

sudo apt-get install g++

Visual Studio on Windows

Download Visual Studio 2015 from www.microsoft.com and install it. Double click on the jasm.sln file to open the project. Select the Release configuration and build the solution. You will get a jasm.exe binary in x64\Release.

Running Unit Tests

Run the unit tests using the python script unit_test_run.py. It runs under Python 3.

python3 unit_test_run.py

Add a unit test by placing a file called test_something.asm that produce the correct output in the unit_tests directory and run unit_test_generate.py. This will add the generated output in unit_tests/results and be considered the correct output for then on.

python3 unit_test_generate.py

Version Information

When building a release you must run the python script increase_revision.py to inject the current revision and hash into the source code. This change should never be submitted!

python3 increase_revision.py

There are also small scripts to update the major and minor revisions. These changes should be submitted.

python3 increase_major.py
python3 increase_minor.py