Next: , Previous: Project Types, Up: Project Types



1.4.1 Standard Project Variables

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.

— Standard Project Variables: C_FILES

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.

— Standard Project Variables: OBJC_FILES

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.

— Standard Project Variables: CC_FILES

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.

— Standard Project Variables: OBJCC_FILES

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.

— Standard Project Variables: CPPFLAGS

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 default CPPFLAGS, see CPPFLAGS, they are in addition to CPPFLAGS. 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 the LIBRARY_NAME variable.

— Standard Project Variables: OBJCFLAGS

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 default OBJCFLAGS, see OBJCFLAGS, they are in addition to OBJCFLAGS. 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 the LIBRARY_NAME variable.

— Standard Project Variables: CFLAGS

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 default CFLAGS, see CFLAGS, they are in addition to CFLAGS. 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 the LIBRARY_NAME variable.

— Standard Project Variables: LDFLAGS

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 default LDFLAGS, see LDFLAGS, they are in addition to LDFLAGS. 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 the LIBRARY_NAME variable.

— Standard Project Variables: INCLUDE_DIRS

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 with ADDITIONAL_INCLUDE_DIRS, so they will always be searched first. Replace the xxx with the name of the project as listed by the LIBRARY_NAME variable.

— Standard Project Variables: RESOURCE_FILES

xxx_RESOURCE_FILES is a list of the resource files to be included in the project bundle. This option is only relevant for types that use a directory to store all their files, such as frameworks, bundles, applications, palettes, services, etc.