CHANNELDIR = .. EXECS = addfields.x ascii2field.x changegrid.x couette.x field2ascii.x \ fielddist.x fieldplots.x fieldprops.x L2IP.x linearcombo.x makebasis.x \ movieframes.x perturbfield.x projectfields.x projectseries.x randomfield.x \ symmetrize.x symmetryop.x # Special-purpose utilities OTHEREXECS = eigentable.x makeheatmode.x makestokesmode.x minimizegrid.x \ multibox.x poincare.x seriesdist.x seriesprops.x seriessymmetry.x \ symmphase.x symmseries.x transbasis.x verifyeigs.x multibox.x # Define default C flags for optimized and debugging compilation # Possible additional flags: -mtune=pentium4, -mtune-=athlon64 CFLAGS = -Wall -O2 -fomit-frame-pointer -DNDEBUG DCFLAGS = -Wall -g -DDEBUG PCFLAGS = -Wall -pg -O2 -DNDEBUG # Define header and library options for gcc. INCLUDEDIRS = -I$(CHANNELDIR) LIBS = -L$(CHANNELDIR)/channelflow -lchflow -lfftw3 -lm DLIBS = -L$(CHANNELDIR)/channelflow -lchflow-debug -lfftw3 -lm PLIBS = -L$(CHANNELDIR)/channelflow -lchflow-profile -lfftw3 -lm # Make optimized objects from source %.o : %.cpp g++ $(CFLAGS) $(INCLUDEDIRS) -c $< # Make debugging objects from source %.do : %.cpp g++ $(DCFLAGS) $(INCLUDEDIRS) -o $@ -c $< # Make profiling objects from source %.po : %.cpp g++ $(PCFLAGS) $(INCLUDEDIRS) -o $@ -c $< # Make optimized executables from objects and libraries %.x: %.o utilities.o $(CHANNELDIR)/channelflow/libchflow.a g++ $(CFLAGS) -o $@ $< $(OBJECTS) utilities.o $(LIBS) # Make debugging executables from objects and libraries %.dx: %.do utilities.do $(CHANNELDIR)/channelflow/libchflow-debug.a g++ $(DCFLAGS) -g -o $@ $< $(OBJECTS) utilities.do $(DLIBS) # Make debugging executables from objects and libraries %.px: %.po utilities.po $(CHANNELDIR)/channelflow/libchflow-profile.a g++ $(PCFLAGS) -pg -o $@ $< $(OBJECTS) utilities.po $(PLIBS) all: utilities.o $(EXECS) everything: utilities.o $(ALLEXECS) $(OTHEREXECS) install: $(EXECS) mkdir -p ../bin cp $(EXECS) ../bin clean : rm -f *.o *.x *.do *.dx *.asc *.bf *.ff