0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

makeコマンドについて

Last updated at Posted at 2022-11-18

makeコマンド

ソースコードをコンパイルしてソフトウェアの実行ファイルを作る(ビルド)するために、Linuxでよく使われるコマンド。
オプションなしで実行する他にターゲット指定することもでき、指定するターゲットによって事前にMakefileで設定されたさまざまな動作を自動で行わせることができる。

makeコマンドオプション一覧(代表的なもの)

  • make
    引数にターゲットを指定しないと、自動的にmake allとした時の動作になる。

  • make all
    さまざまな処理が行われる。
    主に依存関係のチェック、カーネル本体とモジュールのビルド、不要になった一時ファイルの削除が自動的に実行される。

  • make mrproper
    設定ファイルを含めてソースディレクトリ内を初期化する。
    カーネルソースをダウンロードした後に実行し設定ファイルを確実に初期化しておくことが推奨される。

  • make clean
    設定ファイルは残してソースディレクトリ内の一時ファイルなどを削除する。

  • make modules_install
    ビルドし終わったカーネルモジュールを実際に現在のシステムにインストールする。
    これを行わないとカーネルがモジュールを認識できずに使えない。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?