___       ___  ___  ________  ___  ________ _______   ________     
|\  \     |\  \|\  \|\   ____\|\  \|\  _____\\  ___ \ |\   __  \    
\ \  \    \ \  \\\  \ \  \___|\ \  \ \  \__/\ \   __/|\ \  \|\  \   
 \ \  \    \ \  \\\  \ \  \    \ \  \ \   __\\ \  \_|/_\ \   _  _\  
  \ \  \____\ \  \\\  \ \  \____\ \  \ \  \_| \ \  \_|\ \ \  \\  \| 
   \ \_______\ \_______\ \_______\ \__\ \__\   \ \_______\ \__\\ _\ 
    \|_______|\|_______|\|_______|\|__|\|__|    \|_______|\|__|\|__|

** created by Cherry Chu, Michael Fagan, Robert Becker and Elliott Morelli**

LUCIFER COMPILER:

- Coded in OCaml, Lucifer is a programming language that directly integrates SDL
- Alongside an XServer, it can be used to write 2D video games
- For more information on the features of Lucifer, see Lucifer LRM
- Lucifer needs: 
        OCaml llvm library, which can be installed through opam
        LLVM and its development libraries, the m4 macro preprocessor,and opam, then use opam to install llvm.
        SDL, the installation of which is specified later in this document
	An XServer
- NOTE: The version of the OCaml llvm library must match the version of the LLVM
        system installed on your system.

COMPILATION:
- To compile our compiler and automatically run the test suite, run "make" in terminal
- If you wish to only compile only the compiler the use the targer "make lucifer.native"
- NOTE: If "lucifer.native" is already compiled then the default target only runs the suite

TEST SUITE:
- The default targer "make" or "make test" can be used to run the Lucifer test suite
- The test suite (testall.sh) runs all tests in the "tests" directory
- The suite uses 3 different kinds of test: 
        pass tests (written test-*.luc), which are checked against .out files
        fail tests (written fail-*.luc), which are checked against .err files
        visual tests (written visual-*.luc), which are ran and checked visually
- Upon successly compiling (and checking) a file, the script shows OK after the files name
- NOTE: visual tests will fail if there is no xserver to launch SDL

INSTALLING SDL:
- To install SDL's libraries and development suite, use the command "make sdl".
(*warning* This will also install the sudo command and use the -y flag to auto-install SDL.)
- "make sdl" will additionally compile a simple blue screen SDL program called "initsdl". 
- Check your directory after running "make sdl" for the "blue" executable to ensure that SDL is properly installed.
(*warning* Running ./blue will fail if there is no xserver (video device) to launch SDL.)

DOCKER: 
(The following is based on the MicroC Readme)

Installation using Docker

- Install Docker on whatever operating system you're on

   Under Ubuntu,
   apt install docker.io

   You'll likely need to add yourself to the "docker" group:
  
   sudo usermod -aG docker <username>

   Log out and back in for this to take effect.  Run "groups" to
   make sure you're part of the "docker" group.

- Test your installation

   docker run hello-world

  If this fails, you will need to correct your installation.

- Move to where you unpacked the microc source:

  cd microc

- Invoke docker

  docker run --rm -it -v `pwd`:/home/microc -w=/home/microc columbiasedwards/plt

- Inside docker, compile Lucifer and run the regression tests:

  # make
  ...
  test-arith1...OK
  test-arith2...OK
  test-arith3...OK
  ... etc.

  # make clean


