From 0bfc62709485828eb547fec49b4e7293bbf8e90c Mon Sep 17 00:00:00 2001 From: "masta.uy" Date: Sat, 13 Nov 2010 20:05:12 +0000 Subject: [PATCH] Some minor changes to make it compile on AROS. git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1649 416bcca6-2ee7-4201-b75f-2eb2f807beb1 --- src/Makefile | 12 ++++++++++++ src/io.c | 4 ++-- src/realpath.c | 3 +++ src/setup.c | 2 ++ 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/Makefile b/src/Makefile index b5b5ecb4..fd5ba650 100644 --- a/src/Makefile +++ b/src/Makefile @@ -235,6 +235,18 @@ else PLATFORM = gp2x STRIP = /opt/open2x/gcc-4.1.1-glibc-2.3.6/arm-open2x-linux/bin/arm-open2x-linux-strip JOYCOPT = -DUSE_JOYSTICK + + else ifdef AROS32CROSS + #cross compile an Aros 32 bit executable + BIN = ../bin/grafx2 + COPT = -Wall -g `i386-linux-aros-sdl-config --cflags` $(TTFCOPT) + LOPT = -lSDL_image `i386-linux-aros-sdl-config --libs` -lpng -ljpeg -lz $(TTFLOPT) -lfreetype2shared + CC = i386-aros-gcc + OBJDIR = ../obj/aros + STRIP = strip --strip-unneeded --remove-section .comment + PLATFORM = AROS + ZIP = lha + ZIPOPT = a else # Compiles a regular linux executable for the native platform diff --git a/src/io.c b/src/io.c index 4707ed3c..e6f54abc 100644 --- a/src/io.c +++ b/src/io.c @@ -299,7 +299,7 @@ int Lock_file_handle = -1; byte Create_lock_file(const char *file_directory) { - #ifdef __amigaos__ + #if defined (__amigaos__)||(__AROS__) #warning "Missing code for your platform, please check and correct!" #else char lock_filename[MAX_PATH_CHARACTERS]; @@ -336,7 +336,7 @@ byte Create_lock_file(const char *file_directory) return -1; } #endif - #endif // __amigaos__ + #endif // __amigaos__ or __AROS__ return 0; } diff --git a/src/realpath.c b/src/realpath.c index cb913c9f..1a916e72 100644 --- a/src/realpath.c +++ b/src/realpath.c @@ -6,6 +6,9 @@ #include #include #include +#if defined(__AROS__) +#include +#endif #if defined(__AROS__) || defined(__BEOS__) || defined(__MORPHOS__) || defined(__GP2X__) || defined(__WIZ__) || defined(__CAANOO__) || defined(__amigaos__) // These platforms don't have realpath(). diff --git a/src/setup.c b/src/setup.c index 3c92045d..22c73895 100644 --- a/src/setup.c +++ b/src/setup.c @@ -118,6 +118,8 @@ void Set_data_directory(const char * program_dir, char * data_dir) #elif defined (__GP2X__) || defined (__gp2x__) || defined (__WIZ__) || defined (__CAANOO__) strcat(data_dir,"share/grafx2/"); // All other targets, program is in a "bin" subdirectory + #elif defined (__AROS__) + strcat(data_dir,"/share/grafx2/"); #else strcat(data_dir,"../share/grafx2/"); #endif