开发者

How to create folder for target in makefile

Hello I have written makefile which compose lib.a from object files. I need to make .zip from this lib, create new directory for it and save. Could anybody help?

makefile:

CONFIG ?= BuildConfigurations/config.mk   
include $(CON开发者_StackOverflow中文版FIG) 

objects = $(addsuffix /*.o, $(local_include)) 

ib.a: $(objects)  
    ${AR} -cr ${@} ${^}

config.mk:

local_include := Target/ASIHTTPRequest


This sort of a thing is going to be platform specific to at least a degree. If you are on linux you can just

ib.a: $(objects) dir
    ${AR} -cr ${@} ${^}

dir:
    mkdir dir

dir/id.zip: ib.a
    zip dir/id.zip ib.a

I am not sure if the commands will be the same on another platform.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜