#! /bin/bash

#compiler=your-compiler-path
compiler=/usr/bin/g++

#path_to_qc_include=your-path/QC/include
path_to_qc_include=/scratch/local2/qc20110119/QC/include

#path_to_netCDF_include=your-netcdf-include-path
path_to_netCDF_include=/scratch/local2/netcdflib/netcdf-3.6.3/include

#path_to_netCDF_lib=your-netcdf-lib-path
path_to_netCDF_lib=/scratch/local2/netcdflib/netcdf-3.6.3/lib

#${compiler} -static $* -DNC3
# writing in all cases all errors:  -DRAISE_ERRORS 
${compiler} -static $* -o ../bin/qC.x qC_main.cpp -DNC3 -I $path_to_qc_include -I $path_to_netCDF_include  -L $path_to_netCDF_lib -lnetcdf_c++  -lnetcdf 

# getStatus.cpp
${compiler} -static $* -o ../bin/getStatus.x getStatus.cpp -DNC3 \
-I $path_to_qc_include -I $path_to_netCDF_include \
-L $path_to_netCDF_lib -lnetcdf_c++  -lnetcdf 

# syncFiles.cpp
${compiler} -static $* -o ../bin/syncFiles.x syncFiles.cpp -DNC3 \
 -I $path_to_qc_include -I $path_to_netCDF_include \
 -L $path_to_netCDF_lib -lnetcdf_c++  -lnetcdf 

# testValidNC.cpp
${compiler} -static $* -o ../bin/testValidNC.x testValidNC.cpp -DNC3 \
-I $path_to_qc_include -I $path_to_netCDF_include \
-L $path_to_netCDF_lib -lnetcdf_c++  -lnetcdf 

# testParentChild.cpp
${compiler} -static $* -o ../bin/testParentChild.x testParentChild.cpp -DNC3 \
-I $path_to_qc_include -I $path_to_netCDF_include \
-L $path_to_netCDF_lib -lnetcdf_c++  -lnetcdf 

# getNC_att.cpp
${compiler} -static $* -o ../bin/getNC_att.x getNC_att.cpp -DNC3 \
-I $path_to_qc_include -I $path_to_netCDF_include \
-L $path_to_netCDF_lib -lnetcdf_c++  -lnetcdf 

# unixTime.c
${compiler} -static $* -o ../bin/unixTime.x -DNC3 unixTime.c -I $path_to_qc_include -I $path_to_netCDF_include

# fModTime.c
${compiler} -static $* -o ../bin/fModTime.x -DNC3 fModTime.c -I $path_to_qc_include -I $path_to_netCDF_include

# diskUsage.c
${compiler} -static $* -o ../bin/diskUsage.x -DNC3 diskUsage.c -I $path_to_qc_include -I $path_to_netCDF_include



