1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2024-11-30 08:24:11 +01:00
LibrePilot/flight/libraries/PyMite/platform/desktop/SConscript
2013-04-25 13:13:36 +03:00

22 lines
855 B
Python

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"])