mirror of
https://github.com/elua/elua.git
synced 2025-01-08 20:56:17 +08:00
Desktop Builds Get platform_conf.h
luarpc & cross compiler builds now have a platform_conf.h which should help in keeping ifdefs down in common source files.
This commit is contained in:
parent
8b58611c6b
commit
125af9f8b8
@ -8,7 +8,7 @@ lua_files = """lapi.c lcode.c ldebug.c ldo.c ldump.c lfunc.c lgc.c llex.c lmem.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 lrotable.c"""
|
||||
lua_full_files = " " + " ".join( [ "src/lua/%s" % name for name in lua_files.split() ] )
|
||||
local_include = "-Isrc/lua"
|
||||
local_include = "-Isrc/lua -Iinc/desktop"
|
||||
|
||||
# Compiler/linker options
|
||||
cccom = "gcc -O2 %s -Wall %s -c $SOURCE -o $TARGET" % ( local_include, cdefs )
|
||||
|
@ -1,11 +1,5 @@
|
||||
#include "cexcept.h"
|
||||
#include "type.h"
|
||||
|
||||
#ifdef LUA_RPC
|
||||
#define LUARPC_ENABLE_SERIAL
|
||||
#define BUILD_RPC
|
||||
#endif
|
||||
|
||||
#include "serial.h"
|
||||
|
||||
/****************************************************************************/
|
||||
|
@ -14,19 +14,10 @@
|
||||
#include "lauxlib.h"
|
||||
#include "lrotable.h"
|
||||
#include "luaconf.h"
|
||||
|
||||
#ifndef LUA_CROSS_COMPILER
|
||||
#include "platform_conf.h"
|
||||
#endif
|
||||
|
||||
extern int luaopen_platform( lua_State *L );
|
||||
|
||||
#ifdef LUA_RPC
|
||||
#include "auxmods.h"
|
||||
#define LUA_PLATFORM_LIBS_ROM \
|
||||
_ROM( AUXLIB_RPC, luaopen_rpc, rpc_map )
|
||||
#endif
|
||||
|
||||
static const luaL_Reg lualibs[] = {
|
||||
{"", luaopen_base},
|
||||
{LUA_LOADLIBNAME, luaopen_package},
|
||||
|
@ -22,9 +22,7 @@
|
||||
#include "lstring.h"
|
||||
#include "ltable.h"
|
||||
#include "ltm.h"
|
||||
#if !defined(LUA_CROSS_COMPILER)
|
||||
#include "platform_conf.h"
|
||||
#endif
|
||||
|
||||
#define state_size(x) (sizeof(x) + LUAI_EXTRASPACE)
|
||||
#define fromstate(l) (cast(lu_byte *, (l)) - LUAI_EXTRASPACE)
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdint.h>
|
||||
#ifdef __MINGW32__
|
||||
void *alloca(size_t);
|
||||
#else
|
||||
@ -28,9 +29,10 @@ void *alloca(size_t);
|
||||
|
||||
#ifndef LUA_CROSS_COMPILER
|
||||
#include "platform.h"
|
||||
#include "platform_conf.h"
|
||||
#endif
|
||||
|
||||
#include "platform_conf.h"
|
||||
|
||||
#ifdef LUA_OPTIMIZE_MEMORY
|
||||
#include "lrotable.h"
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user