mGSTEP
 
F A Q    |    Notes    |    Progress    |    Projects    |    Home   
 
Configuration and build process

The mGSTEP Makefiles package provides a central build configuration for all projects that rely on the mGSTEP libraries. The underlying concept borrowed from NeXTSTEP is that most projects fall into one of several categories: application, bundle, CLI tool, library or subproject. Once mGSTEP itself is configured inclusion of a simple and well defined makefile allows the developer to build any of the aforementioned project types with minimal effort. The configuration utility behaves along the lines of that in the Linux kernel by creating a .config file which defines the build configuration. It simplifies cross compiling and modular building by allowing the developer to select which components and libraries get built while storing the result for later use in recreating the build.

How it works

Configuration occurs automatically when mGSTEP is first built. Two files are generated in the Makefiles/configs directory named: config.make and config.h while the configuration state is placed at the root of the source tree in a .config file. The config.make file largely corresponds to one of the platform configuration Makefiles. The config.h file is dynamically generated by the configure script and is included by the mGSTEP header files whenever a dependent project is built. Extending mGSTEP to a new platform requires that the developer create a new platform Makefile along with additions to the configure script so that it auto-detects the new platform. Additionally, use of the Distributed Objects (DO) subsystem requires the development of platform specific macro definitions. Alternatively, a dummy NSMethodSignature class can be implemented in order to use Foundation without DO.


Typical application project Makefile
#
#	Makefile for Scale
# 
#
TOP = $(MGSTEP_ROOT)

LIBS = -lutil


# Applications to be built
APPS = \
Scale \

# Files to be compiled for the application
Scale_OBJS = \
Scale.o \
Controller.o \
ClockView.o \

$(TARGET)_PRINCIPAL_CLASS = Controller

# Resource files to be copied into the app's resources directory
Scale_RESOURCES = \
Clock.tiff \
Scale.tiff \
SizePanel.mib \

#
#	Include Makefiles 
# 
include $(TOP)/Makefiles/app.make