I'm writing an OpenCL kernel which is then compiled to run on GPU. Kernel code is contained in a *.cl file, which is then read by the application. It's inconvenient to always copy the *.cl file into application folder. Much better solution would be, if the kernel code could be parsed and converted into C char[] string during application compilation. Then there would be no need to provide the original *.cl file to the application's user.
My question therefore is: How can I in the most convenient and simple way convert OpenCL code into a C string, which will then be used by the application, when the application is compiled? Is there any way to do it using C preprocessor or do I need to run a Python, Perl or similar script to do the job?