lite-xl/build.config.py

30 lines
759 B
Python
Raw Normal View History

2019-12-28 12:16:32 +01:00
import os
cflags = [ "-Wall", "-O3", "-g", "-DLUA_USE_POPEN" ]
lflags = [ "-lSDL2", "-lm" ]
include = [ "src" ]
output = "lite"
if "sanitize" in opt:
log("address sanitizer enabled")
cflags += [ "-fsanitize=address" ]
lflags += [ "-fsanitize=address" ]
if "windows" in opt:
compiler = "x86_64-w64-mingw32-gcc"
output += ".exe"
cflags += [ "-Iwinlib/SDL2-2.0.10/x86_64-w64-mingw32/include" ]
lflags += [ "-Lwinlib/SDL2-2.0.10/x86_64-w64-mingw32/lib" ]
lflags = [ "-lmingw32", "-lSDL2main" ] + lflags
lflags += [ "-lwinmm" ]
lflags += [ "-mwindows" ]
lflags += [ "res.res" ]
def pre():
2020-05-02 18:58:20 +02:00
os.system("x86_64-w64-mingw32-windres res.rc -O coff -o res.res")
2019-12-28 12:16:32 +01:00
def post():
2020-05-02 18:58:20 +02:00
os.remove("res.res")