SConstruct 944 B

123456789101112131415161718192021222324252627282930
  1. #!/usr/bin/env python
  2. env = SConscript("../SConstruct")
  3. # For the reference:
  4. # - CCFLAGS are compilation flags shared between C and C++
  5. # - CFLAGS are for C-specific compilation flags
  6. # - CXXFLAGS are for C++-specific compilation flags
  7. # - CPPFLAGS are for pre-processor flags
  8. # - CPPDEFINES are for pre-processor defines
  9. # - LINKFLAGS are for linking flags
  10. # tweak this if you want to use different folders, or more folders, to store your source code in.
  11. env.Append(CPPPATH=["src/"])
  12. sources = Glob("src/*.cpp")
  13. if env["platform"] == "macos":
  14. library = env.SharedLibrary(
  15. "project/bin/libgdexample.{}.{}.framework/libgdexample.{}.{}".format(
  16. env["platform"], env["target"], env["platform"], env["target"]
  17. ),
  18. source=sources,
  19. )
  20. else:
  21. library = env.SharedLibrary(
  22. "project/bin/libgdexample{}{}".format(env["suffix"], env["SHLIBSUFFIX"]),
  23. source=sources,
  24. )
  25. Default(library)