diff --git a/src/Makefile b/src/Makefile index c93abcfa..eb0c0ce4 100644 --- a/src/Makefile +++ b/src/Makefile @@ -316,10 +316,12 @@ endif else ifdef AROS32CROSS - #cross compile an Aros 32 bit executable + #cross compile an AROS 32 bit executable BIN = ../GrafX2 - COPT = -Wall -Wno-pointer-sign -Wno-unused-but-set-variable -g `i386-linux-aros-sdl-config --cflags` $(TTFCOPT) - LOPT = -lSDL_image `i386-linux-aros-sdl-config --libs` -lpng -ljpeg -lz $(TTFLOPT) -lfreetype2shared + COPT = -Wall -Wno-pointer-sign -Wno-unused-but-set-variable -g `i386-linux-aros-sdl-config --cflags` $(TTFCOPT) $(LUACOPT) + LOPT = -lSDL_image `i386-linux-aros-sdl-config --libs` -lpng -ljpeg -lz $(TTFLOPT) -lfreetype2shared $(LUALOPT) + LUACOPT = -I/home/mazze/projects/fullaros/aros-linux-i386-dbg/bin/linux-i386/AROS/Development/include/lua + LUALOPT = -llua CC = i386-linux-aros-gcc OBJDIR = ../obj/aros STRIP = strip --strip-unneeded --remove-section .comment diff --git a/src/factory.c b/src/factory.c index 64972bc2..a100167c 100644 --- a/src/factory.c +++ b/src/factory.c @@ -1593,8 +1593,12 @@ void Run_script(const char *script_subdirectory, const char *script_filename) Extract_path(buf,Last_run_script); chdir(buf); +#if defined(__AROS__) + L = luaL_newstate(); // lua_open() doesn't exist anymore in Lua-5.2 +#else L = lua_open(); - +#endif + strcpy(buf, "LUA_PATH="); strcat(buf, Data_directory); Append_path(buf+9, SCRIPTS_SUBDIRECTORY, NULL); diff --git a/src/io.c b/src/io.c index 3697e926..c189f01a 100644 --- a/src/io.c +++ b/src/io.c @@ -172,6 +172,8 @@ char * Find_last_slash(const char * str) if (*str == PATH_SEPARATOR[0] #ifdef __WIN32__ || *str == '/' +#elif __AROS__ + || *str == ':' #endif ) position = str; diff --git a/src/setup.h b/src/setup.h index 369ac7ce..762a617b 100644 --- a/src/setup.h +++ b/src/setup.h @@ -73,6 +73,8 @@ void Set_config_directory(const char * program_dir, char * config_dir); /// Name of the subdirectory containing scripts #if defined (__MINT__) #define SCRIPTS_SUBDIRECTORY "SCRIPTS" +#elif defined(__AROS__) + #define SCRIPTS_SUBDIRECTORY "share/grafx2/scripts" #else #define SCRIPTS_SUBDIRECTORY "scripts" #endif