# Building Synfig using an arbitrary number of cores

**URL:** https://forums.synfig.org/t/building-synfig-using-an-arbitrary-number-of-cores/11030
**Category:** Building synfig
**Created:** [May 21, 2020, 5:19pm UTC](https://forums.synfig.org/t/building-synfig-using-an-arbitrary-number-of-cores/11030 "2020-05-21T17:19:03Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![FirasH](https://forums.synfig.org/user_avatar/forums.synfig.org/firash/32/4729_2.png) [@FirasH](https://forums.synfig.org/u/FirasH)
#### Post date: [May 21, 2020, 5:19pm UTC](https://forums.synfig.org/t/building-synfig-using-an-arbitrary-number-of-cores/11030/1 "2020-05-21T17:19:03Z")

</div>

I was wondering if it would be possible to choose the number of cores used to build.

In the script `build.sh`:

> <https://github.com/synfig/synfig/blob/e60a668e53cd718e910ad4172774f2672e797172/autobuild/build.sh#L49>

In practice, can we add an option to set the value of MAKE\_THREADS?  
(if not already available)

---

<div class="post-metadata">

### Author: ![BobSynfig](https://forums.synfig.org/user_avatar/forums.synfig.org/bobsynfig/32/175_2.png) [@BobSynfig](https://forums.synfig.org/u/BobSynfig)
#### Post date: [May 21, 2020, 6:55pm UTC](https://forums.synfig.org/t/building-synfig-using-an-arbitrary-number-of-cores/11030/2 "2020-05-21T18:55:50Z")

</div>

[https://synfig-docs-dev.readthedocs.io/en/latest/common/building.html](https://synfig-docs-dev.readthedocs.io/en/latest/common/building.html)

> And finally a quick note about “build.conf.sample” file in the root of source repository.
> 
> With this file you can tweak the number of threads used by the build scripts. Just copy “~/synfig.git/build.conf.sample” to “~/synfig.git/build.conf” and adjust its contents according to your needs.

> <https://github.com/synfig/synfig/blob/master/build.conf.sample>

😉

---

<div class="post-metadata">

### Author: ![FirasH](https://forums.synfig.org/user_avatar/forums.synfig.org/firash/32/4729_2.png) [@FirasH](https://forums.synfig.org/u/FirasH)
#### Post date: [May 22, 2020, 7:57am UTC](https://forums.synfig.org/t/building-synfig-using-an-arbitrary-number-of-cores/11030/3 "2020-05-22T07:57:42Z")

</div>

Didn’t know that, even though I’ve read that page at least once 🙃

I had in mind something like:  
`./2-build-debug.sh [package] [phase] optional:[--MAKE_THREADS=N]`  
but that will do the job.

Thank you!

---

<div class="post-metadata">

### Author: ![BobSynfig](https://forums.synfig.org/user_avatar/forums.synfig.org/bobsynfig/32/175_2.png) [@BobSynfig](https://forums.synfig.org/u/BobSynfig)
#### Post date: [May 22, 2020, 3:48pm UTC](https://forums.synfig.org/t/building-synfig-using-an-arbitrary-number-of-cores/11030/4 "2020-05-22T15:48:18Z")

</div>

Normally, you set global exports/environment BEFORE invoke the script, it would be more:  
`MAKE_THREADS=N ./2-build-debug.sh [package] [phase] optional`

In this very case, MAKE\_THREADS is overriden inside the script (line 49), but it would work with DEBUG=1 as prefix (lines 56-57)

😉
