Allow run generate_cl.js
from the scripts
directory.
This commit is contained in:
parent
77009bd0d1
commit
33623492fe
1 changed files with 13 additions and 8 deletions
|
@ -6,7 +6,6 @@ const fs = require('fs');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const { text2h, text2h_bundle, addIncludes } = require('./js/opencl');
|
const { text2h, text2h_bundle, addIncludes } = require('./js/opencl');
|
||||||
const { opencl_minify } = require('./js/opencl_minify');
|
const { opencl_minify } = require('./js/opencl_minify');
|
||||||
const cwd = process.cwd();
|
|
||||||
|
|
||||||
|
|
||||||
function cn()
|
function cn()
|
||||||
|
@ -76,18 +75,24 @@ function kawpow()
|
||||||
fs.writeFileSync('kawpow_dag_cl.h', text2h(kawpow_dag, 'xmrig', 'kawpow_dag_cl'));
|
fs.writeFileSync('kawpow_dag_cl.h', text2h(kawpow_dag, 'xmrig', 'kawpow_dag_cl'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (let i = 0; i < 2; i++) {
|
||||||
|
if (fs.existsSync('src/backend/opencl/cl/OclSource.h')) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
process.chdir(path.resolve('src/backend/opencl/cl/cn'));
|
process.chdir('..');
|
||||||
|
}
|
||||||
|
|
||||||
|
process.chdir(path.resolve('src/backend/opencl/cl'));
|
||||||
|
|
||||||
|
const cwd = process.cwd();
|
||||||
|
|
||||||
|
process.chdir(path.resolve(cwd, 'cn'));
|
||||||
cn();
|
cn();
|
||||||
cn_r();
|
cn_r();
|
||||||
|
|
||||||
process.chdir(cwd);
|
process.chdir(path.resolve(cwd, 'rx'));
|
||||||
process.chdir(path.resolve('src/backend/opencl/cl/rx'));
|
|
||||||
|
|
||||||
rx();
|
rx();
|
||||||
|
|
||||||
process.chdir(cwd);
|
process.chdir(path.resolve(cwd, 'kawpow'));
|
||||||
process.chdir(path.resolve('src/backend/opencl/cl/kawpow'));
|
|
||||||
|
|
||||||
kawpow();
|
kawpow();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue