Next: 3.2 Adding before-xxx-all and Up: 3 Single instance Previous: 3 Single instance

3.1 Compiling multiple files

GNUstep make automatically compiles multiple files for the same instance in parallel.

Let's look at a very simple example: an Objective-C tool composed of two source files -

include $(GNUSTEP_MAKEFILES)/common.make

TOOL_NAME = HelloWorld
HelloWorld_OBJC_FILES = HelloWorld.m main.m

include $(GNUSTEP_MAKEFILES)/tool.make

In this case, if you use 'make -j' you will see that the two files are compiled in parallel. So, the process is really composed of two steps:

Step 1. Compiling HelloWorld.m and main.m (in parallel)
Step 2. Linking them together