diff options
Diffstat (limited to 'onelua.c')
| -rw-r--r-- | onelua.c | 20 |
1 files changed, 15 insertions, 5 deletions
| @@ -5,10 +5,14 @@ | |||
| 5 | ** | 5 | ** |
| 6 | ** $ gcc -O2 -std=c99 -o lua onelua.c -lm | 6 | ** $ gcc -O2 -std=c99 -o lua onelua.c -lm |
| 7 | ** | 7 | ** |
| 8 | ** or | 8 | ** or (for C89) |
| 9 | ** | 9 | ** |
| 10 | ** $ gcc -O2 -std=c89 -DLUA_USE_C89 -o lua onelua.c -lm | 10 | ** $ gcc -O2 -std=c89 -DLUA_USE_C89 -o lua onelua.c -lm |
| 11 | ** | 11 | ** |
| 12 | ** or (for Linux) | ||
| 13 | ** | ||
| 14 | ** gcc -O2 -o lua -DLUA_USE_LINUX -Wl,-E onelua.c -lm -ldl | ||
| 15 | ** | ||
| 12 | */ | 16 | */ |
| 13 | 17 | ||
| 14 | /* default is to build the full interpreter */ | 18 | /* default is to build the full interpreter */ |
| @@ -30,7 +34,15 @@ | |||
| 30 | #define LUA_USE_LINUX | 34 | #define LUA_USE_LINUX |
| 31 | #define LUA_USE_MACOSX | 35 | #define LUA_USE_MACOSX |
| 32 | #define LUA_USE_POSIX | 36 | #define LUA_USE_POSIX |
| 33 | #define LUA_ANSI | 37 | #endif |
| 38 | |||
| 39 | |||
| 40 | /* | ||
| 41 | ** Other specific features | ||
| 42 | */ | ||
| 43 | #if 0 | ||
| 44 | #define LUA_32BITS | ||
| 45 | #define LUA_USE_C89 | ||
| 34 | #endif | 46 | #endif |
| 35 | 47 | ||
| 36 | 48 | ||
| @@ -54,12 +66,10 @@ | |||
| 54 | #include <string.h> | 66 | #include <string.h> |
| 55 | #include <time.h> | 67 | #include <time.h> |
| 56 | 68 | ||
| 57 | |||
| 58 | /* setup for luaconf.h */ | 69 | /* setup for luaconf.h */ |
| 59 | #define LUA_CORE | 70 | #define LUA_CORE |
| 60 | #define LUA_LIB | 71 | #define LUA_LIB |
| 61 | #define ltable_c | 72 | |
| 62 | #define lvm_c | ||
| 63 | #include "luaconf.h" | 73 | #include "luaconf.h" |
| 64 | 74 | ||
| 65 | /* do not export internal symbols */ | 75 | /* do not export internal symbols */ |
