diff --git a/assets/specTemplate.cfg b/assets/specTemplate.cfg index e5f364d..28197e2 100644 --- a/assets/specTemplate.cfg +++ b/assets/specTemplate.cfg @@ -116,7 +116,7 @@ default: %ifndef %{gcc_dir} #% define gcc_dir /SW/compilers/GCC/Linux/x86_64/gcc-6.3.0 % define gcc_dir @@GCCDIR@@ -% define sysroot_dir /usr/sw/standard-830-6b-test +% define sysroot_dir @@SYSROOT@@ %endif # EDIT if needed: the preENV line adds library directories to the runtime diff --git a/src/spec/index.ts b/src/spec/index.ts index ed9f386..31f563a 100644 --- a/src/spec/index.ts +++ b/src/spec/index.ts @@ -63,13 +63,15 @@ export interface ConfigOptions { gccdir: string; optimize: string[]; ldflags: string[]; + sysroot: string; } export function renderConfig(options: ConfigOptions) { return `# Rendered from TypeScript ${new Date().toLocaleString()}, do not edit!\n\n\n` + specTemplate .replace("@@GCCDIR@@", options.gccdir) .replace("@@OPTIMIZE@@", options.optimize.join(' ')) - .replace("@@LDFLAGS@@", options.ldflags.join(' ')); + .replace("@@LDFLAGS@@", options.ldflags.join(' ')) + .replace("@@SYSROOT@@", options.sysroot); }