diff --git a/Makefile b/Makefile index 511e7b03..6f012867 100644 --- a/Makefile +++ b/Makefile @@ -229,6 +229,8 @@ else CP = cp ZIP = zip PLATFORMFILES = gfx2.png + LUACOPT = `pkg-config lua5.1 --cflags` + LUALOPT = `pkg-config lua5.1 --libs` # These can only be used under linux and maybe freebsd. They allow to compile for the gp2x or to create a windows binary ifdef WIN32CROSS @@ -298,8 +300,7 @@ ifeq ($(NOLUA),1) LUALOPT = LUALABEL = -nolua else - LUACOPT = -D__ENABLE_LUA__ - LUALOPT = -llua5.1 + LUACOPT += -D__ENABLE_LUA__ LUALABEL = endif diff --git a/factory.c b/factory.c index 75e7cd75..173dbc62 100644 --- a/factory.c +++ b/factory.c @@ -39,9 +39,9 @@ #ifdef __ENABLE_LUA__ -#include -#include -#include +#include +#include +#include // Wrapper functions to call C from Lua