[TIL] Linux : April 21, 2020

RE_BROTHER·2020년 4월 27일
0

TIL

목록 보기
7/41
post-thumbnail

Linux Programming for Raspberry-pi

Compile

cpp h.c h.i
gcc -S h.i
as -V -Qy -o h.o h.s
gcc -o hello h.o

위 전체 과정을 한번에 처리하는 명령어

gcc -o hello h.c

해당 디렉토리의 파일 속성 표시

file *

make Utility

gcc -o [executeFile] [inputFile1] [inputFile2] [inputFile3] ...

다중 input 파일을 받아 실행파일을 컴파일하는 경우

vi Makefile
[executeFile] : [inputFile1] [inputFile2] ...
	gcc -o test [inputFile1] [inputFile2] ...

효율성 있는 Makefile 만드는 법

매크로를 확용한 더 효율성 있는 Makefile 만드는 법

.o -> ar : .a -> ranlib -> nm
.a 까지가 정적 라이브러리 생기는 과정

profile
I hope the All-Rounder Developer & Researcher

0개의 댓글