Книга: Embedded Linux development using Eclipse

5.1.1 Make Targets

5.1.1 Make Targets

Open the Makefile in the Editor window. You’ll notice that it builds three different targets, one of which is intended to run on an embedded computer board.

By default, the only thing CDT knows how to make is “all.” In this case, “all” can be one of two targets depending on the environment variable TARGET. Then there’s an additional build target for the simulated devices program. We have to tell Eclipse about these additional targets.

In the right-hand tabbed window, select the Make Target view and right click on the thermostat entry, which brings up a context menu as shown in Figure 5.3. Select Add Make Target, which is probably the only selection currently enabled. That brings up the Create a new Make target dialog shown in Figure 5.4.


Figure 5.3: Make Target view.


Figure 5.4: Create make target dialog.

Fill it out as shown in Figure 5.4 and click Create. There is now a new entry under thermostat in the Make Target view named “devices.” Right-click that entry and select Build Make Target. The devices program builds.

Like most operations in Eclipse, there are several ways to create a Make target. With the thermostat project name highlighted in either the Make Target or Project Explorer views, select Project?Make Target?Create…. Enter the Target Name as “target” and the Make Target as “all.” Uncheck the Use default box and add “TARGET=1” after make in the Build command box.

This target will only build if you happen to have an ARM-Linux tool chain. More on that later in the chapter.

Оглавление книги

Оглавление статьи/книги

Генерация: 0.606. Запросов К БД/Cache: 3 / 0
поделиться
Вверх Вниз