Most project types have some variables in common. The application, library, native-library, bundle, tool, palette, service and framework types all accept the following variables. Note that they are all prefixed with the name of the type, as specified in the type's name variable. For example, if you were to specify the name of a bundle as "MyBundle" and list the Objective-C files within it, you would go:
BUNDLE_NAME = MyBundle MyBundle_OBJC_FILES = main.m MyBundle.m AnotherFile.m
Note how OBJC_FILES
is prefixed with MyBundle
followed by an underscore. Also note that file names are separated with a space. Below, project refers to the project you are building, whether it be a tool, an application, a framework, etc.
xxx_C_FILES
is the list of C files, with a .c extension, that are to be compiled to generate the xxx type. Replace the xxx with the name of the project as listed by the project type's name variable.
xxx_OBJC_FILES
is the list of Objective-C files, with a .m extension, that are to be compiled to generate the xxx type. Replace the xxx with the name of the project as listed by the project type's name variable.
xxx_CC_FILES
is the list of C++ files, with a .cpp or .cc extension, that are to be compiled to generate the xxx type. Replace the xxx with the name of the project as listed by the project type's name variable.
xxx_OBJCC_FILES
is the list of Objective-C++ files, with a .mm extension, that are to be compiled to generate the xxx type. Replace the xxx with the name of the project as listed by the project type's name variable. Make sure that you have at least gcc 4.10; Objective-C++ is not available in any gcc version less than this.
xxx_CPPFLAGS
are additional flags that will be passed to the compiler preprocessor when compiling Objective-C and C files to generate the xxx project. Adding flags here does not override the defaultCPPFLAGS
, see CPPFLAGS, they are in addition toCPPFLAGS
. These flags are specific to the xxx project, see ADDITIONAL_CPPFLAGS, to see how to specify global preprocessor flags. Replace the xxx with the name of the listed as listed by theLIBRARY_NAME
variable.
xxx_OBJCFLAGS
are additional flags that will be passed to the compiler when compiling Objective-C files to generate the xxx project. Adding flags here does not override the defaultOBJCFLAGS
, see OBJCFLAGS, they are in addition toOBJCFLAGS
. These flags are specific to the xxx project, see ADDITIONAL_OBJCFLAGS, to see how to specify global compiler flags. Replace the xxx with the name of the project as listed by theLIBRARY_NAME
variable.
xxx_CFLAGS
are additional flags that will be passed to the compiler when compiling C files to generate the xxx project. Adding flags here does not override the defaultCFLAGS
, see CFLAGS, they are in addition toCFLAGS
. These flags are specific to the xxx project, see ADDITIONAL_CFLAGS, to see how to specify global compiler flags. Replace the xxx with the name of the project as listed by theLIBRARY_NAME
variable.
xxx_LDFLAGS
are additional flags that will be passed to the linker when it creates the xxx project. Adding flags here does not override the defaultLDFLAGS
, see LDFLAGS, they are in addition toLDFLAGS
. These flags are specific to the xxx project, see ADDITIONAL_LDFLAGS, to see how to specify global linker flags. Replace the xxx with the name of the project as listed by theLIBRARY_NAME
variable.
xxx_INCLUDE_DIRS
is the list of additional directories that the compiler will search when it is looking for include files; these flags are specific to the xxx project, see ADDITIONAL_INCLUDE_DIRS, to see how to specify additional global include directories. The directories should be specified as -I flags to the compiler. The additional include directories will be placed before the normal GNUstep and system include directories, and before any global include directories specified withADDITIONAL_INCLUDE_DIRS
, so they will always be searched first. Replace the xxx with the name of the project as listed by theLIBRARY_NAME
variable.