all: moduleSolver.o electromagnetic.o pusher.o

electromagnetic.o:
	$(MAKE) -C electromagnetic all

pusher.o:
	$(MAKE) -C pusher all

moduleSolver.o: electromagnetic.o pusher.o moduleSolver.f90
	$(FC) $(FCFLAGS) -c $(subst .o,.f90,$@) -o $(OBJDIR)/$@

%.o: %.f90
	$(FC) $(FCFLAGS) -c $< -o $(OBJDIR)/$@
