728x90
configure, make, make install 명령
명령 | 설명 |
configure | configure 명령을 이용하여 Makfile 생성 |
make distclean | make clean과 유사하지만 Makefile을 포함하여 configure에 의해 생성된 모든 파일도 삭제합니다. (파일을 받고 압축을 푼 처음 상태로 만드는 것) |
make | Makefile에 따라 소스 코드를 컴파일하고 링크하고 목적 파일, 실행 파일을 생성합니다. (Makfile를 이용해서 소스 코드를 컴파일하여 실행가능한 설치파일을 만듬) |
make clean | 마지막 make 명령으로 생성된 개체 파일(접미사가 ".o"인 파일)과 실행 파일을 지웁니다 |
make install | 컴파일된 실행 파일을 시스템 디렉토리(일반적으로 /usr/local/bin 디렉토리)에 설치합니다. (설치파일을 설치하는 과정) |
make 컴파일 빠르게 하기
-j [N], --jobs[=N]
동시에 실행할 작업(명령)의 수를 지정합니다.
-j 옵션이 둘 이상 있으면 마지막 옵션이 유효합니다.
-j 옵션이 인수 없이 주어지면 make는 동시에 실행할 수 있는 작업의 수를 제한하지 않습니다.
make
make -j $(($(nproc) + 1))
make install
make install -j $(($(nproc) + 1))
make 버전 정보
$ make -v
GNU Make 3.82
Built for x86_64-redhat-linux-gnu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
make 옵션 사용법
$ make -h
사용법: make [옵션] [타겟] ...
옵션:
-b, -m Ignored for compatibility.
-B, --always-make Unconditionally make all targets.
-C DIRECTORY, --directory=DIRECTORY
Change to DIRECTORY before doing anything.
-d Print lots of debugging information.
--debug[=FLAGS] Print various types of debugging information.
-e, --environment-overrides
Environment variables override makefiles.
--eval=STRING Evaluate STRING as a makefile statement.
-f FILE, --file=FILE, --makefile=FILE
Read FILE as a makefile.
-h, --help Print this message and exit.
-i, --ignore-errors Ignore errors from recipes.
-I DIRECTORY, --include-dir=DIRECTORY
Search DIRECTORY for included makefiles.
-j [N], --jobs[=N] Allow N jobs at once; infinite jobs with no arg.
-k, --keep-going Keep going when some targets can't be made.
-l [N], --load-average[=N], --max-load[=N]
Don't start multiple jobs unless load is below N.
-L, --check-symlink-times Use the latest mtime between symlinks and target.
-n, --just-print, --dry-run, --recon
Don't actually run any recipe; just print them.
-o FILE, --old-file=FILE, --assume-old=FILE
Consider FILE to be very old and don't remake it.
-p, --print-data-base Print make's internal database.
-q, --question Run no recipe; exit status says if up to date.
-r, --no-builtin-rules Disable the built-in implicit rules.
-R, --no-builtin-variables Disable the built-in variable settings.
-s, --silent, --quiet Don't echo recipes.
-S, --no-keep-going, --stop
Turns off -k.
-t, --touch Touch targets instead of remaking them.
-v, --version Print the version number of make and exit.
-w, --print-directory Print the current directory.
--no-print-directory Turn off -w, even if it was turned on implicitly.
-W FILE, --what-if=FILE, --new-file=FILE, --assume-new=FILE
Consider FILE to be infinitely new.
--warn-undefined-variables Warn when an undefined variable is referenced.
--warn-undefined-functions Warn when an undefined user function is called.
This program built for x86_64-redhat-linux-gnu
Report bugs to <bug-make@gnu.org
728x90
'리눅스' 카테고리의 다른 글
[리눅스] tar 풀백업/증분백업/자동백업 (0) | 2022.03.05 |
---|---|
[리눅스] Cockpit 관리 도구 설치(WEB UI 기반) (0) | 2022.03.05 |
[리눅스] CentOS 7에 MySQL 5.7 설치 (0) | 2022.03.03 |
[리눅스] CentOS 7에 MySQL 5.7 설치(Source Compile & binary) (0) | 2022.03.03 |
[리눅스] mysql(mariadb) my.conf 설정 파일 찾기 (0) | 2022.03.03 |