Error during compiling a custom makefile
Posted: Mon Nov 25, 2013 10:54 am
Hi all,
I'm new of Bader. I'm trying to compile a 32bit version of the bader executable on my Ubuntu Precise Pangolin 32 bit. (gfortran --version
GNU Fortran (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3)
I used the following makefile
************************************
.SUFFIXES: .f90
FC = gfortran
FFLAGS = -O2
LINK =
OBJS = kind_mod.o \
matrix_mod.o \
ions_mod.o \
options_mod.o \
charge_mod.o \
chgcar_mod.o \
cube_mod.o \
io_mod.o \
bader_mod.o \
voronoi_mod.o \
multipole_mod.o
%.o %.mod : %.f90
$(FC) $(FFLAGS) -c $*.f90
bader: $(OBJS) main.o
rm -f bader
$(FC) $(LINK) main.o -o $@ $(OBJS)
dist: bader
tar -cf bader_lnx_32.tar bader
gzip -9 bader_lnx_32.tar
clean:
rm -f *.o *.mod bader bader_lnx_32.tar.gz
**********************************
I obtained a executable file that I tested with "$ sh bader -h", but I got the following message error
*****************
bader: 1: bader: Syntax error: word unexpected (expecting ")")
*****************
Can someone help me?
I'm new of Bader. I'm trying to compile a 32bit version of the bader executable on my Ubuntu Precise Pangolin 32 bit. (gfortran --version
GNU Fortran (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3)
I used the following makefile
************************************
.SUFFIXES: .f90
FC = gfortran
FFLAGS = -O2
LINK =
OBJS = kind_mod.o \
matrix_mod.o \
ions_mod.o \
options_mod.o \
charge_mod.o \
chgcar_mod.o \
cube_mod.o \
io_mod.o \
bader_mod.o \
voronoi_mod.o \
multipole_mod.o
%.o %.mod : %.f90
$(FC) $(FFLAGS) -c $*.f90
bader: $(OBJS) main.o
rm -f bader
$(FC) $(LINK) main.o -o $@ $(OBJS)
dist: bader
tar -cf bader_lnx_32.tar bader
gzip -9 bader_lnx_32.tar
clean:
rm -f *.o *.mod bader bader_lnx_32.tar.gz
**********************************
I obtained a executable file that I tested with "$ sh bader -h", but I got the following message error
*****************
bader: 1: bader: Syntax error: word unexpected (expecting ")")
*****************
Can someone help me?