> For the complete documentation index, see [llms.txt](https://sdk.twelite.info/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sdk.twelite.info/twelite-sdk-howto/birudonitsuite/makefile-nitsuite.md).

# Makefile について

ビルド対象のソースコードや諸定義は Makefile に記述します。

| TWELITE                          | ビルドするモデルを指定する。TWELITE BLUE (TWE-001 Lite) の場合は BLUE、TWELITE RED の場合は RED を指定する。                        |
| -------------------------------- | ------------------------------------------------------------------------------------------------------ |
| PROJNAME                         | 生成ファイル名を決めます。指定が無い場合は ../.. フォルダ名を使用します。                                                               |
| APPSRC                           | コンパイル対象ファイルを指定します。APPSRC+=test.c のように += 演算子を使用します。                                                    |
| TARGET\_TYPE                     | 生成する対象を指定します。TARGET\_TYPE = bin を指定した場合は実行形式、TARGET\_TYPE = a を指定した場合はライブラリとなります。                      |
| TOCONET\_DEBUG                   | 1ならスタックのデバッグコードを含めます。出力ファイル名に \_TDBG が付記されます。スタックデバッグコードについては、API解説を参照してください。0は含めず、バイナリサイズが若干小さくなります。  |
| CFLAGS                           | コンパイル時の gcc オプションを追加します。CFLAGS += -DMY\_DEBUG のように += 演算子を利用します。最適化オプションなどは事前定義されていますので指定しないようにしてください。 |
| APP\_COMMON\_SRC\_DIR\_ADD1 .. 4 | ソースおよびヘッダファイルの検索パスを指定します。APP\_COMMON\_SRC\_DIR\_ADD1 = ../mydir のようにMakefile のあるフォルダからの相対パスを指定します。     |
| INCFLAGS                         | インクルードフォルダのみを追加指定したい場合は、INCLFAGS == -I../mydir のように相対パス指定します。                                          |
| ADDITIONAL\_LIBS                 | 追加でリンクしたいライブラリ (.a) を指定します。ADDITIONAL\_LIBS += ../mylib.a のように追加します。                                   |
| ADDITIONAL\_OBJS                 | 追加でリンクしたいオブジェクトファイル (.o) を指定します。ADDITIONAL\_OBJS += ../myobj.o のように追加します。                              |
| LDLIBS                           | コンパイラ付属ライブラリ (math, sppなど) を指定します。LDLIBS += m のように追加します。この指定では-lmがリンカに渡されます。                           |
| LDFLAGS                          | リンカへの追加オプションです。LDFLAGS += -u dummy のように追加指定します。必要なオプションは事前に定義されています。                                   |
| OBJDIR\_SUFF                     | オブジェクト格納フォルダ名に設定した文字列を含める。                                                                             |
| TARGET\_SUFF                     | ターゲット(.bin)ファイル名に設定した文字列を含める。                                                                          |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://sdk.twelite.info/twelite-sdk-howto/birudonitsuite/makefile-nitsuite.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
