Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
5 changed files
with
245 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| import os, sys | ||
|
|
||
| output = 'luac' | ||
| cdefs = '-DLUA_CROSS_COMPILER' | ||
|
|
||
| # Lua source files and include path | ||
| lua_files = """lapi.c lcode.c ldebug.c ldo.c ldump.c lfunc.c lgc.c llex.c lmem.c lobject.c lopcodes.c | ||
| lparser.c lstate.c lstring.c ltable.c ltm.c lundump.c lvm.c lzio.c lauxlib.c lbaselib.c | ||
| ldblib.c liolib.c lmathlib.c loslib.c ltablib.c lstrlib.c loadlib.c linit.c luac.c print.c""" | ||
| lua_full_files = " " + " ".join( [ "src/lua/%s" % name for name in lua_files.split() ] ) | ||
| local_include = "-Isrc/lua" | ||
|
|
||
| # Compiler/linker options | ||
| cccom = "gcc -O3 %s -Wall %s -c $SOURCE -o $TARGET" % ( local_include, cdefs ) | ||
| linkcom = "gcc -o $TARGET $SOURCES -lm" | ||
|
|
||
| # Env for building the program | ||
| comp = Environment( CCCOM = cccom, | ||
| LINKCOM = linkcom, | ||
| ENV = os.environ ) | ||
| comp.TargetSignatures( 'content' ) | ||
| comp.SourceSignatures( 'MD5' ) | ||
| Default( comp.Program( output, Split( lua_full_files ) ) ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.