如何告诉我的GNUMakefile链接特定的库?

时间:2012-08-26 17:34:54

标签: objective-c gnustep gnu-make

我的GNUMake文件如下:

include $(GNUSTEP_MAKEFILES)/common.make

APP_NAME = MyApp

MyApp_HEADER_FILES = src/objc/framework/Bug.h src/objc/framework/NSMutableArray+Shuffle.h src/objc/framework/World.h src/objc/framework/BugProtocol.h src/objc/domain/RandomBug.h 
MyApp_OBJC_FILES =  src/objc/framework/Bug.m src/objc/framework/World.m src/objc/framework/NSMutableArray+Shuffle.m src/objc/domain/RandomBug.m 

include $(GNUSTEP_MAKEFILES)/application.make

在我的代码中,我使用arc4random,这意味着我需要链接libbsd。我如何在我的makefile中执行此操作?

1 个答案:

答案 0 :(得分:3)

我想出来了。我使用ADDITIONAL_TOOL_LIBS

include $(GNUSTEP_MAKEFILES)/common.make

APP_NAME = BhumiApp

BhumiApp_HEADER_FILES = src/objc/framework/Bug.h src/objc/framework/NSMutableArray+Shuffle.h src/objc/framework/World.h src/objc/framework/BugProtocol.h src/objc/domain/RandomBug.h 
BhumiApp_OBJC_FILES =  src/objc/framework/Bug.m src/objc/framework/World.m src/objc/framework/NSMutableArray+Shuffle.m src/objc/domain/RandomBug.m 
ADDITIONAL_TOOL_LIBS = -l:libbsd.so.0

include $(GNUSTEP_MAKEFILES)/application.make