To support this your system has to be built in a non-flattened way. Meaning that during the installation of gnustep-make you should have selected --disable-flattened and the types of library combinations you want to support, through the --with-library-combo option. With library combinations we mean the Objective-C runtime, the Foundation library and the Application library. For more details about this see the LIBRARY-COMBO section.
If you installed your GNUstep system in a non-flattened way all system dependend binaries are installed in subdirectories with cpu/os/library-combo information. That means for instance that the gnustep-base library will be installed in Library/Libraries/ix86/linux/gnu-gnu-gnu/ when you are on an Intel x86 system, running linux with the GNU runtime for Objective-C and you installed GNUstep.
For each and every library-combo that you want to support you should create the environment through gnustep-make, because it installs a different config.make to support its own CC, OPTFLAGS, etc. flags.
If a program wants to work with all the possible combinations it will have to provide different binaries for each combination because it's not possible to have a tool compiled for NeXT Foundation that runs with gnustep-base or vice-versa. To summarize, a program can be compiled for these combinations:
We'll denote the fact that an application was compiled for a certain combination of the above values by using the abbreviations of the different subsystems and placing dashes between them. For example an application compiled for NeXT Foundation using NeXT AppKit will have the compile attribute nx-nx-nx. An application compiled for Apple Cocoa with the GNU compiler for Objective-C gnu-apple-apple and another one compiled for gnustep-base using gnustep-gui under Unix will be denoted by gnu-gnu-gnu. Here is a list of some of the possible combinations:
Runtime Foundation GUI
nx nx nx
nx fd gnu
gnu gnu gnu
ng gnu gnu
gnu fd gnu
apple apple apple
apple gnu gnu
Note that one can choose his/her own packages to build; it is not required to have all the packages installed on the system. Not having all of them installed limits only the ability to build and distribute binaries for those missing combinations.
To allow the right libraries to be found, you need to source GNUstep.sh before using GNUstep, and you need to start up your application by using openapp, which will locate the right binary for your library combo.
$ make library_combo=library-combo
For instance if you want to choose to compile using the GNUstep's Foundation implementation and use the GNUstep GUI library on a GNU/Linux machine you can do like this:
$ make library_combo=gnu-gnu-gnu
If your project requires running configure before compiling there are two issues you have to keep in mind. 'configure' is used to determine the existence of particular header files and/or of some specific functionality in the system header files. This thing is usually done by creating a config.h file which contains a couple of defines like HAVE_... which say if the checked functionality is present or not.
Another usage of configure is to determine some specific libraries to link against to and/or some specific tools. A typical GNUstep program is not required to check for additional libraries because this step is done by the time the makefile package is installed. If the project still needs to check for additional libraries and/or tools, the recommended way is to output a config.mak file which is included by the main GNUmakefile, instead of using Makefile.in files which are modified by configure. The reason for not doing this is to avoid having the makefiles contain target dependencies like above, this way keeping only one makefile instead of several for each target machine.
The makefile package is written for GNU make because it provides some very powerful features that save time both in writing the package but also at runtime, when you compile a project.
The GNUstep makefile package should be able to compile and link an application for another machine just by typing
$ make target=target-triplet
where target-triplet is the canonical system name as reported by config.guess.
Version 2.0.0 of gnustep-make introduced many changes with previous releases, which was mainly the work of Nicola Pero <firstname.lastname@example.org>
This work could only be as is due to the notes and corrects from Nicola Pero <email@example.com>.
Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved.