make bootstrap
make bootstrap-minimal
make bootstrap-dist
cd ~ tar xf ~/FreeBASIC-x.xx.x-source-bootstrap.tar.xz cd FreeBASIC-x.xx.x-source-bootstrap make bootstrap
cd ~/fbc make 'FBC=~/FreeBASIC-x.xx.x-source-bootstrap/bin/fbc -i ~/FreeBASIC-x.xx.x-source-bootstrap/inc'
fbc -e -m fbc src/compiler/*.bas -r -target <mytargetos> -arch <mytargetarch> Some random examples: x86 Win32 -> x86 OpenBSD: -target openbsd [-arch 486] x86 Win32 -> x86_64 FreeBSD: -target freebsd -arch x86_64 x86 Linux -> ARM Linux: -target arm-linux-gnueabihf, or just -arch armv6
make rtlib gfxlib2
for i in src/compiler/*.asm; do as $i -o `echo $i | sed -e 's/asm$/o/g'` done gcc -o fbc lib/freebasic/<mytargetarch>/fbrt0.o src/compiler/*.o -Llib/freebasic/<mytargetarch> -lfb -lncurses -lm -pthread
gcc -o fbc -nostdinc -Wall -Wno-unused-label -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable -Wno-main -fno-strict-aliasing -frounding-math lib/freebasic/<mytargetarch>/fbrt0.o src/compiler/*.c -Llib/freebasic/<mytargetarch> -lfb -lncurses -lm -pthread
# Get a directory with the fbc sources, e.g. "fbc" cd fbc make make rtlib gfxlib2 TARGET=<gcc-target-id> # Optionally, you can install everything into /usr/local: make install make install-rtlib install-gfxlib2 TARGET=<gcc-target-id>
cd .. mkdir crosscompiled-fbc && cd crosscompiled-fbc make -f ../fbc/makefile FBC='../fbc/bin/fbc -i ../fbc/inc' TARGET=<gcc-target-id> # (Specifying FBC=... is only needed if you did not install it globally)
# Get FB sources into fbc/ (must be 0.91+ because earlier versions didn't support multilib/64bit at all), # and build a native (32bit) FB first cd fbc make # Then add the 64bit rtlib/gfxlib2 to that. Specifying MULTILIB=64 tells the FB makefile to use gcc -m64. make rtlib gfxlib2 MULTILIB=64 # Now we have a new 32bit FB with 64bit libraries for cross-compiling. # This can now be used to build a full 64bit FB: cd .. mkdir fbc64 cd fbc64 make -f ../fbc/makefile MULTILIB=64 FBC='../fbc/bin/fbc -i ../fbc/inc'