# Directories LIBDIR = . INCLDIR = . # Compilers and options MPL = mpl MPLFLAGS = FC = mpfortran FFLAGS = -pevariable -pmemsize=16 # Edit what you want to make all: mpltest hpftest # Source files MPLSRC = p3pack.m MPLOBJ = p3pack.o WRAPSRC = p3wrap.m WRAPOBJ = p3wrap.o INCLSRC = $(INCLDIR)/p3pack.h $(INCLDIR)/genutil.h P3LIB = $(LIBDIR)/libp3pack.a LIBRARIES = -lp3pack # 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) $< $(P3LIB): $(MPLOBJ) $(WRAPOBJ) mpar r $(P3LIB) $(MPLOBJ) $(WRAPOBJ) mpranlib $(P3LIB) # The following keywords can be used after make, e.g. "make lib" lib: make $(P3LIB) mpltest: mpltest.o $(FFTLIB) $(P3LIB) $(MPL) -o $@ mpltest.o -I$(INCLDIR) -L$(LIBDIR) $(LIBRARIES) hpftest: hpftest.o $(FFTLIB) $(P3LIB) $(FC) $(FFLAGS) -o $@ hpftest.o -I$(INCLDIR) -L$(LIBDIR) $(LIBRARIES) clean: rm *.o