Page MenuHomec4science

Makefile
No OneTemporary

File Metadata

Created
Sun, Apr 28, 20:09

Makefile

#
# @file Makefile
#
# @brief Makefile for the fft library
#
# @copyright
# Copyright (©) 2021 EPFL (Ecole Polytechnique Fédérale de Lausanne)
# SPC (Swiss Plasma Center)
#
# SPClibs is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the Free
# Software Foundation, either version 3 of the License, or (at your option)
# any later version.
#
# SPClibs is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
# @authors
# (in alphabetical order)
# @author Trach-Minh Tran <trach-minh.tran@epfl.ch>
#
FFTW=$(FFTW_HOME)
F90 = ifort
LD = ifort
debug = -g -traceback -CB
optim = -O3
OPT=$(debug)
#OPT=$(optim)
F90FLAGS = $(OPT) -Dfft_w3 -I$(FFTW)/include
LDFLAGS = $(OPT) -L. -L$(FFTW)/lib
LIBS = -lfft -lfftw3
.SUFFIXES:
.SUFFIXES: .o .c .F90 .f90 .f
.f90.o:
$(F90) $(F90FLAGS) -c $<
.F90.o:
$(F90) $(F90FLAGS) -c $<
.f.o:
$(F90) $(F90FLAGS) -c $<
all: tfft
lib: libfft.a
libfft.a: fft_fftw.o
xiar r $@ $?
ranlib $@
tfft: tfft.o
$(LD) $(LDFLAGS) -o $@ tfft.o fft_fftw.o $(LIBS)
tfft.o: lib
clean:
rm -f *.o *.mod *~ a.out
distclean: clean
rm -f tfft

Event Timeline