/* Recipes for building WEPS with Unix f95 compiler */ /* Must precede other "compile" recipes - cook sees them in the order they exist */ /* FC MODULE "compile" recipe (for .for files) */ %0%.mod: { /* determine the src file for the module */ module_src_files = [shell grep -i -l '"^[ ]*MODULE"' [src_files] ]; /* function print "module_src_files: " [module_src_files]; */ tmp_files = [module_src_files]; loop { t_file = [head [tmp_files]]; if [not [t_file]] then loopstop; tmp_files = [tail [tmp_files]]; if [match_mask % [basename [entryname [t_file]]]] then { t_dir = [dirname [t_file]]; [FC] -I[t_dir] -I%0. [FC_IFLAGS] [FC_FLAGS] -c [t_file] -o [t_dir]/%[O]; loopstop; } } } /* FC "compile" recipe (for .for files) */ %0%[O]: %0%[F] { [FC] -I%0. [FC_IFLAGS] [FC_FLAGS] -c %0%[F] -o [target]; } /* FC "compile" recipe (for .f95 files) */ %0%[O]: %0%[F1] { [FC] -I%0. [FC_IFLAGS] [FC_FLAGS] -c %0%[F1] -o [target]; } /* FC "library build" recipe */ %0[LIB_PREFIX]%[A]: [[target]_obj] set unlink { [AR] [AR_FLAGS] [target] [[target]_obj]; } /* FC "link" recipe */ [TARGET_BIN]/%: [[target]_obj] set mkdir { /* echo "target_obj is: " [[target]_obj]; */ [LD] [LD_IFLAGS] [LD_FLAGS] [[target]_obj] -o [target]; } /* FC "link" recipe */ %: [ [downcase [target]]_obj] set mkdir { /* echo "target_obj is: " [[target]_obj]; */ [LD] [LD_IFLAGS] [LD_FLAGS] [[target]_obj] -o [downcase [target]]; }