1

我的 GNUMakefile 如下:

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中做到这一点?

4

1 回答 1

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
于 2012-08-26T18:02:38.203 回答