I have something like the following: 3 libs (libA, libB, libC), libB and libC depends on libA.
Is there anyway to parallel build libB and libC once libA finish building using make ?
I have something like the following: 3 libs (libA, libB, libC), libB and libC depends on libA.
Is there anyway to parallel build libB and libC once libA finish building using make ?
If your makefile looks like this:
all: libA libC libC
libA:
...
libB: libA
...
libC: libA
...
then just running make -j 4
will cause make to parallelize what it can across 4 processes.
you can even parallelize by default by doing this:
all:
$(MAKE) -j $$(nproc) libA libB libC
libA:
...
libB: libA
...
libC: libA
...