#
# 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)/Build/app.make
|
mGSTEP's build automation provides basic build configuration for all projects that rely on its 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 the inclusion of a simple and well defined makefile allows the developer to build any of the aforementioned project types with minimal effort. Build tuning is similar to that of the Linux kernel, it generates a .config file to define the chosen build configuration and for later use in recreating the build.
How it works
Configuration occurs automatically when mGSTEP is first built. Two files are generated in the Build/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 is generated using one of the platform specific stub Makefiles as a precursor. 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. Porting mGSTEP to a new platform may require creation of a new platform Makefile along with additions to the configure script so that it auto-detects the new platform.
Typical application project Makefile