Standalone kernel / kernel library


i am trying to integrated the sel4 kernel into another project and would like to build a standalone kernel binary and kernel library without elfloader or userspace. Building a standalone kernel.elf is easy:

cmake -DCROSS_COMPILER_PREFIX=arm-linux-gnueabi- -DCMAKE_TOOLCHAIN_FILE=../kernel/gcc.cmake -G Ninja -C ../kernel/configs/ARM_verified.cmake -B . ../kernel && ninja.

But this does not build the libsel4.a.
When i run ninja libsel4.a i get many errors like

syscalls.h:119:29: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'asm'
syscalls.h:139:17: error: 'info' undeclared (first use in this function)
sel4_client.h:1023:1: error: no previous prototype for 'seL4_ARM_Page_GetAddress'

Is it even possible to build libsel4 as a standalone static library?