Changeset 8701


Ignore:
Timestamp:
Feb 15, 2013, 3:24:59 PM (12 years ago)
Author:
steve
Message:

Still working on netcsf lib and include files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/anuga_core/source/anuga/utilities/compile.py

    r8700 r8701  
    1111"""     
    1212
     13
     14
     15import os, string, sys
     16
     17NETCDF_LIB_DIR = os.getenv('NETCDF_LIB_DIR', '')
     18NETCDF_INCLUDE_DIR = os.getenv('NETCDF_INCLUDE_DIR', '')
     19
     20#print 'NETCDF_LIB_DIR: ',NETCDF_LIB_DIR
     21#print 'NETCDF_INCLUDE_DIR: ',NETCDF_INCLUDE_DIR
     22
     23I_dirs = ''
     24if NETCDF_INCLUDE_DIR != '' :
     25    I_dirs = '-I"%s" ' % NETCDF_INCLUDE_DIR
     26
     27netcdf_lib_dirs = ''
     28if NETCDF_LIB_DIR != '' :
     29    netcdf_lib_dirs = '-L"%s" ' % NETCDF_LIB_DIR
     30
    1331#NumPy ------------------------------------
    1432# Something like these lines recommended in "Converting from NUMARRAY to NUMPY"
    1533import numpy
    16 I_dirs = '-I"%s" ' % numpy.get_include()
     34I_dirs = I_dirs + '-I"%s" ' % numpy.get_include()
    1735#NumPy ------------------------------------
    1836
     
    2038# it has only really been used with gcc.
    2139
    22 import os, string, sys
    23 
    24 NETCDF_LIB_DIR = os.getenv('NETCDF_LIB_DIR', '')
    25 NETCDF_INCLUDE_DIR = os.getenv('NETCDF_INCLUDE_DIR', '')
    26 
    27 print 'NETCDF_LIB_DIR ',NETCDF_LIB_DIR
    28 print 'NETCDF_INCLUDE_DIR ',NETCDF_INCLUDE_DIR
    2940
    3041separation_line = '---------------------------------------'     
     
    305316      raise Exception('Could not compile %s - please try manually' %FN)
    306317
    307  
     318
     319
     320  libs = libs + netcdf_lib_dirs
     321
    308322  # Make shared library (*.so or *.dll)
    309323  if FN=="fitsmooth.c":
     324    libs = libs + netcdf_lib_dirs
    310325    if sys.platform == 'win32':   
    311326      if libs is "":
Note: See TracChangeset for help on using the changeset viewer.