1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-12-04 12:24:11 +01:00
LibrePilot/flight/libraries/PyMite/platform/desktop/SConscript

22 lines
855 B
Python
Raw Normal View History

Import("vars")
vars.Add("IPM", "Add the interactive library to the standard lib", True)
CFLAGS = "-Os -Wall -gstabs -Wstrict-prototypes -Werror"
if "DEBUG" in vars.args.keys():
CFLAGS = "-g -ggdb -D__DEBUG__=1 " + CFLAGS
SOURCES = ["main.c", "plat.c"]
PY_SOURCES = ["main.py"]
PM_LIB_ROOT = ["pmvm_%s" % vars.args["PLATFORM"]]
env = Environment(variables = vars,
CPPPATH = ["#src/vm", "#src/platform/desktop"],
CCFLAGS = CFLAGS)
vmlib = SConscript(["../../vm/SConscript"], ["env", "vars"])
img_sources = Command(["main_img.c", "main_nat.c"], [PY_SOURCES],
"src/tools/pmImgCreator.py -c -u -o src/platform/desktop/main_img.c" \
" --native-file=src/platform/desktop/main_nat.c $SOURCES")
main = env.Program("main.out", SOURCES + img_sources,
LIBS = PM_LIB_ROOT, LIBPATH = ["../../vm"])