2020-01-18 12:43:35 +01:00
|
|
|
# FIXME: in-code docs needed
|
|
|
|
|
2020-02-05 10:06:21 +01:00
|
|
|
# FIXME: Windows doesn't support makefiles natively -> if you have a better method then please MR it or make an issue
|
|
|
|
|
|
|
|
## Syntax capture ##
|
|
|
|
|
2020-01-12 01:57:48 +01:00
|
|
|
all:
|
2020-02-05 10:06:21 +01:00
|
|
|
@ printf '%s\n' "Unknown option '$1' parsed in target all"
|
|
|
|
@ exit 2
|
|
|
|
|
|
|
|
## BUILD ##
|
|
|
|
# All build targets are expected in 'build/build-LANG' where 'LANG' is the unique identifier of the language used
|
2020-02-06 02:49:13 +01:00
|
|
|
# FIXME: Replace 'exit 1' with helpful messages
|
2020-02-05 10:06:21 +01:00
|
|
|
|
|
|
|
# FIXME: Build in '$repodir/build/build-rustlang' instead of '$repodir/target' for multilang support
|
|
|
|
build-rustlang:
|
|
|
|
@ cargo build
|
2020-01-12 13:50:51 +01:00
|
|
|
|
2020-02-06 02:49:13 +01:00
|
|
|
build-gc:
|
|
|
|
@ # Make a build directory
|
|
|
|
@ [ ! -d build ] && { mkdir build || exit 1 ;}
|
|
|
|
@ [ ! -d build/target-gc ] && { mkdir build/build-gc || exit 1 ;}
|
|
|
|
|
|
|
|
@ # Compilation
|
|
|
|
@ [ ! -f build/build-gc ] && { gc src/bin/main.c -o build/build-gc/gc-zernit || exit 1 ;}
|
|
|
|
@ printf '%s\n' "Compilation of target for gc finished"
|
|
|
|
|
2020-02-05 10:06:21 +01:00
|
|
|
# FIXME: Replace 'exit 1' with helpful messages
|
|
|
|
build-gcc:
|
|
|
|
@ # Make a build directory
|
|
|
|
@ [ ! -d build ] && { mkdir build || exit 1 ;}
|
|
|
|
@ [ ! -d build/target-gcc ] && { mkdir build/build-gcc || exit 1 ;}
|
2020-01-18 12:43:35 +01:00
|
|
|
|
2020-02-05 10:06:21 +01:00
|
|
|
@ # Compilation
|
2020-02-06 02:49:13 +01:00
|
|
|
@ [ ! -f build/build-gcc ] && { gc src/bin/main.c -o build/build-gcc/gcc-zernit || exit 1 ;}
|
2020-02-05 10:06:21 +01:00
|
|
|
@ printf '%s\n' "Compilation of target for gcc finished"
|
2020-01-12 13:50:51 +01:00
|
|
|
|
2020-02-05 10:06:21 +01:00
|
|
|
build-clang:
|
|
|
|
@ printf 'FIXME: %s\n' "translate zernit in clang"
|
|
|
|
@ exit 1
|
2020-01-18 12:43:35 +01:00
|
|
|
|
2020-02-05 10:06:21 +01:00
|
|
|
build-brainfuck:
|
|
|
|
@ printf 'FIXME: %s\n' "translate zernit in brainfuck"
|
|
|
|
@ exit 1
|
2020-01-12 13:50:51 +01:00
|
|
|
|
2020-02-05 10:06:21 +01:00
|
|
|
build-python:
|
|
|
|
@ printf 'FIXME: %s\n' "translate zernit in python"
|
|
|
|
@ exit 1
|
2020-01-18 12:43:35 +01:00
|
|
|
|
2020-02-06 02:49:13 +01:00
|
|
|
## CHECK/TESTS ##
|
|
|
|
|
|
|
|
check-gc:
|
|
|
|
@ printf 'FIXME: %s\n' "Add tests for gc"
|
|
|
|
@ exit 1
|
|
|
|
|
|
|
|
check-gcc:
|
|
|
|
@ printf 'FIXME: %s\n' "Add tests for gcc"
|
|
|
|
@ exit 1
|
|
|
|
|
|
|
|
check-clang:
|
|
|
|
@ printf 'FIXME: %s\n' "Add tests for clang"
|
|
|
|
@ exit 1
|
|
|
|
|
|
|
|
check-python:
|
|
|
|
@ printf 'FIXME: %s\n' "Add tests for python"
|
|
|
|
@ exit 1
|
|
|
|
|
|
|
|
check-rustlang:
|
|
|
|
@ printf 'FIXME: %s\n' "Add tests for rustlang"
|
|
|
|
@ exit 1
|
|
|
|
|
|
|
|
check-brainfuck:
|
|
|
|
@ printf 'FIXME: %s\n' "Add tests for brainfuck"
|
|
|
|
@ exit 1
|
|
|
|
|
|
|
|
check-shell:
|
|
|
|
@ printf 'FIXME: %s\n' "Add tests for shell"
|
|
|
|
@ exit 1
|
|
|
|
|
|
|
|
check-bash:
|
|
|
|
@ printf 'FIXME: %s\n' "Add tests for bash"
|
|
|
|
@ exit 1
|
|
|
|
|
2020-02-05 10:06:21 +01:00
|
|
|
## CLEAN ##
|
2020-01-18 12:43:35 +01:00
|
|
|
|
2020-02-05 10:06:21 +01:00
|
|
|
clean:
|
|
|
|
@ [ -d build ] && { rm -r build || exit 1 ;}
|
|
|
|
@ printf '%s\n' "Build directory has been cleaned"
|