158 |
} |
} |
159 |
|
|
160 |
|
|
161 |
# Guess possible config options for this host |
look_for_makedepend() { |
|
find_possible_configs() { |
|
|
|
|
|
tmp1=`uname`"_"`uname -m` |
|
|
tmp2=`echo $tmp1 | sed -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` |
|
|
tmp3=`echo $tmp2 | sed -e 's/power macintosh/ppc/'` |
|
|
tmp1=`echo $tmp3 | sed -e 's|x86_64|amd64|'` |
|
|
tmp2=`echo $tmp1 | sed -e 's/i[3-6]86/ia32/' | sed -e 's/athlon/ia32/'` |
|
|
tmp3=`echo $tmp2 | sed -e 's/cray sv1/craysv1/'` |
|
|
PLATFORM=$tmp3 |
|
|
echo $PLATFORM | grep cygwin > /dev/null 2>&1 && PLATFORM=cygwin_ia32 |
|
|
OFLIST=`(cd $ROOTDIR/tools/build_options; ls | grep "^$PLATFORM")` |
|
|
echo " The platform appears to be: $PLATFORM" |
|
|
|
|
|
echo "test" > test |
|
|
ln -s ./test link |
|
|
RETVAL=$? |
|
|
if test "x${RETVAL}" = x0 ; then |
|
|
LN="ln -s" |
|
|
else |
|
|
echo "Error: \"ln -s\" does not appear to work on this system!" |
|
|
echo " For help, please contact <MITgcm-support@mitgcm.org>." |
|
|
exit 1 |
|
|
fi |
|
|
rm -f test link |
|
|
|
|
|
if test "x$CPP" = x ; then |
|
|
CPP="cpp -traditional -P" |
|
|
fi |
|
162 |
|
|
163 |
# The "original" makedepend is part of the Imake system that is |
# The "original" makedepend is part of the Imake system that is |
164 |
# most often distributed with XFree86 or with an XFree86 source |
# most often distributed with XFree86 or with an XFree86 source |
214 |
rm -f ./genmake_cy_md |
rm -f ./genmake_cy_md |
215 |
fi |
fi |
216 |
fi |
fi |
217 |
|
} |
218 |
|
|
219 |
|
|
220 |
|
# Guess possible config options for this host |
221 |
|
find_possible_configs() { |
222 |
|
|
223 |
|
tmp1=`uname`"_"`uname -m` |
224 |
|
tmp2=`echo $tmp1 | sed -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` |
225 |
|
tmp3=`echo $tmp2 | sed -e 's/power macintosh/ppc/'` |
226 |
|
tmp1=`echo $tmp3 | sed -e 's|x86_64|amd64|'` |
227 |
|
tmp2=`echo $tmp1 | sed -e 's/i[3-6]86/ia32/' | sed -e 's/athlon/ia32/'` |
228 |
|
tmp3=`echo $tmp2 | sed -e 's/cray sv1/craysv1/'` |
229 |
|
PLATFORM=$tmp3 |
230 |
|
echo $PLATFORM | grep cygwin > /dev/null 2>&1 && PLATFORM=cygwin_ia32 |
231 |
|
OFLIST=`(cd $ROOTDIR/tools/build_options; ls | grep "^$PLATFORM")` |
232 |
|
echo " The platform appears to be: $PLATFORM" |
233 |
|
|
234 |
|
echo "test" > test |
235 |
|
ln -s ./test link |
236 |
|
RETVAL=$? |
237 |
|
if test "x${RETVAL}" = x0 ; then |
238 |
|
LN="ln -s" |
239 |
|
else |
240 |
|
echo "Error: \"ln -s\" does not appear to work on this system!" |
241 |
|
echo " For help, please contact <MITgcm-support@mitgcm.org>." |
242 |
|
exit 1 |
243 |
|
fi |
244 |
|
rm -f test link |
245 |
|
|
246 |
|
if test "x$CPP" = x ; then |
247 |
|
CPP="cpp -traditional -P" |
248 |
|
fi |
249 |
|
|
250 |
|
look_for_makedepend |
251 |
|
|
252 |
# look for possible fortran compilers |
# look for possible fortran compilers |
253 |
tmp="$MITGCM_FC $FC efc g77 f77 pgf77 pgf95 ifc f90 f95 mpif77 mpf77 mpxlf95" |
tmp="$MITGCM_FC $FC efc g77 f77 pgf77 pgf95 ifc f90 f95 mpif77 mpf77 mpxlf95" |
1091 |
else |
else |
1092 |
rm -f test_cpp |
rm -f test_cpp |
1093 |
fi |
fi |
1094 |
if test "x$MAKEDEPEND" = x ; then |
look_for_makedepend |
|
MAKEDEPEND=makedepend |
|
|
fi |
|
1095 |
if test "x$LN" = x ; then |
if test "x$LN" = x ; then |
1096 |
LN="ln -s" |
LN="ln -s" |
1097 |
fi |
fi |
1801 |
echo 'OBJFILES = $(SRCFILES:.F=.o) $(CSRCFILES:.c=.o) $(F90SRCFILES:.F90=.o)' >> $MAKEFILE |
echo 'OBJFILES = $(SRCFILES:.F=.o) $(CSRCFILES:.c=.o) $(F90SRCFILES:.F90=.o)' >> $MAKEFILE |
1802 |
echo >> $MAKEFILE |
echo >> $MAKEFILE |
1803 |
echo '.SUFFIXES:' >> $MAKEFILE |
echo '.SUFFIXES:' >> $MAKEFILE |
1804 |
echo '.SUFFIXES: .o .F .p .'$FS' .c .F90 .'$FS90 >> $MAKEFILE |
echo '.SUFFIXES: .o .'$FS' .p .F .c .'$FS90' .F90' >> $MAKEFILE |
1805 |
rm -f srclist.inc csrclist.inc hlist.inc flist.tmp clist.tmp f90srclist.inc |
rm -f srclist.inc csrclist.inc hlist.inc flist.tmp clist.tmp f90srclist.inc |
1806 |
rm -f ad_flow_files.inc |
rm -f ad_flow_files.inc |
1807 |
|
|