다음 질문이 있습니다. 포트란 90 소스 파일 집합이 있는데 대부분 모듈이 들어 있습니다. 정적 라이브러리 (.a)를 만들어야하고 다음 Makefile을 사용했습니다.포트란 메이크 파일
.SUFFIXES: .o .c .f90 .f .mod
DEPSF = tt_f90m, bt
include Makefile.in #Contains compiler flags (CC, FORT, etc.)
OBJS = $(DEPSF:,=.o).o
mytt.a: $(OBJS)
ar rc mytt.a $(OBJS)
.f90.o:
$(FORT) -c $<
그것은 잘 작동하지만 그것은 성가신 기능이 있습니다 : 나는 소스 파일 중 하나를 편집 할 경우 mytt.a 대상은 재건되지 않습니다. 모든 .o 및 .mod 파일을 제거해야만 문제가 발생합니다.
....
Considering target file `tt_f90m.o'.
....
Found an implicit rule for `tt_f90m.o'.
Considering target file `tt_f90m.mod'.
Looking for an implicit rule for `tt_f90m.mod'.
....
No implicit rule found for `tt_f90m.mod'.
Finished prerequisites of target file `tt_f90m.mod'.
No need to remake target `tt_f90m.mod'.
Finished prerequisites of target file `tt_f90m.o'.
Prerequisite `tt_f90m.mod' is older than target `tt_f90m.o'.
No need to remake target `tt_f90m.o'.
가 어떻게 올바르게 메이크 파일을 작성할 수 있습니다 다음과 같이 의 출력을 만들 -d
은?
나는 질질 거리는 것을 싫어하지만 정말로 오랫동안 반복적 인 오류 메시지가 표시되면 읽는 것이 어렵습니다. 앞으로는 나타나는 오류 메시지의 패턴을 파악하고 몇 줄만 게시 할 수 있습니다. – Dan
나는 동의한다, 나는 질문을 편집했다 –