# Change the following variable if you installed channelflow elsewhere # or if your channelflow directory is labeled with a version number, # e.g. CHANNELDIR = $(HOME)/channelflow-1.3.2 CHANNELDIR = $(HOME)/channelflow CHANNELINC = -I$(CHANNELDIR)/include CHANNELLIB = -L$(CHANNELDIR)/lib OCTAVEINC = -I$(shell octave-config -p OCTINCLUDEDIR) OCTAVELIB = -Wl,-rpath $(shell octave-config -p OCTLIBDIR) -L$(shell octave-config -p OCTLIBDIR) OCTAVEFLAGS = -DHAVE_OCTAVE # 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 -O1 -fno-inline -DDEBUG PCFLAGS = -Wall -pg -O2 -DNDEBUG INCLUDES = $(CHANNELINC) $(OCTAVEINC) LIBRARIES = $(CHANNELLIB) -lchflow $(OCTAVELIB) -loctave -lcruft -lfftw3 -lm #DLIBS = $(CHANNELLIB)/lib -lchflow-debug $(OCTAVELIB) -lfftw3 -lm #PLIBS = -L$(CHANNELDIR)/lib -lchflow-profile $(OCTAVELIB) -lfftw3 -lm OBJECTS = octutils.o # Make optimized objects from source %.o : %.cpp g++ $(CFLAGS) $(INCLUDES) -c $< # Make debugging objects from source %.do : %.cpp g++ $(DCFLAGS) $(INCLUDES) -o $@ -c $< # Make debugging objects from source %.po : %.cpp g++ $(PCFLAGS) $(INCLUDES) -o $@ -c $< # Make optimized executables from objects and libraries %.x: %.o octutils.o g++ $(CFLAGS) -o $@ $< $(OBJECTS) $(LIBRARIES) # Make debugging executables from objects and libraries %.dx: %.do g++ $(DCFLAGS) -o $@ $< $(OBJECTS) $(CHANNELLIB) -lchflow-debug -lfftw3 # Make debugging executables from objects and libraries %.px: %.po g++ $(PCFLAGS) -o $@ $< $(OBJECTS) $(CHANNELLIB) -lchflow-profile -lfftw3 clean : rm -f *.o *.x *.do *.dx *.asc *.bf *.ff *~