Prev Next add2lib.sh

Adding a Fortran Routine to the f2cad Libraries

Required Software
f2c , autoconf , automake , omhelp , cppad , fadbad , adolc

Example Steps
  1. Convert to lower case and copy the Fortran source code for the routine you are adding to the fortran subdirectory of the distribution directory. For the mysub example, execute the following command in the distribution directory:
         tr 'A-Z' 'a-z' < mysub.f > fortran/mysub.f
  2. In the f2cad distribution directory, execute the command
         ./add2lib.sh 
    name
    where name is the name of the Fortran routine. For the mysub example, execute the following command
         ./add2lib.sh mysub
  3. In the f2cad distribution directory, execute the command
         ./add2lib.sh use_new_files
    This command will copy the *.new files to the corresponding files (but first it will back up the corresponding files in *.old ). If name is not mysub, the initial version of
         example/
    name.cpp
    will return test_none. You can edit this file to create a real test and example of name .
  4. In the file build.sh, make sure that F2C_DIR, ADOLC_DIR, and FADBAD_DIR have the proper values for your system. Then execute the command
     
    	./build.sh all
    
  5. You can undo the effect of the add2lib.sh commands above by executing
     
    	./add2lib.sh use_old_files
    

Input File: add2lib.sh