Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makefile: make Fortran object files depend on their dependency files #667

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions configuration/scripts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ RM := rm
AR := ar

.SUFFIXES:
.SUFFIXES: .F90 .F .c .o

.PHONY: all cice libcice targets target db_files db_flags clean realclean helloworld calchk sumchk bcstchk
all: $(EXEC)
Expand Down Expand Up @@ -167,13 +166,13 @@ libcice: $(OBJS)
@ echo "$(AR) -r $(EXEC) $(OBJS)"
$(AR) -r $(EXEC) $(OBJS)

.c.o:
%.o : %.c
$(CC) $(CFLAGS) $(CPPDEFS) $(INCLDIR) $<

.F.o:
%.o : %.F %.d
$(FC) -c $(FFLAGS) $(FIXEDFLAGS) $(CPPDEFS) $(INCLDIR) $<

.F90.o:
%.o : %.F90 %.d
$(FC) -c $(FFLAGS) $(FREEFLAGS) $(CPPDEFS) $(MODDIR) $(INCLDIR) $<

clean:
Expand Down