Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
*.dSYM
test
opencl-test
build
.rust
bin
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ ifndef RUSTC
RUSTC = rustc
endif

ifndef RUSTPKG
RUSTPKG = rustpkg
endif

OPENCL_SRC = \
lib.rs \
CL.rs \
Expand All @@ -16,13 +20,9 @@ OPENCL_SRC = \
all: libOpenCL opencl-test

.PHONY: libOpenCL
libOpenCL : $(OPENCL_SRC)
$(RUSTC) -O --lib lib.rs
libOpenCL :
$(RUSTPKG) build OpenCL

.PHONY: check
check: opencl-test
RUST_THREADS=1 ./opencl-test

opencl-test : libOpenCL test.rs
$(RUSTC) -L . test.rs
$(RUSTC) -O --test --cfg test lib.rs -o opencl-test
check:
RUST_THREADS=1 $(RUSTPKG) test OpenCL
Loading