Import('env', 'arch', 'common', 'messaging')

if arch != "Darwin":
  libs = [common, messaging, 'pthread']
  panda = env.Library('panda', ['panda.cc', 'spi.cc'])

  env.Program('pandad', ['main.cc', 'pandad.cc', 'panda_safety.cc'], LIBS=[panda] + libs)

  if GetOption('extras'):
    env.Program('tests/test_pandad_canprotocol', ['tests/test_pandad_canprotocol.cc'], LIBS=[panda] + libs)
