AppPkg: Add the Lua interpreter and library.
StdLib: Add support and include files for Lua.

The sources for the Lua standalone interpreter, as well as its library, have been added to AppPkg/Applications/Lua.  The Lua library, LuaLib, can be used to embed Lua into new applications.

The Lua header files, needed for both building and embedding, are located in StdLib/Include/Lua.  The original versions of these header files, in the source directory, have been converted into stubs that reference the include files in StdLib.  This allows us to keep the Lua sources as close to the distributed version as possible.

Documentation is contained in the Lua/doc directory.  Further information is available at www.lua.org.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed Off by:  Bruce Maynard <Bruce.Maynard@Emulex.Com>
Reviewed by:    Daryl McDaniel <daryl.mcdaniel@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16313 6f19259b-4bc3-4df7-8a09-765794883524
diff --git a/StdLib/StdLib.inc b/StdLib/StdLib.inc
index cb54be1..4c34905 100644
--- a/StdLib/StdLib.inc
+++ b/StdLib/StdLib.inc
@@ -69,6 +69,8 @@
   DevMedia|StdLib/LibC/Uefi/Devices/daShell.inf

   DevUtility|StdLib/LibC/Uefi/Devices/daUtility.inf

 

+  LuaLib|AppPkg/Applications/Lua/LuaLib.inf           # Lua language library

+

 [LibraryClasses.ARM]

   NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf

 

@@ -103,7 +105,18 @@
 #

 

 [BuildOptions]

-!ifndef $(EMULATE)

+!ifdef $(EMULATE)

+  # The Build Options, below, are only used when building the Standard Libraries

+  # to be run under an emulation environment; such as NT32Pkg.

+  # They disable optimization which facillitates debugging under the Emulation environment.

+  INTEL:*_*_IA32_CC_FLAGS   = /Od /D UEFI_C_SOURCE

+   MSFT:*_*_IA32_CC_FLAGS   = /Od /D UEFI_C_SOURCE

+    GCC:*_*_IA32_CC_FLAGS   = -O0 -DUEFI_C_SOURCE

+    RVCT:*_*_*_CC_FLAGS     = --library_interface=none -DUEFI_C_SOURCE -J$(WORKSPACE)/StdLib/Include -J$(WORKSPACE)/StdLib/Include/Arm

+  ARMGCC:*_*_*_CC_FLAGS     = -O0 -DUEFI_C_SOURCE -Wno-unknown-pragmas -Wno-unused -Wno-format-zero-length

+   XCODE:*_*_*_CC_FLAGS     = -O0 -DUEFI_C_SOURCE -Wno-unused-const-variable -Wno-string-compare -Wno-sometimes-uninitialized

+

+!else

   # These Build Options are used when building the Standard Libraries to be run

   # on real hardware.

    INTEL:*_*_*_CC_FLAGS     = /Qfreestanding /D UEFI_C_SOURCE

@@ -112,15 +125,4 @@
     RVCT:*_*_*_CC_FLAGS     = --library_interface=none -DUEFI_C_SOURCE -J$(WORKSPACE)/StdLib/Include -J$(WORKSPACE)/StdLib/Include/Arm

   ARMGCC:*_*_*_CC_FLAGS     = -nostdinc -nostdlib -DUEFI_C_SOURCE -Wno-unknown-pragmas -Wno-unused -Wno-format-zero-length

    XCODE:*_*_*_CC_FLAGS     = -nostdinc -nostdlib -DUEFI_C_SOURCE -Wno-unused-const-variable -Wno-string-compare -Wno-sometimes-uninitialized

-

-!else

-  # The Build Options, below, are only used when building the Standard Libraries

-  # to be run under an emulation environment.

-  # They disable optimization which facillitates debugging under the Emulation environment.

-  INTEL:*_*_IA32_CC_FLAGS   = /Od /D UEFI_C_SOURCE

-   MSFT:*_*_IA32_CC_FLAGS   = /Od /D UEFI_C_SOURCE

-    GCC:*_*_IA32_CC_FLAGS   = -O0 -DUEFI_C_SOURCE

-    RVCT:*_*_*_CC_FLAGS     = --library_interface=none -DUEFI_C_SOURCE -J$(WORKSPACE)/StdLib/Include -J$(WORKSPACE)/StdLib/Include/Arm

-  ARMGCC:*_*_*_CC_FLAGS     = -O0 -DUEFI_C_SOURCE -Wno-unknown-pragmas -Wno-unused -Wno-format-zero-length

-   XCODE:*_*_*_CC_FLAGS     = -O0 -DUEFI_C_SOURCE -Wno-unused-const-variable -Wno-string-compare -Wno-sometimes-uninitialized

 !endif