# Directories LIBDIR = . INCLDIR = . # Compilers and options MPL = mpl MPLFLAGS = FC = mpfortran FFLAGS = -pevariable -pmemsize=16 # Edit what you want to make all: mpltest realtest hpftest hpftest2 hpftest3 # Source files MPLSRC = spfft.m p3pack.m MPLOBJ = spfft.o p3pack.o WRAPSRC = fftwrap.m WRAPOBJ = fftwrap.o INCLSRC = spfftOptim.h $(INCLDIR)/spfft.h $(INCLDIR)/p3pack.h \ $(INCLDIR)/genutil.h FFTLIB = $(LIBDIR)/libspfft.a LIBRARIES = -lspfft # Implicit rules .SUFFIXES: .m .m.o: $(MPL) $(MPLFLAGS) -c -I$(INCLDIR) $< # Other targets $(MPLOBJ): $(MPLSRC) $(INCLSRC) $(MPL) $(MPLFLAGS) -c -I$(INCLDIR) $< $(WRAPOBJ): $(WRAPSRC) $(INCLSRC) $(MPL) $(MPLFLAGS) -c -I$(INCLDIR) $< $(FFTLIB): $(MPLOBJ) $(WRAPOBJ) mpar r $(FFTLIB) $(MPLOBJ) $(WRAPOBJ) mpranlib $(FFTLIB) # The following keywords can be used after make, e.g. "make lib" lib: make $(FFTLIB) mpltest: mpltest.o $(FFTLIB) $(P3LIB) $(MPL) -o $@ mpltest.o -I$(INCLDIR) -L$(LIBDIR) $(LIBRARIES) realtest: realtest.o $(FFTLIB) $(P3LIB) $(MPL) -o $@ realtest.o -I$(INCLDIR) -L$(LIBDIR) $(LIBRARIES) hpftest: hpftest.o $(FFTLIB) $(P3LIB) $(FC) -o $@ hpftest.o -I$(INCLDIR) -L$(LIBDIR) $(LIBRARIES) hpftest2: hpftest2.o $(FFTLIB) $(P3LIB) $(FC) -o $@ hpftest2.o -I$(INCLDIR) -L$(LIBDIR) $(LIBRARIES) hpftest3: hpftest3.o $(FFTLIB) $(P3LIB) $(FC) -o $@ hpftest3.o -I$(INCLDIR) -L$(LIBDIR) $(LIBRARIES) clean: rm *.o