move linker flags to separate variable
make function public