Previous: Library Combination, Up: Common Variables



1.7.5 Overridable Flags

— Variable: OBJCFLAGS

OBJCFLAGS are flags that are passed to the compiler when compiling Objective-C files. The user can override this variable when running make and specify different flags as the following command illustrates:

     make OBJCFLAGS="-Wno-implicit -Wno-protocol"
— Variable: CFLAGS

CFLAGS are flags that are passed to the compiler when compiling C files. The user can override this variable when running make and specify different flags as the following command illustrates:

     make CFLAGS="-Wall"
— Variable: OPTFLAG

OPTFLAG is the flag used to indicate the optimization level that the compiler should perform when compiling Objective-C and C files; this flag is set to -O2 by default, but the user can override this setting when running make as the following command illustrates:

     make OPTFLAG=

This command sets the optimization flag to be empty so that no optimization will be performed by the compiler.

— Variable: GNUSTEP_INSTALLATION_DIR

GNUSTEP_INSTALLATION_DIR is the root directory where the package will install its files; overriding this variable when running make will change all of the variables within the Makefile Package that depend upon it; the following command illustrates the use of this variable:

     make GNUSTEP_INSTALLATION_DIR="/GNUstep"

This command states that the /GNUstep directory should be used as the installation root directory; applications in the package will be installed under /GNUstep/Apps directory, libraries in the package will be installed under the /GNUstep/Library/Libraries directory, command line tools will be installed under the /GNUstep/Tools directory, and etc. By default the Makefile Package sets GNUSTEP_INSTALLATION_DIR to GNUSTEP_LOCAL_ROOT unless GNUSTEP_LOCAL_ROOT is empty in which case GNUSTEP_INSTALLATION_DIR will be set to GNUSTEP_SYSTEM_ROOT. Some packages will also override GNUSTEP_INSTALLATION_DIR within their makefile to force the package to install in (say) GNUSTEP_SYSTEM_ROOT instead of the default GNUSTEP_LOCAL_ROOT directory, but if the user sets the value of GNUSTEP_INSTALLATION_DIR when running make then that setting takes precedence over all others.