mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-03-25 17:40:27 +08:00
o Modified configure/utility scripts.
o include/nctime.h: o Modified how the following functions are specified external when building a DLL: * cdRel2Iso * cdChar2Comp * Cdh2e * Cde2h * cdParseRelunits
This commit is contained in:
parent
aaf6507c6b
commit
ff81029eeb
@ -1,4 +1,3 @@
|
||||
|
||||
######
|
||||
# Custom build script.
|
||||
#
|
||||
@ -11,11 +10,9 @@
|
||||
from optparse import OptionParser
|
||||
import os
|
||||
|
||||
|
||||
#global C_FLAGS, LD_FLAGS, STD_ARGS
|
||||
C_FLAGS="CFLAGS=\""
|
||||
LD_FLAGS="LDFLAGS=\""
|
||||
STD_ARGS="--disable-doxygen --enable-diskless "
|
||||
STD_ARGS="--disable-doxygen "
|
||||
|
||||
### Parse the options which were passed to the program.
|
||||
def parse_options(ops):
|
||||
@ -26,31 +23,42 @@ def parse_options(ops):
|
||||
cur_args += "--host=x86_64-w64-mingw32 "
|
||||
|
||||
if ops.BUILD_MIN == True:
|
||||
cur_args += "--disable-dap --disable-netcdf-4 --disable-diskless"
|
||||
cur_args += "--disable-dap --disable-netcdf-4 --disable-diskless "
|
||||
|
||||
if ops.BUILD_DEBUG == True:
|
||||
cur_c_flags = cur_c_flags + "-ggdb -O0 "
|
||||
cur_ld_flags = cur_ld_flags + "-ggdb -O0 "
|
||||
|
||||
if ops.BUILD_STATIC == True:
|
||||
cur_args += "--enable-static "
|
||||
cur_args += "--enable-static "
|
||||
|
||||
if ops.BUILD_32 == True:
|
||||
cur_c_flags += "-I/c/Users/wfisher/Desktop/hdf5-1.8.8/src -I/c/Users/wfisher/Desktop/hdf-1.8.8/hl/src "
|
||||
cur_ld_flags += "-static -L/c/GnuWin32/lib/libz.a -L/c/Users/wfisher/Desktop/hdf5-1.8.8/build_win/bin "
|
||||
else:
|
||||
cur_c_flags += "-I/c/HDF5189/include "
|
||||
cur_ld_flags += "-static -L/c/HDF5189/bin "
|
||||
else:
|
||||
cur_args += "--disable-static "
|
||||
|
||||
if ops.BUILD_SHARED == True:
|
||||
cur_args += "--enable-shared "
|
||||
cur_args += "--enable-shared --disable-utilities "
|
||||
|
||||
if os.name == 'nt':
|
||||
cur_args += "--enable-dll "
|
||||
|
||||
if ops.BUILD_32 == True:
|
||||
cur_c_flags += "-I/c/Users/wfisher/Desktop/hdf5-1.8.8/src -I/c/Users/wfisher/Desktop/hdf-1.8.8/hl/src "
|
||||
cur_ld_flags += "-L/c/GnuWin32/lib/libz.a -L/c/Users/wfisher/Desktop/hdf5-1.8.8/build_win/bin "
|
||||
else:
|
||||
cur_c_flags += "-I/c/HDF5189/include "
|
||||
cur_ld_flags += "-L/c/HDF5189/bin "
|
||||
else:
|
||||
cur_args += "--disable-shared "
|
||||
|
||||
|
||||
return "bash ./configure " + cur_args + " " + cur_c_flags + "\" " + cur_ld_flags + "\""
|
||||
|
||||
return "sh ./configure " + cur_args + " " + cur_c_flags + "\" " + cur_ld_flags + "\""
|
||||
|
||||
###
|
||||
# Main Function.
|
||||
|
@ -133,9 +133,27 @@ typedef struct timeinfo_t {
|
||||
cdCompTime origin;
|
||||
} timeinfo_t;
|
||||
|
||||
|
||||
|
||||
#if defined(DLL_NETCDF) /* Defined when library is a DLL */
|
||||
# if defined(DLL_EXPORT) /* define when building the library. */
|
||||
# define MSC_NCTIME_EXTRA __declspec(dllexport)
|
||||
# else
|
||||
# define MSC_NCTIME_EXTRA __declspec(dllimport)
|
||||
# endif
|
||||
|
||||
MSC_NCTIME_EXTRA extern void cdRel2Iso(cdCalenType timetype, char* relunits, int separator, double reltime, char* chartime);
|
||||
MSC_NCTIME_EXTRA extern void cdChar2Comp(cdCalenType timetype, char* chartime, cdCompTime* comptime);
|
||||
MSC_NCTIME_EXTRA extern void Cdh2e(CdTime *htime, double *etime);
|
||||
MSC_NCTIME_EXTRA extern void Cde2h(double etime, CdTimeType timeType, long baseYear, CdTime *htime);
|
||||
MSC_NCTIME_EXTRA extern int cdParseRelunits(cdCalenType timetype, char* relunits, cdUnitTime* unit, cdCompTime* base_comptime);
|
||||
#else
|
||||
extern void cdRel2Iso(cdCalenType timetype, char* relunits, int separator, double reltime, char* chartime);
|
||||
extern void cdChar2Comp(cdCalenType timetype, char* chartime, cdCompTime* comptime);
|
||||
extern void Cdh2e(CdTime *htime, double *etime);
|
||||
extern void Cde2h(double etime, CdTimeType timeType, long baseYear, CdTime *htime);
|
||||
extern int cdParseRelunits(cdCalenType timetype, char* relunits, cdUnitTime* unit, cdCompTime* base_comptime);
|
||||
#endif /* DLL Considerations. */
|
||||
|
||||
|
||||
|
||||
|
5
my_shared_min_32_configure.sh
Normal file
5
my_shared_min_32_configure.sh
Normal file
@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
set -x
|
||||
./configure --disable-dap --disable-doxygen --enable-shared --disable-static --enable-dll --disable-netcdf-4 CFLAGS="-ggdb -O0" LDFLAGS=""
|
||||
|
||||
#./configure --disable-dap --disable-doxygen --enable-shared --disable-static --enable-dll --disable-netcdf-4 --disable-utilities --host=x86_64-w64-mingw32 CFLAGS="-ggdb -O0" LDFLAGS="-ggdb -O0"
|
@ -1,3 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -x
|
||||
./configure --disable-dap --disable-doxygen --enable-shared --enable-static --enable-dll --disable-netcdf-4 --disable-utilities --host=x86_64-w64-mingw32 CFLAGS="-ggdb -O0" LDFLAGS="-ggdb -O0"
|
@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
set -x
|
||||
./configure --disable-dap --disable-doxygen --enable-shared --enable-static --enable-dll --enable-netcdf-4 --disable-utilities --host=x86_64-w64-mingw32 CFLAGS="-ggdb -O0 -I/c/HDF5189/include" LDFLAGS="-ggdb -O0 -L/c/HDF5189/bin -L/c/HDF5189/lib"
|
||||
./configure --disable-dap --disable-doxygen --enable-shared --disable-static --enable-dll --enable-netcdf-4 --disable-utilities --host=x86_64-w64-mingw32 CFLAGS="-ggdb -O0 -I/c/HDF5189/include" LDFLAGS="-ggdb -O0 -L/c/HDF5189/bin -L/c/HDF5189/lib"
|
||||
|
||||
#./configure --disable-dap --disable-doxygen --enable-shared --disable-static --enable-dll --enable-netcdf-4 --disable-utilities --host=x86_64-w64-mingw32 CFLAGS="-ggdb -O0 -I/c/HDF5189/include" LDFLAGS="-ggdb -O0 -L/home/wfisher/mypath/x86_64-w64-mingw32/lib -L/home/wfisher/zlib-1.2.5 -L/c/Users/wfisher/Desktop/szip-2.1/build_win64/bin -L/c/HDF5189/bin"
|
6
my_static_hdf5_32_configure.sh
Normal file
6
my_static_hdf5_32_configure.sh
Normal file
@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
set -x
|
||||
./configure --enable-static --disable-doxygen --disable-shared --disable-dap --enable-netcdf-4 --enable-diskless CFLAGS="-ggdb -O0 -I/c/Users/wfisher/Desktop/hdf5-1.8.8/src -I/c/Users/wfisher/Desktop/hdf5-1.8.8/hl/src -I/c/Users/wfisher/Desktop/netcdf-4.2/include/ -I/c/Users/wfisher/Desktop/curl-7.25.0/include/" LDFLAGS="-static -ggdb -O0 -L/c/Users/wfisher/Desktop/hdf5-1.8.8/build_win/bin"
|
||||
|
||||
#./configure --enable-static --disable-doxygen --disable-shared --disable-dap --enable-netcdf-4 --enable-diskless CFLAGS="-ggdb -O0 -I/c/Users/wfisher/Desktop/hdf5-1.8.8/src -I/c/Users/wfisher/Desktop/hdf5-1.8.8/hl/src -I/c/Users/wfisher/Desktop/netcdf-4.2/include/ -I/c/Users/wfisher/Desktop/curl-7.25.0/include/" LDFLAGS="-static -ggdb -O0 -L/c/Users/wfisher/Desktop/curl-7.25.0/lib/.libs -L/c/GnuWin32/lib/libz.a -L/c/Users/wfisher/Desktop/hdf5-1.8.8/build_win/bin"
|
||||
|
6
my_static_hdf5_64_configure.sh
Normal file
6
my_static_hdf5_64_configure.sh
Normal file
@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
set -x
|
||||
./configure --enable-static --disable-doxygen --disable-shared --disable-dap --enable-netcdf-4 --enable-diskless --host=x86_64-w64-mingw32 CFLAGS="-ggdb -O0 -I/c/HDF5189/include" LDFLAGS="-ggdb -O0 -L/c/HDF5189/bin -L/c/HDF5189/lib"
|
||||
|
||||
|
||||
|
@ -1,4 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -x
|
||||
./configure --enable-static --disable-doxygen --disable-shared --disable-dap --enable-netcdf-4 --enable-diskless CFLAGS="-ggdb -O0 -I/c/Users/wfisher/Desktop/hdf5-1.8.8/src -I/c/Users/wfisher/Desktop/hdf5-1.8.8/hl/src -I/c/Users/wfisher/Desktop/netcdf-4.2/include/ -I/c/Users/wfisher/Desktop/curl-7.25.0/include/" LDFLAGS="-static -ggdb -O0 -L/c/Users/wfisher/Desktop/curl-7.25.0/lib/.libs -L/c/GnuWin32/lib/libz.a -L/c/Users/wfisher/Desktop/hdf5-1.8.8/build_win/bin"
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
set -x
|
||||
./configure --disable-doxygen --disable-shared --enable-dap --enable-netcdf-4 --enable-diskless CFLAGS="-ggdb -O0 -I/c/Users/wfisher/Desktop/hdf5-1.8.8/src -I/c/Users/wfisher/Desktop/hdf5-1.8.8/hl/src -I/c/Users/wfisher/Desktop/curl-7.25.0/include/ -DCURL_STATICLIB" LDFLAGS="-ggdb -O0 -L/c/MinGW/lib/libmsvcrt.a -L/c/MinGW/lib/libmsvcr90.a -L/c/Users/wfisher/Desktop/curl-7.25.0/lib/.libs -L/c/GnuWin32/lib/libz.a -L/c/Users/wfisher/Desktop/hdf5-1.8.8/build_win/bin"
|
||||
./configure --disable-doxygen --disable-shared --enable-dap --enable-netcdf-4 --enable-diskless CFLAGS="-ggdb -O0 -I/c/Users/wfisher/Desktop/hdf5-1.8.8/src -I/c/Users/wfisher/Desktop/hdf5-1.8.8/hl/src -I/c/Users/wfisher/Desktop/curl-7.25.0/include/ -DCURL_STATICLIB" LDFLAGS="-ggdb -O0 -L/c/Users/wfisher/Desktop/curl-7.25.0/lib/.libs -L/c/Users/wfisher/Desktop/hdf5-1.8.8/build_win/bin"
|
||||
|
||||
#-L/c/Users/wfisher/Desktop/curl-7.25.0/lib/.libs/libcurl.a"
|
3
my_static_min_64_configure.sh
Normal file
3
my_static_min_64_configure.sh
Normal file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
set -x
|
||||
./configure --enable-static --disable-dap --disable-doxygen --disable-shared --disable-netcdf-4 --host=x86_64-w64-mingw32 CFLAGS="-ggdb -static -O0" LDFLAGS="-static -ggdb -O0"
|
Loading…
x
Reference in New Issue
Block a user