forked from KhronosGroup/OpenCL-ICD-Loader
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
29 lines (20 loc) · 625 Bytes
/
Makefile
File metadata and controls
29 lines (20 loc) · 625 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.PHONY: default do_cmake do_build test package
.PHONY: clean clobber
BUILD_DIR:=build
ICD_VERSION:=$(shell grep FileVersion OpenCL.rc | sed "s/.*\([0-9]\+\.[0-9]\+\.[0-9]\+.[0-9]\+\).*/\1/")
PACKAGE_PATH:=/tmp/opencl-icd-${ICD_VERSION}.tgz
default: do_build
do_build: do_cmake
${MAKE} -C ${BUILD_DIR}
do_cmake:
mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR} && cmake ..
test:
${MAKE} -C ${BUILD_DIR} test
package: clobber
rm -f ${PACKAGE_PATH}
tar -C .. -czf ${PACKAGE_PATH} --exclude .git .gitignore icd
@echo "Package created at ${PACKAGE_PATH}"
clean:
${MAKE} -C ${BUILD_DIR} clean
clobber:
rm -rf ${BUILD_DIR}