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
精彩评论