#Makefile for printing the meridional flow and the differential #rotation profile #Source http://palantir.swarthmore.edu/maxwell/classes/tutorials/maketutor/ BASE = /home/munoz/Dynamo CC = cc #CFLAGS = -O3 -pedantic -Wall #gcc CFLAGS = -fast -Xa -native #Sun's cc FC = f77 #Flows related macros FFILE = $(BASE)/Flows FOBJ = $(BASE)/Obj/Flows.o #Alpha effect related macros AFILE = $(BASE)/Alpha AOBJ = $(BASE)/Obj/Alpha.o #Initial Conditions related macros IFILE = $(BASE)/InitMF IOBJ = $(BASE)/Obj/InitMF.o #Legendre Polynomial test related macros LFILE = $(BASE)/LgndrTest LOBJ = $(BASE)/Obj/Lgndr_Test.o #FunTools Include folders and libraries #FTINCD = /disk/data/munoz/Funtools/include #Filament and Mithra FTINCD = /disk/data/munoz/FunToolsE/include #Earth, Wind and Fire #FTLIB = /disk/data/munoz/Funtools/lib/libfuntools.a #Filament and Mithra FTLIB = /disk/data/munoz/FunToolsE/lib/libfuntools.a -lsocket -lnsl \ /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.1/libgcc.a #Earth, Wind and Fire #Exp4 Related Macros # The main Exp4 library. #EXP4DIR = /disk/data/munoz/exp4/exp4 #Filament and Mithra EXP4DIR = /disk/data/munoz/Earth/exp4/exp4 #Earth, Wind and Fire EXP4LIB = -L$(EXP4DIR) -lexp4 EXP4LIBA = $(EXP4DIR)/libexp4.a #2D Dynamo related Macros DFILE = $(BASE)/2D_DynamoJac DOBJ = $(BASE)/Obj/2D_Dynamo.o # Set search path for include files. INCPATH = -I$(EXP4DIR) INCLUDES = $(EXP4DIR)/ftypes.h $(EXP4DIR)/fblas.h $(EXP4DIR)/exp4.h #BLASLIB = -L/disk/data/munoz/ATLAS/lib/Lin_Fil/ -llapack -lcblas -lf77blas -latlas #Filament and Mithra BLASLIB = -xlic_lib=sunperf #Earth, Wind and Fire #LAPACKLIB = -L/disk/data/munoz/ATLAS/lib/Lin_Fil/ -llapack #Filament and Mithra LAPACKLIB = -xlic_lib=sunperf #Earth, Wind and Fire #LIBS = $(LAPACKLIB) $(BLASLIB) -lm -lc #Filament and Mithra LIBS = $(BLASLIB) -lm -lc #Earth, Wind and Fire #Other Object Files ODIR = $(BASE)/Obj #_OBJS = FITS_header.o Flows_MF_Surya.o Flows_DR_Radial.o Alpha_Surya.o \ # InitMF_Surya.o Lgndr_As_Pol.o Lgndr_Exp.o PotV_BC.o Lgndr_Jac.o #Filament and Mithra #OBJS = $(patsubst %,$(ODIR)/%,$(_OBJS)) OBJS = $(BASE)/Obj/FITS_header.o $(BASE)/Obj/Flows_MF_Surya.o \ $(BASE)/Obj/Flows_DR_Radial.o $(BASE)/Obj/Alpha_Surya.o \ $(BASE)/Obj/InitMF_Surya.o $(BASE)/Obj/Lgndr_As_Pol.o \ $(BASE)/Obj/Lgndr_Exp.o $(BASE)/Obj/PotV_BC.o $(BASE)/Obj/Lgndr_Jac.o #Earth, Wind and Fire All: Flows Alpha InitMF Dynamo LgndrTest Flows:: $(OBJS) $(FOBJ) @echo "linking Flows..." @$(CC) $(CFLAGS) -lm -o $(FFILE) $(FOBJ) $(OBJS) $(FTLIB) Alpha:: $(OBJS) $(AOBJ) @echo "linking Alpha..." @$(CC) $(CFLAGS) -lm -o $(AFILE) $(AOBJ) $(OBJS) $(FTLIB) InitMF:: $(OBJS) $(IOBJ) @echo "linking InitMF..." @$(CC) $(CFLAGS) -lm -o $(IFILE) $(IOBJ) $(OBJS) $(FTLIB) LgndrTest:: $(OBJS) $(LOBJ) @echo "linking LgndrTest..." @$(CC) $(CFLAGS) -lm -o $(LFILE) $(LOBJ) $(OBJS) $(FTLIB) Dynamo:: $(EXP4LIBA) $(OBJS) $(DOBJ) @echo "linking 2D_Dynamo..." @$(FC) -o $(DFILE) $(DOBJ) $(EXP4LIB) $(LIBS) $(FTLIB) $(OBJS) $(ODIR)/%.o: %.c Gen_Def.h $(INCLUDES) @echo "generating object from the file" $< @$(CC) $(CFLAGS) -c -o $@ $< -I$(FTINCD) $(INCPATH) cleana: clean cleane cleanf clean: @echo "cleaning program files..." @/usr/bin/rm -f $(FFILE) $(FOBJ) $(AFILE) $(AOBJ) $(IFILE) $(IOBJ) \ $(DFILE) $(DOBJ) $(LFILE) $(LOBJ) $(OBJS) cleane: @echo "cleaning emacs temporary files.." @/usr/bin/rm -f *~ cleanf: @echo "cleaning FITS files..." @/usr/bin/rm -f *.fits