开发者

Makefile related

I have a Makefile where the first line is of the type:

all:client.so simulator
         LD_PRELOAD=/path/to/shared/lib/client.so ./simulator

and the other lines to above follows

Now, I have another program say xyz.c whose executable is called from within simulator using execve().

How can I include the compi开发者_运维问答lation linking etc of xyz.c in the same Makefile or do I have to use another makefile.

Thanks


Can't you just make all depend on the executable for xyc as well? And then add targets to build that from xyc.c?


You need to add a dependency and a rule to build it:

simulator: xyz.c
     $CC xyz.c -o yxz
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜