Makefile: Use wildcard to determine list of source files.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This commit is contained in:
Grzegorz Kowal 2019-01-30 18:21:13 -02:00
parent 4eb292c67d
commit 8e314ce46c

View File

@ -87,14 +87,9 @@ endif
name = amun
files = algebra blocks boundaries constants coordinates domains driver \
equations evolution gravity integrals interpolations io mesh \
mpitools operators parameters problems random refinement schemes \
shapes sources timers user_problem
sources := $(addprefix $(SRCSDIR)/,$(addsuffix .F90, $(files)))
objects := $(addprefix $(OBJSDIR)/,$(addsuffix .o, $(files)))
modules := $(addprefix $(OBJSDIR)/,$(addsuffix .mod, $(files)))
sources := $(wildcard $(SRCSDIR)/*.F90)
objects := $(sources:$(SRCSDIR)/%.F90=$(OBJSDIR)/%.o)
modules := $(sources:$(SRCSDIR)/%.F90=$(OBJSDIR)/%.mod)
all: $(name).x