flags.patch 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. diff -Nuar a/SConstruct b/SConstruct
  2. --- a/SConstruct 2017-12-23 13:43:57.000000000 +0300
  3. +++ b/SConstruct 2018-02-24 16:24:14.959394193 +0300
  4. @@ -90,6 +90,29 @@
  5. env = Environment( tools=['default','scanreplace','pyuic','pyuic4','pyuic5','dbus','doxygen','pkgconfig'], toolpath=['admin'], ENV = buildenv, options=opts )
  6. +if os.environ.has_key('CC'):
  7. + env['CC'] = os.environ['CC']
  8. +
  9. +if os.environ.has_key('CXX'):
  10. + env['CXX'] = os.environ['CXX']
  11. +
  12. +# grab OS CFLAGS / CCFLAGS
  13. +if os.environ.has_key('CFLAGS'):
  14. + env['OS_CFLAGS'] = os.environ['CFLAGS']
  15. + env['CFLAGS'] = os.environ['CFLAGS']
  16. +
  17. +if os.environ.has_key('CCFLAGS'):
  18. + env['OS_CCFLAGS'] = os.environ['CCFLAGS']
  19. + env['CCFLAGS'] = os.environ['CCFLAGS']
  20. +
  21. +if os.environ.has_key('CXXFLAGS'):
  22. + env['OS_CCFLAGS'] = os.environ['CXXFLAGS']
  23. + env['CXXFLAGS'] = os.environ['CXXFLAGS']
  24. +
  25. +if os.environ.has_key('CPPFLAGS'):
  26. + env['OS_CPPFLAGS'] = os.environ['CPPFLAGS']
  27. + env['CPPFLAGS'] = os.environ['CPPFLAGS']
  28. +
  29. custom_flags = False
  30. if 'COMPILE_FLAGS' in env and len(env['COMPILE_FLAGS']) > 0: