开发者

How to create folder for target in makefile

开发者 https://www.devze.com 2023-02-19 23:37 出处:网络
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?

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

精彩评论

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