wscript 486 B

12345678910111213141516171819202122232425262728293031323334
  1. #!/usr/bin/env python
  2. # encoding: utf-8
  3. def configure(ctx):
  4. ctx.load("compiler_c compiler_cxx")
  5. def build(bld):
  6. bld(
  7. features="cxx",
  8. source="liba/a.c",
  9. export_includes="liba",
  10. target="a",
  11. )
  12. bld(
  13. features="cxx",
  14. source="libb/b.cpp",
  15. export_includes="libb",
  16. target="b",
  17. use="a"
  18. )
  19. bld.program(
  20. features="cxx",
  21. source="main.c",
  22. target="program",
  23. use="b",
  24. )
  25. def options(opt):
  26. opt.load("compiler_c compiler_cxx")
  27. def hello(ctx):
  28. print("Hello World!")