Page MenuHomec4science

Makefile
No OneTemporary

File Metadata

Created
Sun, Feb 23, 13:56

Makefile

.DEFAULT_GOAL := all
ifeq ($(PLATFORM),)
$(error Please specify the env variable PLATFORM (mac, intel))
else
$(info *** Using $(PLATFORM).mk ***)
include $(PLATFORM).mk
endif
include .depend
PROG = nonlinear
SRCS = main.f90 basic_mod.f90 initial.f90 stepon.f90 constants.f90 fields_mod.f90 beam_mod.f90 diagnose.f90
MKDIR_P = mkdir -p
OUT_DIR =
F90FLAGS += -I$(FUTILS)/include -I$(FFTW)/include
CCFLAGS += -O3
LDFLAGS += -L$(FUTILS)/lib -L${HDF5}/lib -L${FFTW}/lib64
LIBS += -lfutils -lhdf5_fortran -lhdf5 -lfftw3
OBJS =${SRCS_F:.f=.o} ${SRCS:.f90=.o} ${SRCS_F90:.F90=.o} ${SRCS_C:.c=.o}
FPP =${SRCS:.f90=.i90}
debug: F90FLAGS += $(DEBUGFLAGS)
debug: all
profile: F90FLAGS+=$(PROFILEFLAGS)
profile: LDFLAGS+= $(PROFILEFLAGS)
profile: all
$(info *** Using $(OBJS) ***)
.PHONY: directories clean debug profile
all: directories $(PROG)
$(PROG): $(OBJS)
$(F90) $(LDFLAGS) $(F90FLAGS) -o $@ $(OBJS) $(LIBS)
tags:
etags *.f90
clean:
rm -f $(OBJS) $(FPP) *.mod *.optrpt *.d *_genmod*
distclean: clean
rm -f $(PROG) *~ a.out *.o TAGS
directories: ${OUT_DIR}
${OUT_DIR}:
${MKDIR_P} ${OUT_DIR}
.SUFFIXES: $(SUFFIXES) .f .f90 .c
%.o: %.f
$(F90) $(F90FLAGS) -MD -c -o $@ $<
%.o: %.f90
$(F90) $(F90FLAGS) -MD -c -o $@ $<
%.o: %.c
$(CC) $(CCFLAGS) -c -o $@ $<
depend .depend .depend_rel .depend_deb :
makedepf90 ../dependencies/**/*.[fF]90 *.[fF]90 *.c > .depend

Event Timeline