User guide
Nios II IDE Help System
The following section describes the function of each of these included files. For detailed
implementation details, refer to the individual file concerned.
makefile
Both application and system projects contain at their top level a makefile generated by
the Nios II IDE. This makefile is stored within the project.
This file contains the information supplied through the IDE in the form of make variables.
For example, compiler flags defined by the user are added to the CFLAGS variable, e.g.
CFLAGS = -O0 -g --Wall
See the comments in the generated makefile for a complete list of the available
variables.
The intention is that these variables should be generically applicable regardless of your
computer's operating system. The rules which combine and use these variables are
supplied in two files: system.mk and app.mk.
The last line of a Nios II IDE generated makefile includes one of these two files. An
application project includes app.mk, and a system library project includes system.mk.
These are described below.
app.mk
This file is included into the top level makefile for application projects, and is supplied in
the build directory of the altera_hal component; app.mk is responsible for defining the
rules used to build the project. In practice this file defers the rule definitions to the
included file: app_rules.mk. app.mk only configures variables required by
app_rules.mk.
The key feature of this file is that it includes the auto-generated file, generated_all.mk,
to obtain a list of the components built into the library. generated_all.mk defines four
34