import platform, os
env = Environment()
env.Append( CPPDEFINES=['_ZPRBUILD'])

#ustawienia kompilatora visual studio 2013 (cl)
if(platform.system() == "Windows"):
    env.Append( CPPDEFINES=['_WINDOWS'])
    env.Append( CPPFLAGS = ' /EHsc /MD /W4 /I C:/boost_1_64_0 ' )
    env.Append( LIBS = ['pdh'] )

elif(platform.system() == "Linux"):
    env.Append( CPPDEFINES=['_LINUX'])
    env.Append( CPPFLAGS = '-pthread -Wall --std=c++11' )
    env.Append( LINKFLAGS = '-pthread -Wall --std=c++11' )
    env.Append( LIBS = ['pthread'] )

else:
    print platform.system() + " not supported"

env.SharedLibrary('ZprMonitor', ['src/ZprMonitor.cpp', 'src/RamDaemon.cpp', 
                                 'src/DaemonInterface.cpp', 'src/CpuDaemon.cpp', 
                                 'src/DiskPathDaemon.cpp', 'src/DaemonObserver.cpp', 
                                 'src/OverrunObserver.cpp', 'src/MeasureTimerThread.cpp',
                                 'src/UnderrunObserver.cpp', 'src/InRangeObserver.cpp',
                                 'src/AverageOverrunObserver.cpp', 'src/AverageUnderrunObserver.cpp' ] )
