Skip to content

Latest commit

 

History

History
99 lines (79 loc) · 2.73 KB

INSTALL.md

File metadata and controls

99 lines (79 loc) · 2.73 KB

Installation

Building and installation is done from source.

Overview

Compatibility

Supported Operating Systems:

  • Linux
  • Windows (in progress)
  • BSD (planned)
  • MacOS

Note: Using CSpydr on Windows via the WSL is possible, but will have some issues with system calls such as mmap, causing many programs to segfault. The most reliable way to use CSpydr on any platform is to use it inside a linux virtual machine.

Supported C Compilers:

  • gcc
  • clang
  • msvc (in progress)

Supported Assemblers and Linkers:

  • GNU as and ld

Obtaining CSpydr

CSpydr can be obtained by simply cloning this repository or dowloading the .zip file on GitHub

$ git clone https://github.com/spydr06/cspydr.git --recursive

Dependencies

CSpydr depends on the following libraries. They need to be installed on your computer for CSpydr to successfully build. Be sure to also install the corresponding -dev or -devel of library packages for header files if needed.

Libraries:

  • glibc (GNU C standard library, should be bundled with every major distribution)
  • json-c
  • libpkgconf

Programs:

  • make
  • gcc or clang
  • as (GNU assembler (part of the binutils package))
  • ld (GNU linker (part of the binutils package))

Building

Building CSpydr is done via a configure script and Makefiles using the following commands (after cloning this repository):

$ cd ./cspydr
$ ./configure
$ make

Installation

Global installation is necessary, because of the compiler needing the standard library to be present at /usr/local/share/cspydr/std. The install paths can be changed using the --prefix and --exec-prefix flags on the ./configure script. To install CSpydr with all of its components (cspc - The CSpydr Compiler and the CSpydr Standard Library), enter this command (needs root privileges):

# make install

Alternatively, you can specify the path of the std library with the -p or --std-path flags:

$ cspc <your build command> -p ./src/std

Usage

To compile a CSpydr program use the following command:

$ cspc build <your file>

To directly run a program use this command:

$ cspc run <your file>

To launch a special debug shell, start your program using the debug action:
(not finished yet!)

$ cspc debug <your file>

Get help using this command:

$ cspc --help