diff options
author | David Phillips <david@sighup.nz> | 2017-02-18 00:48:16 +1300 |
---|---|---|
committer | David Phillips <david@sighup.nz> | 2017-02-18 00:48:16 +1300 |
commit | d356d2bea1a5c0012bf6ef746a90f86b2076d9c2 (patch) | |
tree | eee34f17d35394da91e0d15c5889540de7fec46e | |
parent | ea11f0c71f1617bbfdb5a5ef6644e34cb0192e29 (diff) | |
download | fractal-gen-opencl-d356d2bea1a5c0012bf6ef746a90f86b2076d9c2.tar.xz |
Add macro to set CL kernel source directory
This will future-proof the software for installation to system roots,
where the executable isn't being run in the source tree.
-rw-r--r-- | cl/mandelbrot.cl (renamed from mandelbrot.cl) | 0 | ||||
-rw-r--r-- | config.mk | 2 | ||||
-rw-r--r-- | fractal-gen.c | 2 |
3 files changed, 2 insertions, 2 deletions
diff --git a/mandelbrot.cl b/cl/mandelbrot.cl index 2652108..2652108 100644 --- a/mandelbrot.cl +++ b/cl/mandelbrot.cl @@ -1,2 +1,2 @@ -CFLAGS += -I/usr/include/CL/ +CFLAGS += -I/usr/include/CL/ -DCL_SRC_DIR=\"./cl/\" LDFLAGS += -lOpenCL diff --git a/fractal-gen.c b/fractal-gen.c index 91a2f18..60b27e3 100644 --- a/fractal-gen.c +++ b/fractal-gen.c @@ -14,7 +14,7 @@ int run(unsigned int size, unsigned int iterations) fprintf(stderr, "Done.\n"); fprintf(stderr, "Loading kernel source from file... "); - if (tramp_load_kernel("mandelbrot.cl")) { + if (tramp_load_kernel(CL_SRC_DIR"mandelbrot.cl")) { fprintf(stderr, "Failed.\n"); return 1; } |