--- MITgcm/tools/genmake2 2004/07/30 14:31:40 1.91 +++ MITgcm/tools/genmake2 2004/08/09 02:28:51 1.96 @@ -1,6 +1,6 @@ #! /usr/bin/env bash # -# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/tools/genmake2,v 1.91 2004/07/30 14:31:40 edhill Exp $ +# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/tools/genmake2,v 1.96 2004/08/09 02:28:51 edhill Exp $ # # Makefile generator for MITgcm UV codes # created by cnh 03/98 @@ -520,8 +520,8 @@ Include MPI header files and link to MPI libraries -mpi=PATH | --mpi=PATH Include MPI header files and link to MPI libraries using MPI_ROOT - set to PATH. i.e. Include files from $PATH/include, link to libraries - from $PATH/lib and use binaries from $PATH/bin. + set to PATH. i.e. Include files from \$PATH/include, link to libraries + from \$PATH/lib and use binaries from \$PATH/bin. -bash NAME Explicitly specify the Bourne or BASH shell to use @@ -689,9 +689,12 @@ IF (iret .NE. NF_NOERR) write(*,*) NF_STRERROR(iret) end EOF - #echo "$CPP $DEFINES $INCLUDES" + #echo "$CPP $DEFINES $INCLUDES genmake_tnc.for > genmake_tnc.f" + #echo "$FC $FFLAGS $FOPTIM -c genmake_tnc.f" + #echo "$LINK -o genmake_tnc.o $LIBS" $CPP $DEFINES $INCLUDES genmake_tnc.for > genmake_tnc.f 2>/dev/null \ - && $FC $FFLAGS $FOPTIM -o genmake_tnc genmake_tnc.f $LIBS >> genmake_tnc.log 2>&1 + && $FC $FFLAGS $FOPTIM -c genmake_tnc.f \ + && $LINK -o genmake_tnc genmake_tnc.o $LIBS >> genmake_tnc.log 2>&1 RET_COMPILE=$? test -x ./genmake_tnc && ./genmake_tnc >> genmake_tnc.log 2>&1 RETVAL=$? @@ -729,7 +732,7 @@ S64= KPP= FC= -CC= +#CC=gcc CPP= LINK= DEFINES= @@ -1138,14 +1141,14 @@ exit 1 fi if test "x$CC" = x ; then - cat <&2 - -Error: no C compiler: please specify using one of the following: - 1) within the options file ("CC=...") as specified by "-of=OPTFILE" - 2) the "-cc=XXX" command-line option - 3) the "./genmake_local" file -EOF - exit 1 + CC=cc +# cat <&2 +# Error: no C compiler: please specify using one of the following: +# 1) within the options file ("CC=...") as specified by "-of=OPTFILE" +# 2) the "-cc=XXX" command-line option +# 3) the "./genmake_local" file +# EOF +# exit 1 fi if test "x$LINK" = x ; then LINK=$FC @@ -1853,6 +1856,8 @@ FC = ${FC} # Fortran compiler F90C = ${F90C} +# C compiler +CC = ${CC} # Link editor LINK = ${LINK} ${LDADD}