How can we add a dependency as target in an already existing target?
Sorry, but I don't get whhat you mean...?! You mean a target dependency?! So target A depends on target B? This cyn be done by ordering the targets in a virtual target accordingly. E.g. order the targets A and B as you like; create avirtual target "all", select A and B to be compiled.
With regards, Morten.