PDA

View Full Version : How to include a Makefile with another Makefile | ver: Qt 4.3.3



vels
23rd June 2011, 10:02
Hi,

I have two projects A and B. B has dependency with A, Right now I build A and then proceed to build B.
If I build project B, project A should be built automatically. I tried to add INCLUDEPATH of Project’s A Makefile path in B’s Makefile but I get “No rule to make target” error, when I execute B’s Makefile

Any ideas to resolve this dependency?

-vels

vels
24th June 2011, 12:44
solved by adding depdency target to phony target

.PHONY: all Bprj Aprj clean

all: Bprj Aprj

Bprj: Aprj
cd Bprj && qmake && make

Aprj:
cd Aprj && make non-qt-target

clean:
cd Bprj && qmake && make clean
cd Aprj && make clean