|[ < ]||[ > ]||[ << ]||[ Up ]||[ >> ]||[Top]||[Contents]||[Index]||[ ? ]|
Application makefiles are very similiar to those used to build Tools and Objective-C programmes, but allow extra specifications to build application wrappers and include their resource files. We assume you are already familiar with the GNUstep Makefile system.
Below is a generic, but complete application makefile, followed by an explanation of the various parameters.
include $(GNUSTEP_MAKEFILES)/common.make APP_NAME = ExampleApplication PACKAGE_NAME = ExampleApplication VERSION = 1.0 ExampleApplication_OBJC_FILES = main.m AppController.m \ ExampleClass.m ExampleApplication_C_FILES = regexp.c fun.c ExampleApplication_OBJC_LIBS = -lLibNumberOne -lPDFKit -lFunKit ExampleApplication_RESOURCE_FILES = \ ExampleApplication.gorm \ Info-gnustep.plist -include GNUmakefile.preamble include $(GNUSTEP_MAKEFILES)/application.make -include GNUmakefile.postamble
`common.make' and `application.make' are necessary to build an application, and need to be at the beginning and end respectively to the Makefile to operate properly. The `GNUmakefile.preamble' and `GNUmakefile.postamble' are optional, and permit you to define extra rules for building your application. You can include those lines without those files containing anything. Templates for those files also exist with the source code for gnustep-gui, which can simply be copied into your project and modified accordingly.
The table below describes the makefile variables that you can set to control the output of the make process. Note that appname refers to the application name that you set with
APP_NAME. It is case sensistive and so are file names. Also, most of the variables listed below are optional if you wish to get a program to compile, but it is recommend you make use of them where appropriate. Where variables ask for flags and compiler options, they should be in the format that
gcc expects, as it is the only compiler currently used with GNUstep. Many variables also take more than one parameter. They are usually separated by a space, and line breaks with a backslash. Please refer to the GNUstep Makefile Manual for more details.
NSApplicationwith your own application class, you should place it's name here. By default, GNUstep uses
NSApplicationas the application class.
-lMyLib, separated by a space. You do not need to list the gnustep-gui, gnustep-base and Objective-C runtime, as these are included for you.
|[ << ]||[ >> ]||[Top]||[Contents]||[Index]||[ ? ]|