--- OpenCL/h_extract 2011/11/20 01:09:48 1.1 +++ OpenCL/h_extract 2012/04/19 12:12:04 1.2 @@ -4,11 +4,12 @@ # be in CL/ # constants -cat CL/cl.h CL/cl_ext.h | - perl -ne 'print "const_iv($1)\n" if /^#define CL_(\S+)/' >constiv.h +cat CL/cl.h CL/cl_ext.h CL/cl_gl.h CL/cl_gl_ext.h CL/cl_d3d10.h | + perl -ne 'print "#ifdef CL_$1\nconst_iv($1)\n#endif\n" if /^#define CL_(\S+)/' >constiv.h # constants that look like enum values -enumstr.h +cat CL/cl.h CL/cl_ext.h CL/cl_gl.h CL/cl_gl_ext.h CL/cl_d3d10.h | + perl -ne 'print "#ifdef CL_$1\nconst_iv($1)\n#endif\n" if /^#define CL_(\S+)\s+0x[0-9a-fA-F]{4}/' >enumstr.h # *glGet*Info getinfo.txt @@ -25,3 +26,10 @@ # DEVICE_INTEGRATED_MEMORY_NV # DEVICE_PROFILING_TIMER_OFFSET_AMD +# error codes +( + echo "const_iv(SUCCESS)" + cat CL/cl.h CL/cl_ext.h CL/cl_gl.h CL/cl_gl_ext.h CL/cl_d3d10.h | + perl -ne 'print "#ifdef CL_$1\nconst_iv($1)\n#endif\n" if !/#define CL_BUILD_(?:NONE|ERROR|IN_PROGRESS)/ && /^#define CL_(\S+)\s+-\d+\s*$/' +) >errstr.h +