Home | History | Annotate | Download | only in u32
      1 
      2 OPENCL_STD	:=	-cl-std=CL1.2
      3 OPENCL_PRE	:=	__OPENCL_C_VERSION__=120
      4 
      5 IOC_IR_OPTS_OPT	:=	$(OPENCL_STD) -cl-single-precision-constant -cl-denorms-are-zero \
      6 			-cl-mad-enable -cl-no-signed-zeros -cl-fast-relaxed-math -cl-kernel-arg-info
      7 
      8 TARGETS		:=	hs_kernels.src.xxd hs_kernels.src.len.xxd hs_kernels.bin.xxd hs_kernels.bin.len.xxd hs_target.bin
      9 
     10 all:			$(TARGETS)
     11 
     12 clean:
     13 			rm $(TARGETS) hs_kernels.pre.cl hs_kernels.bin
     14 
     15 hs_target.bin:		hs_kernels.bin
     16 			gcc -D HS_DUMP -x c hs_target.h -o hs_dump
     17 			hs_dump
     18 
     19 hs_kernels.bin.len.xxd:	hs_kernels.bin
     20 			$(shell bytes=$$(wc -c < $<); printf "%.8x" $$bytes | xxd -r -p | xxd -i 1> $@)
     21 
     22 hs_kernels.bin.xxd:	hs_kernels.bin
     23 			$(shell xxd -i < $< 1> $@)
     24 
     25 hs_kernels.bin:		hs_kernels.pre.cl
     26 			ioc64 -cmd=build -bo="$(IOC_IR_OPTS_OPT)" -device=gpu -input=$< -ir=$@
     27 
     28 hs_kernels.src.len.xxd:	hs_kernels.pre.cl
     29 			$(shell bytes=$$(wc -c < $<); printf "%.8x" $$bytes | xxd -r -p | xxd -i 1> $@)
     30 
     31 hs_kernels.src.xxd:	hs_kernels.pre.cl
     32 			$(shell xxd -i < $< 1> $@)
     33 
     34 hs_kernels.pre.cl:	hs_kernels.cl
     35 			gcc -x c -E -P -I . -D $(OPENCL_PRE) $< -o $@
     36