Differences

This shows you the differences between two versions of the page.

sep:software:environment [2008/07/24 17:49]
altheyab
sep:software:environment [2015/05/27 02:06] (current)
Line 43: Line 43:
===== SEP Compiling rules ===== ===== SEP Compiling rules =====
-To use these you must:+==== To use these you must: ====
-    * 1. setenv SEPINC sepincdir + 
-    * 2. In your makefile put:+  - setenv SEPINC sepincdir 
 +  - In your makefile put: 
 +<code>
      include ${SEPINC}/SEP.top       include ${SEPINC}/SEP.top
 +      ...
      include ${SEPINC}/SEP.bottom       include ${SEPINC}/SEP.bottom
 +</code>
 +    - In between these is where your local compile rules should go.
 +==== To compile a program ====
-    * 3. In between these is where your local compile rules should go.  
-To compile a program+    - Set some general variables 
 +<code> 
 +           BINDIR = /my/bin/dir {if not set, current directory} 
 +           SRCIDR = /my/src/dir {if not set, current directory} 
 +           OBJDIR = /my/obj/dir {my object directory}  
 +</code> 
 +    - Set additional compiler flags 
 +          * ''UCFLAGS'', ''UF77FLAGS'', ''UF90FLAGS'' - additional flags needed to compile a C, F77, or F90 program 
 +          * ''UCLIBDIR'', ''UF77LIBDIR'', ''UF90LIBDIR'' a list of directories where additional libraries can be found 
 +          * ''UCLIBS'', ''UF77LIBS'', ''UF90LIBS'' addition libaries to compile with  
 +    - Setting up the make rules 
 +          * **C code**: if you are compiling a code made up of a single source file, you shouldn't need any additional rules. If the code comes from multiple files .... 
 +Assuming that the main program is my_prog.o and you need the additional sub1, sub2, and sub3 compiled (and linked with the C linker) 
 +<code> 
 +${BINDIR}/my_prog.x: $(addprefix ${OBJDIR}/, sub1.o sub2.o sub3.o) 
 +</code> 
 +Note if your OBJDIR is the local directory you just need to list the object files, the add prefix portion is not necessary.
-    1. Set some general variables +          * **F77 code**: the exact same rules as with C
-          o BINDIR = /my/bin/dir {if not set, current directory} +
-          o SRCIDR = /my/src/dir {if not set, current directory} +
-          o OBJDIR = /my/obj/dir {my object directory}  +
-    2. Set additional compiler flags +
-          o a. UCFLAGS, UF77FLAGS, UF90FLAGS - additional flags needed to compile a C, F77, or F90 program +
-          o b. UCLIBDIR, UF77LIBDIR, UF90LIBDIR a list of directories where additional libraries can be found +
-          o c. UCLIBS, UF77LIBS, UF90LIBS addition libaries to compile with  +
-    3. Setting up the make rules +
-          o a. C code+
-            if you are compiling a code made up of a single source file, you shouldn't need any additional rules. If the code comes from multiple files ....+          * **F90 code**: If your code uses strictly modules and a main program no additional rules are needed. If you use other subroutines follow the above procedure.
-            Assuming that the main program is my_prog.o and you need the additional sub1, sub2, and sub3 compiled (and linked with the C linker)+          * Compiling and linking.
-            ${BINDIR}/my_prog.x: $(addprefix ${OBJDIR}/, sub1.o sub2.o sub3.o)+==== To compile a code ====
-            Note if your OBJDIR is the local directory you just need to list the object files, the add prefix portion is not necessary. 
-          o b. F77 code 
- 
-            the exact same rules as with C 
-          o c. F90 code 
-            If your code uses strictly modules and a main program no additional rules are needed. If you use other subroutines follow the above procedure. 
-          o d. Compiling and linking  
- 
-To compile a code: 
  gmake objdir/code.o     gmake objdir/code.o  
Line 109: Line 111:
===== Converting old SEPlib code ===== ===== Converting old SEPlib code =====
-From Joe: +From Joe:\\ 
-Need to replace "reed(infd, ...)" with "sreed("in", ...)"+Need to replace ''reed(infd, ...)'' with ''sreed("in", ...)''.\\ 
-Need to replace "rite(outfd, ...)" with "srite("out", ...)"+Need to replace ''rite(outfd, ...)'' with ''srite("out", ...)''.\\ 
-Need to replace ";getpar&quot; with &quot;getch&quot;.+Need to replace ''getpar'' with ''getch''.\\ 
 +\\ 
 +''vp_filep(outstream)'';\\ 
 +to the start of any program that calls ''-lvplot''.  
 + 
 + 
 +\\ \\ 
 +{{page&gt;share:footer&amp;nofooter&amp;noeditbtn}}
-vp_filep(outstream); 
-to the start of any program that calls -lvplot.  
/web/html/data/attic/sep/software/environment.1216921789.txt.gz · Last modified: 2015/05/26 22:41 (external edit)
www.chimeric.de Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0