update build & packaging information

closes #45
This commit is contained in:
dzaima 2022-09-27 17:47:37 +03:00
parent d3ed718a6d
commit 46501ac819
3 changed files with 10 additions and 10 deletions

View File

@ -5,13 +5,13 @@
## Running ## Running
1. `make` 1. `make`
- `make CC=gcc` if you don't have clang installed - Third-party packages and other ways to run BQN are listed [here](https://mlochbaum.github.io/BQN/running.html)
- `make CC=gcc` if clang isn't installed
- `make PIE=""` on ARM CPUs (incl. Android & M1) - `make PIE=""` on ARM CPUs (incl. Android & M1)
- `make FFI=0` if your system doesn't have libffi (i.e. an error about missing `<ffi.h>` appears) - `make FFI=0` if your system doesn't have libffi
- `gmake` on BSDs - Use `gmake` on BSD
- For Windows, CBQN works in WSL, and [WinBQN](https://github.com/actalley/WinBQN) provides Cygwin/Msys2 builds. - `make clean` if anything breaks and you want a clean build slate
- `make clean` if anything goes bad and you want a clean slate - Run `sudo make install` afterwards to install into `/usr/local/bin/bqn` (a `PREFIX=/some/path` argument will install to `/some/path/bin/bqn`); `sudo make uninstall` to uninstall
- `make [...]; sudo make install` to install into `/usr/local/bin/bqn` (a `PREFIX=/some/path` argument will install to `/some/path/bin/bqn`); `sudo make uninstall` to uninstall
- If you want to use custom build types but your system doesn't have `shasum`/`sha256sum`, add `force_build_dir=some_identifier`. That identifier will be used to decide on the directory for incremental build object files. - If you want to use custom build types but your system doesn't have `shasum`/`sha256sum`, add `force_build_dir=some_identifier`. That identifier will be used to decide on the directory for incremental build object files.
2. `./BQN somefile.bqn` to execute a file, or `rlwrap ./BQN` for a REPL 2. `./BQN somefile.bqn` to execute a file, or `rlwrap ./BQN` for a REPL
@ -27,11 +27,11 @@
- `make debug` - unoptimized debug build - `make debug` - unoptimized debug build
- `make debug1` - debug build without parallel compilation. Useful if everything errors, and you don't want error messages of multiple threads to be written at the same time. - `make debug1` - debug build without parallel compilation. Useful if everything errors, and you don't want error messages of multiple threads to be written at the same time.
- `make heapverify` - verify that refcounting is done correctly - `make heapverify` - verify that refcounting is done correctly
- `make o3n-singeli` - a Singeli build, currently only for x86-64 CPUs supporting AVX2 - `make o3n-singeli` - a Singeli build, currently only for x86-64 CPUs supporting AVX2 & BMI2
- `make shared-o3` - produce the shared library `libcbqn.so` - `make shared-o3` - produce the shared library `libcbqn.so`
- `make c` - a build with no flags, for manual customizing - `make c` - a build with no flags, for manual customizing
- `make shared-c` - like `make c` but for a shared library - `make shared-c` - like `make c` but for a shared library
- `make single-(o3|o3g|debug|c)` - compile everything as a single translation unit. Slower for optimized builds, but may allow some more optimizations - `make single-(o3|o3g|debug|c)` - compile everything as a single translation unit. Will compile slower & won't have incremental compilation.
- For any of the above (especially `make c`), you can add extra flags with `f=...` (and linker flags with `lf=...`), e.g. - For any of the above (especially `make c`), you can add extra flags with `f=...` (and linker flags with `lf=...`), e.g.
`make f='-O3 -DSOME_MACRO=whatever -some_other_cc_flag' c` `make f='-O3 -DSOME_MACRO=whatever -some_other_cc_flag' c`
Macros that you may want to define are listed in `src/h.h`. Macros that you may want to define are listed in `src/h.h`.

View File

@ -1,6 +1,6 @@
# CBQN-specific documentation # CBQN-specific documentation
Only CBQN-specific things are here; for general documentation, see [the BQN documentation](https://mlochbaum.github.io/BQN/doc/index.html). Only things specific to the CBQN implementation are here; see [the BQN documentation](https://mlochbaum.github.io/BQN/doc/index.html) for implementation-agnostic information.
* [system functions](system.md) * [system functions](system.md)
* [system commands](commands.md) * [system commands](commands.md)

View File

@ -9,7 +9,7 @@
#include <dlfcn.h> #include <dlfcn.h>
#if FFI==2 #if FFI==2
#if !__has_include(<ffi.h>) #if !__has_include(<ffi.h>)
#error "<ffi.h> not found. Either install libffi into $PATH, or add 'FFI=0' as a make argument to disable FFI" #error "<ffi.h> not found. Either install libffi, or add 'FFI=0' as a make argument to disable FFI"
#endif #endif
#include <ffi.h> #include <ffi.h>
#include "utils/mut.h" #include "utils/mut.h"