# # Creation : "2013-01-26 18:38:18 (andrzejbaran)" # Time-stamp: "2017-02-18 22:21:04 (andrzejbaran)" # # Makefile opisuje działania, które wykonujemy cyklicznie w procesie # kompilacji programów. Zawiera zależności między plikami i pozwala # uprościć proces kompilacji. # Polecenie "make" wykonane w folderze gdzie znajduje się plik 'makefile' # uruchamia cały proces kompilacji opisany w 'makefile' (lub Makefile). # Przykładowy 'makefile' dla kompilacji programu 'test_gs_sor' # znajduje się w pliku makefile. ######################################################################### # Executable to be built within the package PROGRAMS = slineq test_gs_sor # compiler FC = gfortran # libraries path LIBPATH = ./libraries # debuging FCFLAGS = -fdefault-real-8 -O2 # libraries needed for linking, unused in the examples ######################################################################### # linking LDFLAGS = -L$(LIBPATH) -llapack -lrefblas -ltmglib ######################################################################### # "make" builds all all: $(PROGRAMS) # dependencies #prog.o:mod.o test_gs_sor : gs_sor.o # ====================================================================== # The general rules, these should not require modification # General rule for building prog from prog.o; $^ (GNU extension) is # used in order to list additional object files on which the # executable depends %: %.o $(FC) $(FCFLAGS) -o $@ $^ $(LDFLAGS) # ====================================================================== # General rules for building prog.o from prog.f90 or prog.F90; $< is # used in order to list only the first prerequisite (the source file) # and not the additional prerequisites such as module or include files %.o: %.f90 $(FC) $(FCFLAGS) -c $< %.o: %.F90 $(FC) $(FCFLAGS) -c $< %.o: %.f $(FC) $(FCFLAGS) -c $< %.o: %.F $(FC) $(FCFLAGS) -c $< ######################################################################### # Utility targets .PHONY: clean veryclean clean: rm -f *.o *.mod *.MOD #*.dvi *.log *.bbl *.blg *.aux veryclean: clean rm -f *~ $(PROGRAMS)