ABOUT:

Chaga is the compiler for the Chaga Programming Language. Extensive documentation is posted online at:
https://chagaprogramminglanguage.org/documentation.html

Chaga compiler 
Copyright (C) 2026 Robert James Bruce

This file is part of the Chaga compiler.

The Chaga compiler is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the 
Free Software Foundation, either version 3 of the License, or (at your option) any
later version.

The Chaga compiler is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
 without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
the GNU General Public License for more details.

You should have received a copy of the GNU General Public License 
along with the Chaga compiler. If not, see <https://www.gnu.org/licenses/>.


DEPENDENCIES

The Chaga compiler requires libchaga-0.5.1 (the Chaga string arithmetic library) available at:
https://chagaprogramminglanguage.org/download.html

Please download libchaga-0.5.1.tgz and unpack and install first. Libchaga is a string arithmetic library which
the Chaga compiler links to for your compiled applications.


BUILDING

The Chaga compiler is written in the C programming language and can be compiled with the GNU C compiler. As
of this writing, the Chaga compiler generates machine code for 64-bit Intel/AMD x86 processors. The executable
files it creates are only compatible with a 64-bit version of the GNU/Linux operating system.


Unpack the Chaga compiler archive:
tar xzvf ./chaga_compiler-0.5.4.tgz
cd ./chaga_compiler/build
cmake ..
make

If all goes well, you will have an executable compiler named "chaga". 


COMPILING CHAGA APPLICATIONS:
./chaga ./example_chaga_programs/chaga_test_program1

The Chaga compiler will generate temporary files "chaga_test_program1.s" and "chaga_test_program1.o". The executable output file (your compiled program) will be named "chaga_test_program1.elf"


RUNNING COMPILED CHAGA APPLICATIONS:
./test_program1.elf


QUESTIONS OR COMMENTS:
Please email Robert Bruce at: rob@chagaprogramminglanguage.org

