Ticket #40309: patch-Common-common-rules.mk.diff

File patch-Common-common-rules.mk.diff, 1.0 KB (added by dstrubbe (David Strubbe), 11 years ago)
  • Common/common-rules.mk

     
    4646F90_CMD = $(F90free) $(FTNINC) -c $(FOPTS) $(basename $<).p.f -o $(basename $<).o $(MOD_OPT)$(dir $<)
    4747F90_CMD_NOOPT = $(F90free) $(FTNINC) -c $(FNOOPTS) $(basename $<).p.f -o $(basename $<).o $(MOD_OPT)$(dir $<)
    4848# $(MOD_OPT) directs where to put the resulting *.mod file
    49 f90_CPP = $(FCPP) $(INCLUDE) $(CPPOPT) $< > $(basename $<).p.f
     49
     50#clang on MacOS treats files incorrectly if they have .F90 extension; but MacOS is case-insensitive
     51#anyway, so we can refer to the file either way
     52ifeq ($(findstring clang,$(FCPP)),clang)
     53  f90_name = $(basename $<).F90
     54else
     55  f90_name = $<
     56endif
     57
     58f90_CPP = $(FCPP) $(INCLUDE) $(CPPOPT) $(f90_name) > $(basename $<).p.f
    5059F90_CPP = $(FCPP) -P $(INCLUDE) $(CPPOPT) $< > $(basename $<).p.f
    5160ifneq (,$(filter $(COMPFLAG),-DOPEN64 -DPATH -DABSOFT -DCRAY))
    5261# these compilers name all modules uppercase