makefile에 응용정도 될까요?하하;
장난감
2023.04.01
질문 제목 : makefile의 응용 정도될까요?ㅋmakefile에 헤더파일을 포함하여 오브젝트 파일과 실행 파일을 생성하는 문제입니다. 질문 내용 : 말그대로 입니다.
.suffixes: .c .o
cc = gcc
inc = /home/nomos/study/glass/test12/inc/type.h
libs = /home/nomos/study/glass/test12/inc
rm = -r -f
cflags = -g -wall $(inc)
target = main
source = main.c input.c run.c
objs = main.o input.o run.o
dep :
gccmakedep $(inc) $(srcs)
$(target) : $(objs)
$(cc) -o $@ $(objs) $(libs)
clean:
$(rm) $(target)
저는 이렇게 작성했는데 type.h라는 헤더파일을 찾지못한다는 요류문이 나오네요
3개의 폴더가 있습니다
헤더파일이 있는 inc
소스파일이 있는 src
오브젝트 파일을 담을 obj
이 세개의 폴더를 이용해야 합니다.. ㅠㅠㅠ