Next: , Previous: , Up: Project Types   [Contents]


1.4.9 Native Library (native-library.make)

A "native library" is a project which is to be built as a shared library on most targets and as a framework on Darwin. (Currently this is only the case for apple-apple-apple.) In other words, it is to be built as the most appropriate native equivalent of a traditional shared library (see library.make and framework.make).

Native Library project: NATIVE_LIBRARY_NAME

NATIVE_LIBRARY_NAME should be the name of the native library, without the ’lib’. All the other variables are the same as the ones used in libraries and frameworks.

To compile something against a native library, you can use ADDITIONAL_NATIVE_LIBS += MyLibrary This will be converted into -lMyLibrary link flag on for most targets and into -framework MyLibrary link flag for apple-apple-apple.

To add the corresponding flags, you can use ADDITIONAL_NATIVE_LIB_DIRS += ../MyPath This will be converted into -L../MyPath/$(GNUSTEP_OBJ_DIR) flag on for most targets and into -F../MyPath flag for apple-apple-apple.