Geo
Geo

Reputation: 96767

How can I control the order in which make targets are executed?

Let's say I have a main target, exe which depends on three libs:

exe: LIB1.lib LIB2.lib LIB3.lib

and the lib targets have something like this:

LIB1: $(LIB1OBJECTS)
LIB2: $(LIB2OBJECTS)
LIB3: $(LIB3OBJECTS)

Giving that most of the time, make will be run with a -j flag, and I would like for LIB1 and LIB2 to be built in parallel, how can I make sure that LIB3 is always built after LIB2?

Upvotes: 0

Views: 146

Answers (1)

Ignacio Vazquez-Abrams
Ignacio Vazquez-Abrams

Reputation: 798446

Make LIB3 dependent on LIB2.

Upvotes: 2

Related Questions