diff --git a/project/jni/application/ballfield/AndroidAppSettings.cfg b/project/jni/application/ballfield/AndroidAppSettings.cfg index b0d3ad24b..09008643b 100644 --- a/project/jni/application/ballfield/AndroidAppSettings.cfg +++ b/project/jni/application/ballfield/AndroidAppSettings.cfg @@ -10,7 +10,7 @@ VideoDepthBpp=16 NeedDepthBuffer=n NeedStencilBuffer=n NeedGles2=n -SwVideoMode=n +SwVideoMode=y SdlVideoResize=y SdlVideoResizeKeepAspect=n CompatibilityHacks=n @@ -18,7 +18,7 @@ AppUsesMouse=y AppNeedsTwoButtonMouse=n ForceRelativeMouseMode=n AppNeedsArrowKeys=y -AppNeedsTextInput=n +AppNeedsTextInput=y AppUsesJoystick=n AppHandlesJoystickSensitivity=n AppUsesMultitouch=n diff --git a/project/jni/application/ballfield/ballfield.cpp b/project/jni/application/ballfield/ballfield.cpp index 038aa8ad5..409146bac 100644 --- a/project/jni/application/ballfield/ballfield.cpp +++ b/project/jni/application/ballfield/ballfield.cpp @@ -23,8 +23,10 @@ /*---------------------------------------------------------- Definitions... ----------------------------------------------------------*/ +#define SCREEN_W 320 +#define SCREEN_H 240 -#define BALLS 3000 +#define BALLS 300 #define COLORS 2 @@ -47,12 +49,6 @@ typedef struct } ballfield_t; -/* - * Size of the screen in pixels - */ -#define SCREEN_W 800 -#define SCREEN_H 480 - /* * Size of the biggest ball image in pixels * diff --git a/project/jni/application/regression/AndroidAppSettings.cfg b/project/jni/application/regression/AndroidAppSettings.cfg new file mode 100644 index 000000000..4415cfb56 --- /dev/null +++ b/project/jni/application/regression/AndroidAppSettings.cfg @@ -0,0 +1,42 @@ +# The application settings for Android libSDL port +AppSettingVersion=17 +LibSdlVersion=1.2 +AppName="Ballfield regression" +AppFullName=net.olofson.ballfield.regression +ScreenOrientation=h +InhibitSuspend=n +AppDataDownloadUrl="Game data is 1 Mb|ballfield.zip" +VideoDepthBpp=16 +NeedDepthBuffer=n +NeedStencilBuffer=n +NeedGles2=n +SwVideoMode=y +SdlVideoResize=y +SdlVideoResizeKeepAspect=n +CompatibilityHacks=n +AppUsesMouse=y +AppNeedsTwoButtonMouse=n +ForceRelativeMouseMode=n +AppNeedsArrowKeys=y +AppNeedsTextInput=y +AppUsesJoystick=n +AppHandlesJoystickSensitivity=n +AppUsesMultitouch=n +NonBlockingSwapBuffers=y +RedefinedKeys="SPACE RETURN NO_REMAP NO_REMAP SPACE ESCAPE" +AppTouchscreenKeyboardKeysAmount=0 +AppTouchscreenKeyboardKeysAmountAutoFire=0 +RedefinedKeysScreenKb="1 2 3 4 5 6 1 2 3 4" +StartupMenuButtonTimeout=3000 +HiddenMenuOptions='OptionalDownloadConfig' +FirstStartMenuOptions='' +MultiABI=n +AppVersionCode=101 +AppVersionName="1.01" +CompiledLibraries="sdl_mixer sdl_image" +CustomBuildScript=n +AppCflags='-O2 -finline-functions' +AppLdflags='' +AppSubdirsBuild='' +AppCmdline='' +ReadmeText='^Readme text' diff --git a/project/jni/application/regression/AndroidData/ballfield.zip b/project/jni/application/regression/AndroidData/ballfield.zip new file mode 100644 index 000000000..c4ada48d5 Binary files /dev/null and b/project/jni/application/regression/AndroidData/ballfield.zip differ diff --git a/project/jni/application/regression/ballfield.cpp b/project/jni/application/regression/ballfield.cpp new file mode 100644 index 000000000..b2079c702 --- /dev/null +++ b/project/jni/application/regression/ballfield.cpp @@ -0,0 +1,661 @@ +/* + * "Ballfield" + * + * (C) David Olofson , 2002, 2003 + * + * This software is released under the terms of the GPL. + * + * Contact author for permission if you want to use this + * software, or work derived from it, under other terms. + */ + +#include +#include +#include +#include +#include +#include + +#include "SDL.h" +#include "SDL_image.h" + +#include "regression.h" + + +/*---------------------------------------------------------- + Definitions... +----------------------------------------------------------*/ +#define SCREEN_W 320 +#define SCREEN_H 240 + +#define BALLS 300 + +#define COLORS 2 + +typedef struct +{ + Sint32 x, y, z; /* Position */ + Uint32 c; /* Color */ +} point_t; + + +/* + * Ballfield + */ +typedef struct +{ + point_t points[BALLS]; + SDL_Rect *frames; + SDL_Surface *gfx[COLORS]; + int use_alpha; +} ballfield_t; + + +/* + * Size of the biggest ball image in pixels + * + * Balls are scaled down and *packed*, one pixel + * smaller for each frame down to 1x1. The actual + * image width is (obviously...) the same as the + * width of the first frame. + */ +#define BALL_W 32 +#define BALL_H 32 + + + + +/*---------------------------------------------------------- + General tool functions +----------------------------------------------------------*/ + +/* + * Bump areas of low and high alpha to 0% or 100% + * respectively, just in case the graphics contains + * "alpha noise". + */ +SDL_Surface *clean_alpha(SDL_Surface *s) +{ + SDL_Surface *work; + SDL_Rect r; + Uint32 *pixels; + int pp; + int x, y; + + work = SDL_CreateRGBSurface(SDL_SWSURFACE, s->w, s->h, + 32, 0xff000000, 0x00ff0000, 0x0000ff00, + 0x000000ff); + if(!work) + return NULL; + + r.x = r.y = 0; + r.w = s->w; + r.h = s->h; + if(SDL_BlitSurface(s, &r, work, NULL) < 0) + { + SDL_FreeSurface(work); + return NULL; + } + + SDL_LockSurface(work); + pixels = (Uint32 *)work->pixels; + pp = work->pitch / sizeof(Uint32); + for(y = 0; y < work->h; ++y) + for(x = 0; x < work->w; ++x) + { + Uint32 pix = pixels[y*pp + x]; + switch((pix & 0xff) >> 4) + { + case 0: + pix = 0x00000000; + break; + default: + break; + case 15: + pix |= 0xff; + break; + } + pixels[y*pp + x] = pix; + } + SDL_UnlockSurface(work); + + return work; +} + + +/* + * Load and convert an antialiazed, zoomed set of sprites. + */ +SDL_Surface *load_zoomed(char *name, int alpha) +{ + SDL_Surface *sprites; + SDL_Surface *temp = IMG_Load(name); + if(!temp) + return NULL; + + /* + sprites = temp; + SDL_SetAlpha(sprites, 0, 255); + temp = clean_alpha(sprites); + SDL_FreeSurface(sprites); + */ + if(!temp) + { + fprintf(stderr, "Could not clean alpha!\n"); + return NULL; + } + + if(alpha) + { + SDL_SetAlpha(temp, 0, SDL_ALPHA_OPAQUE); + sprites = SDL_DisplayFormatAlpha(temp); + } + else + { + SDL_SetColorKey(temp, SDL_SRCCOLORKEY, + SDL_MapRGB(temp->format, 0, 0, 0)); + sprites = SDL_DisplayFormat(temp); + } + SDL_FreeSurface(temp); + + return sprites; +} + + +void print_num(SDL_Surface *dst, SDL_Surface *font, int x, int y, float value) +{ + char buf[16]; + int val = (int)(value * 10.0); + int pos, p = 0; + SDL_Rect from; + + /* Sign */ + if(val < 0) + { + buf[p++] = 10; + val = -val; + } + + /* Integer part */ + pos = 10000000; + while(pos > 1) + { + int num = val / pos; + val -= num * pos; + pos /= 10; + if(p || num) + buf[p++] = num; + } + + /* Decimals */ + if(val / pos) + { + buf[p++] = 11; + while(pos > 0) + { + int num = val / pos; + val -= num * pos; + pos /= 10; + buf[p++] = num; + } + } + + /* Render! */ + from.y = 0; + from.w = 7; + from.h = 10; + for(pos = 0; pos < p; ++pos) + { + SDL_Rect to; + to.x = x + pos * 7; + to.y = y; + from.x = buf[pos] * 7; + SDL_BlitSurface(font, &from, dst, &to); + } +} + + + +/*---------------------------------------------------------- + ballfield_t functions +----------------------------------------------------------*/ + +ballfield_t *ballfield_init(void) +{ + int i; + ballfield_t *bf = (ballfield_t *)calloc(sizeof(ballfield_t), 1); + if(!bf) + return NULL; + for(i = 0; i < BALLS; ++i) + { + bf->points[i].x = rand() % 0x20000; + bf->points[i].y = rand() % 0x20000; + bf->points[i].z = 0x20000 * i / BALLS; + if(rand() % 100 > 80) + bf->points[i].c = 1; + else + bf->points[i].c = 0; + } + return bf; +} + + +void ballfield_free(ballfield_t *bf) +{ + int i; + for(i = 0; i < COLORS; ++i) + SDL_FreeSurface(bf->gfx[i]); +} + + +static int ballfield_init_frames(ballfield_t *bf) +{ + int i, j; + /* + * Set up source rects for all frames + */ + bf->frames = (SDL_Rect *)calloc(sizeof(SDL_Rect), bf->gfx[0]->w); + if(!bf->frames) + { + fprintf(stderr, "No memory for frame rects!\n"); + return -1; + } + for(j = 0, i = 0; i < bf->gfx[0]->w; ++i) + { + bf->frames[i].x = 0; + bf->frames[i].y = j; + bf->frames[i].w = bf->gfx[0]->w - i; + bf->frames[i].h = bf->gfx[0]->w - i; + j += bf->gfx[0]->w - i; + } + return 0; +} + + +int ballfield_load_gfx(ballfield_t *bf, char *name, unsigned int color) +{ + if(color >= COLORS) + return -1; + + bf->gfx[color] = load_zoomed(name, bf->use_alpha); + if(!bf->gfx[color]) + return -2; + + if(!bf->frames) + return ballfield_init_frames(bf); + + return 0; +} + + +void ballfield_move(ballfield_t *bf, Sint32 dx, Sint32 dy, Sint32 dz) +{ + int i; + for(i = 0; i < BALLS; ++i) + { + bf->points[i].x += dx; + bf->points[i].x &= 0x1ffff; + bf->points[i].y += dy; + bf->points[i].y &= 0x1ffff; + bf->points[i].z += dz; + bf->points[i].z &= 0x1ffff; + } +} + + +void ballfield_render(ballfield_t *bf, SDL_Surface *screen) +{ + int i, j, z; + + /* + * Find the ball with the highest Z. + */ + z = 0; + j = 0; + for(i = 0; i < BALLS; ++i) + { + if(bf->points[i].z > z) + { + j = i; + z = bf->points[i].z; + } + } + + /* + * Render all balls in back->front order. + */ + for(i = 0; i < BALLS; ++i) + { + SDL_Rect r; + int f; + z = bf->points[j].z; + z += 50; + f = ((bf->frames[0].w << 12) + 100000) / z; + f = bf->frames[0].w - f; + if(f < 0) + f = 0; + else if(f > bf->frames[0].w - 1) + f = bf->frames[0].w - 1; + z >>= 7; + z += 1; + r.x = (bf->points[j].x - 0x10000) / z; + r.y = (bf->points[j].y - 0x10000) / z; + r.x += (screen->w - bf->frames[f].w) >> 1; + r.y += (screen->h - bf->frames[f].h) >> 1; + SDL_BlitSurface(bf->gfx[bf->points[j].c], + &bf->frames[f], screen, &r); + if(--j < 0) + j = BALLS - 1; + } +} + + + +/*---------------------------------------------------------- + Other rendering functions +----------------------------------------------------------*/ + +/* + * Draw tiled background image with offset. + */ +void tiled_back(SDL_Surface *back, SDL_Surface *screen, int xo, int yo) +{ + /* + int x, y; + SDL_Rect r; + if(xo < 0) + xo += back->w*(-xo/back->w + 1); + if(yo < 0) + yo += back->h*(-yo/back->h + 1); + xo %= back->w; + yo %= back->h; + for(y = -yo; y < screen->h; y += back->h) + for(x = -xo; x < screen->w; x += back->w) + { + r.x = x; + r.y = y; + SDL_BlitSurface(back, NULL, screen, &r); + } + */ + SDL_Rect r; + xo %= back->w/8; + yo %= back->h/8; + r.x = xo - back->w/2 + screen->w/2; + r.y = yo - back->h/2 + screen->h/2; + r.w = back->w; + r.h = back->h; + SDL_BlitSurface(back, NULL, screen, &r); +} + + + +/*---------------------------------------------------------- + main() +----------------------------------------------------------*/ + +int main(int argc, char* argv[]) +{ + ballfield_t *balls; + SDL_Surface *screen; + SDL_Surface *temp_image; + SDL_Surface *back, *logo, *font; + SDL_Event event; + int bpp = 16, + flags = SDL_DOUBLEBUF | SDL_HWSURFACE, + alpha = 1; + int x_offs = 0, y_offs = 0; + long tick, + last_tick, + last_avg_tick; + double t = 0; + float dt; + int i; + float fps = 0.0; + int fps_count = 0; + int fps_start = 0; + float x_speed, y_speed, z_speed; + + SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_JOYSTICK); + + atexit(SDL_Quit); + + for(i = 1; i < argc; ++i) + { + if(strncmp(argv[i], "-na", 3) == 0) + alpha = 0; + else if(strncmp(argv[i], "-nd", 3) == 0) + flags &= ~SDL_DOUBLEBUF; + else if(strncmp(argv[i], "-h", 2) == 0) + { + flags |= SDL_HWSURFACE; + flags &= ~SDL_SWSURFACE; + } + else if(strncmp(argv[i], "-f", 2) == 0) + flags |= SDL_FULLSCREEN; + else + bpp = atoi(&argv[i][1]); + } + + screen = SDL_SetVideoMode(SCREEN_W, SCREEN_H, bpp, flags); + if(!screen) + { + fprintf(stderr, "Failed to open screen!\n"); + exit(-1); + } + + SDL_WM_SetCaption("Ballfield", "Ballfield"); + if(flags & SDL_FULLSCREEN) + SDL_ShowCursor(0); + + balls = ballfield_init(); + if(!balls) + { + fprintf(stderr, "Failed to create ballfield!\n"); + exit(-1); + } + + /* + * Load and prepare balls... + */ + balls->use_alpha = alpha; + if( ballfield_load_gfx(balls, "blueball.png", 0) + || + ballfield_load_gfx(balls, "redball.png", 1) ) + { + fprintf(stderr, "Could not load balls!\n"); + exit(-1); + } + + /* + * Load background image + */ + temp_image = IMG_Load("sun.gif"); + if(!temp_image) + { + fprintf(stderr, "Could not load background!\n"); + exit(-1); + } + back = SDL_DisplayFormat(temp_image); + SDL_FreeSurface(temp_image); + + /* + * Load logo + */ + temp_image = SDL_LoadBMP("logo.bmp"); + if(!temp_image) + { + fprintf(stderr, "Could not load logo!\n"); + exit(-1); + } + SDL_SetColorKey(temp_image, SDL_SRCCOLORKEY, + SDL_MapRGB(temp_image->format, 255, 0, 255)); + logo = SDL_DisplayFormat(temp_image); + SDL_FreeSurface(temp_image); + + /* + * Load font + */ + temp_image = SDL_LoadBMP("font7x10.bmp"); + if(!temp_image) + { + fprintf(stderr, "Could not load font!\n"); + exit(-1); + } + SDL_SetColorKey(temp_image, SDL_SRCCOLORKEY, + SDL_MapRGB(temp_image->format, 255, 0, 255)); + font = SDL_DisplayFormat(temp_image); + SDL_FreeSurface(temp_image); + + last_avg_tick = last_tick = SDL_GetTicks(); + + enum { MAX_POINTERS = 16, PTR_PRESSED = 4 }; + int touchPointers[MAX_POINTERS][5]; + + memset(touchPointers, 0, sizeof(touchPointers)); + SDL_Joystick * joysticks[MAX_POINTERS+1]; + for(i=0; i>11, y_offs>>11); + + /* Ballfield */ + ballfield_render(balls, screen); + + /* Logo */ + r.x = 2; + r.y = 2; + SDL_BlitSurface(logo, NULL, screen, &r); + + /* FPS counter */ + if(tick > fps_start + 1500) + { + fps = (float)fps_count * 1000.0 / (tick - fps_start); + fps_count = 0; + fps_start = tick; + __android_log_print(ANDROID_LOG_INFO, "Ballfield", "SDL REGRESSION BUILDDATE %s FPS: %f", BUILDDATE, fps); + } + print_num(screen, font, screen->w-37, screen->h-12, fps); + ++fps_count; + + for(i=0; i 0xff ) + color = 0xff; + color = color + color * 0x100 + color * 0x10000; + SDL_FillRect(screen, &r, color); + print_num(screen, font, r.x, r.y, i+1); + } + int mx, my; + int b = SDL_GetMouseState(&mx, &my); + Uint32 color = 0xff; + if( b ) + { + color = 0; + if( b & SDL_BUTTON_LEFT ) + color |= 0xff00; + if( b & SDL_BUTTON_RIGHT ) + color |= 0xff0000; + } + r.x = mx; + r.y = my; + r.w = 30; + r.h = 30; + r.x -= r.w/2; + r.y -= r.h/2; + SDL_FillRect(screen, &r, color); + + SDL_Flip(SDL_GetVideoSurface()); + SDL_Event evt; + while( SDL_PollEvent(&evt) ) + { + if(evt.type == SDL_KEYUP || evt.type == SDL_KEYDOWN) + { + if(evt.key.keysym.sym == SDLK_ESCAPE) + return 0; + __android_log_print(ANDROID_LOG_INFO, "Ballfield", "SDL key event: evt %s state %s key %d scancode %d mod %d unicode %d", evt.type == SDL_KEYUP ? "UP " : "DOWN" , evt.key.state == SDL_PRESSED ? "PRESSED " : "RELEASED", (int)evt.key.keysym.sym, (int)evt.key.keysym.scancode, (int)evt.key.keysym.mod, (int)evt.key.keysym.unicode); + } + if(evt.type == SDL_VIDEORESIZE) + __android_log_print(ANDROID_LOG_INFO, "Ballfield", "SDL resize event: %d x %d", evt.resize.w, evt.resize.h); + if(evt.type == SDL_ACTIVEEVENT) + __android_log_print(ANDROID_LOG_INFO, "Ballfield", "======= SDL active event: gain %d state %d", evt.active.gain, evt.active.state); + if( evt.type == SDL_ACTIVEEVENT && evt.active.gain == 0 && evt.active.state & SDL_APPACTIVE ) + { + // We've lost GL context, we are not allowed to do any GFX output here, or app will crash! + while( 1 ) + { + SDL_PollEvent(&evt); + if( evt.type == SDL_ACTIVEEVENT && evt.active.gain && evt.active.state & SDL_APPACTIVE ) + { + __android_log_print(ANDROID_LOG_INFO, "Ballfield", "======= SDL active event: gain %d state %d", evt.active.gain, evt.active.state); + SDL_Flip(SDL_GetVideoSurface()); // One SDL_Flip() call is required here to restore OpenGL context + // Re-load all textures, matrixes and all other GL states if we're in SDL+OpenGL mode + // Re-load all images to SDL_Texture if we're using it + // Now we can draw + break; + } + // Process network stuff, maybe play some sounds using SDL_ANDROID_PauseAudioPlayback() / SDL_ANDROID_ResumeAudioPlayback() + SDL_Delay(300); + __android_log_print(ANDROID_LOG_INFO, "Ballfield", "Waiting"); + } + } + if( evt.type == SDL_JOYAXISMOTION ) + { + if( evt.jaxis.which == 0 ) + continue; + int joyid = evt.jaxis.which - 1; + touchPointers[joyid][evt.jaxis.axis] = evt.jaxis.value; + } + if( evt.type == SDL_JOYBUTTONDOWN || evt.type == SDL_JOYBUTTONUP ) + { + if( evt.jbutton.which == 0 ) + continue; + int joyid = evt.jbutton.which - 1; + touchPointers[joyid][PTR_PRESSED] = (evt.jbutton.state == SDL_PRESSED); + } + } + + /* Animate */ + x_speed = 500.0 * sin(t * 0.37); + y_speed = 500.0 * sin(t * 0.53); + z_speed = 400.0 * sin(t * 0.21); + + ballfield_move(balls, x_speed, y_speed, z_speed); + x_offs -= x_speed; + y_offs -= y_speed; + + t += dt; + } + + ballfield_free(balls); + SDL_FreeSurface(back); + SDL_FreeSurface(logo); + SDL_FreeSurface(font); + /* + std::ostringstream os; + os << "lalala" << std::endl << "more text" << std::endl; + std::cout << os.str() << std::endl << "text text" << std::endl; + */ + exit(0); +} diff --git a/project/jni/application/regression/icon.png b/project/jni/application/regression/icon.png new file mode 100644 index 000000000..b3614e149 Binary files /dev/null and b/project/jni/application/regression/icon.png differ diff --git a/project/jni/application/regression/regression.h b/project/jni/application/regression/regression.h new file mode 100644 index 000000000..7cede03e3 --- /dev/null +++ b/project/jni/application/regression/regression.h @@ -0,0 +1 @@ +#define BUILDDATE "2011-10-18" diff --git a/project/jni/application/scummvm/AndroidAppSettings.cfg b/project/jni/application/scummvm/AndroidAppSettings.cfg index 3cb4f9946..d2aed5db1 100644 --- a/project/jni/application/scummvm/AndroidAppSettings.cfg +++ b/project/jni/application/scummvm/AndroidAppSettings.cfg @@ -1,16 +1,22 @@ # The application settings for Android libSDL port -AppSettingVersion=16 +AppSettingVersion=17 LibSdlVersion=1.2 AppName="ScummVM" AppFullName=org.scummvm.sdl ScreenOrientation=h InhibitSuspend=n -AppDataDownloadUrl="Data files size is 3.5 Mb|http://sourceforge.net/projects/libsdl-android/files/ScummVM/scummvm-1.2.0-data.zip/download^MIDI music support (30 Mb) - add soundfont in Options->MIDI|http://sourceforge.net/projects/libsdl-android/files/GeneralUser-GS-FluidSynth-v1.43.sf2.zip/download^Lure of the Temptress (English, 10 Mb)|http://sourceforge.net/projects/scummvm/files/extras/Lure%20of%20the%20Temptress/lure-1.1.zip/download^Lure of the Temptress (German, 10 Mb)|http://sourceforge.net/projects/scummvm/files/extras/Lure%20of%20the%20Temptress/lure-de-1.1.zip/download^Lure of the Temptress (French, 10 Mb)|http://sourceforge.net/projects/scummvm/files/extras/Lure%20of%20the%20Temptress/lure-fr-1.1.zip/download^Lure of the Temptress (Italian, 10 Mb)|http://sourceforge.net/projects/scummvm/files/extras/Lure%20of%20the%20Temptress/lure-it-1.1.zip/download^Lure of the Temptress (Spanish, 10 Mb)|http://sourceforge.net/projects/scummvm/files/extras/Lure%20of%20the%20Temptress/lure-es-1.1.zip/download^Beneath a Steel Sky (CD version, 70 Mb)|http://sourceforge.net/projects/scummvm/files/extras/Beneath%20a%20Steel%20Sky/bass-cd-1.2.zip/download^Beneath a Steel Sky (floppy version, 10 Mb)|http://sourceforge.net/projects/scummvm/files/extras/Beneath%20a%20Steel%20Sky/BASS-Floppy-1.3.zip/download^Flight of the Amazon Queen (23 Mb)|http://sourceforge.net/projects/scummvm/files/extras/Flight%20of%20the%20Amazon%20Queen/FOTAQ_Floppy.zip/download^Flight of the Amazon Queen - voice addon (English, 35 Mb)|http://sourceforge.net/projects/scummvm/files/extras/Flight%20of%20the%20Amazon%20Queen/FOTAQ_Talkie-1.1.zip/download^Flight of the Amazon Queen - voice addon (German, 80 Mb)|http://sourceforge.net/projects/scummvm/files/extras/Flight%20of%20the%20Amazon%20Queen/FOTAQ_Ger_talkie-1.0.zip/download^Flight of the Amazon Queen - voice addon (Hebrew, 70 Mb)|http://sourceforge.net/projects/scummvm/files/extras/Flight%20of%20the%20Amazon%20Queen/FOTAQ_Heb_talkie.zip/download^Drascula: The Vampire Strikes Back (35 Mb)|http://sourceforge.net/projects/scummvm/files/extras/Drascula_%20The%20Vampire%20Strikes%20Back/drascula-1.0.zip/download^Drascula: The Vampire Strikes Back - translations addon (35 Mb)|http://sourceforge.net/projects/scummvm/files/extras/Drascula_%20The%20Vampire%20Strikes%20Back/drascula-int-1.1.zip/download^Drascula: The Vampire Strikes Back - audio addon (40 Mb)|http://sourceforge.net/projects/scummvm/files/extras/Drascula_%20The%20Vampire%20Strikes%20Back/drascula-audio-2.0.zip/download" +AppDataDownloadUrl="MIDI music support (30 Mb) - add soundfont in Options->MIDI|http://sourceforge.net/projects/libsdl-android/files/GeneralUser-GS-FluidSynth-v1.43.sf2.zip/download^Lure of the Temptress (English, 10 Mb)|http://sourceforge.net/projects/scummvm/files/extras/Lure%20of%20the%20Temptress/lure-1.1.zip/download^Lure of the Temptress (German, 10 Mb)|http://sourceforge.net/projects/scummvm/files/extras/Lure%20of%20the%20Temptress/lure-de-1.1.zip/download^Lure of the Temptress (French, 10 Mb)|http://sourceforge.net/projects/scummvm/files/extras/Lure%20of%20the%20Temptress/lure-fr-1.1.zip/download^Lure of the Temptress (Italian, 10 Mb)|http://sourceforge.net/projects/scummvm/files/extras/Lure%20of%20the%20Temptress/lure-it-1.1.zip/download^Lure of the Temptress (Spanish, 10 Mb)|http://sourceforge.net/projects/scummvm/files/extras/Lure%20of%20the%20Temptress/lure-es-1.1.zip/download^Beneath a Steel Sky (CD version, 70 Mb)|http://sourceforge.net/projects/scummvm/files/extras/Beneath%20a%20Steel%20Sky/bass-cd-1.2.zip/download^Beneath a Steel Sky (floppy version, 10 Mb)|http://sourceforge.net/projects/scummvm/files/extras/Beneath%20a%20Steel%20Sky/BASS-Floppy-1.3.zip/download^Flight of the Amazon Queen (23 Mb)|http://sourceforge.net/projects/scummvm/files/extras/Flight%20of%20the%20Amazon%20Queen/FOTAQ_Floppy.zip/download^Flight of the Amazon Queen - voice addon (English, 35 Mb)|http://sourceforge.net/projects/scummvm/files/extras/Flight%20of%20the%20Amazon%20Queen/FOTAQ_Talkie-1.1.zip/download^Flight of the Amazon Queen - voice addon (German, 80 Mb)|http://sourceforge.net/projects/scummvm/files/extras/Flight%20of%20the%20Amazon%20Queen/FOTAQ_Ger_talkie-1.0.zip/download^Flight of the Amazon Queen - voice addon (Hebrew, 70 Mb)|http://sourceforge.net/projects/scummvm/files/extras/Flight%20of%20the%20Amazon%20Queen/FOTAQ_Heb_talkie.zip/download^Drascula: The Vampire Strikes Back (35 Mb)|http://sourceforge.net/projects/scummvm/files/extras/Drascula_%20The%20Vampire%20Strikes%20Back/drascula-1.0.zip/download^Drascula: The Vampire Strikes Back - translations addon (35 Mb)|http://sourceforge.net/projects/scummvm/files/extras/Drascula_%20The%20Vampire%20Strikes%20Back/drascula-int-1.1.zip/download^Drascula: The Vampire Strikes Back - audio addon (40 Mb)|http://sourceforge.net/projects/scummvm/files/extras/Drascula_%20The%20Vampire%20Strikes%20Back/drascula-audio-2.0.zip/download^!ScummVM data|data1.zip^!ScummVM data|data2.zip" +VideoDepthBpp=16 +NeedDepthBuffer=n +NeedStencilBuffer=n +NeedGles2=n +SwVideoMode=y SdlVideoResize=y SdlVideoResizeKeepAspect=n -NeedDepthBuffer=n +CompatibilityHacks=n AppUsesMouse=y AppNeedsTwoButtonMouse=y +ForceRelativeMouseMode=n AppNeedsArrowKeys=n AppNeedsTextInput=n AppUsesJoystick=n @@ -21,14 +27,16 @@ RedefinedKeys="LALT RETURN ESCAPE F7 ESCAPE F5 F5 RETURN DELETE F7 F7" AppTouchscreenKeyboardKeysAmount=0 AppTouchscreenKeyboardKeysAmountAutoFire=0 RedefinedKeysScreenKb="LALT RETURN ESCAPE F7" +StartupMenuButtonTimeout=3000 +HiddenMenuOptions='' +FirstStartMenuOptions='' MultiABI=n -AppVersionCode=12102 -AppVersionName="1.2.1.02" +AppVersionCode=13102 +AppVersionName="1.3.1.02" CompiledLibraries="mad tremor flac ogg jpeg png fluidsynth" CustomBuildScript=y AppCflags='' AppLdflags='' AppSubdirsBuild='' -AppUseCrystaXToolchain=n AppCmdline='' ReadmeText='^You may press "Home" now - the data will be downloaded in background' diff --git a/project/jni/application/scummvm/AndroidData/data1.zip b/project/jni/application/scummvm/AndroidData/data1.zip new file mode 100644 index 000000000..f72688231 Binary files /dev/null and b/project/jni/application/scummvm/AndroidData/data1.zip differ diff --git a/project/jni/application/scummvm/AndroidData/data2.zip b/project/jni/application/scummvm/AndroidData/data2.zip new file mode 100644 index 000000000..eeb2a5995 Binary files /dev/null and b/project/jni/application/scummvm/AndroidData/data2.zip differ diff --git a/project/jni/application/scummvm/configure b/project/jni/application/scummvm/configure deleted file mode 100755 index 555967bfa..000000000 --- a/project/jni/application/scummvm/configure +++ /dev/null @@ -1,3008 +0,0 @@ -#!/bin/sh -# -# configure -- custom configure script for ScummVM. -# -# ScummVM is the legal property of its developers, whose names -# are too numerous to list here. Please refer to the COPYRIGHT -# file distributed with this source distribution. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License -# as published by the Free Software Foundation; either version 2 -# of the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -# -# $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/branches/branch-1-2-0/configure $ -# $Id: configure 53150 2010-10-11 19:54:55Z jvprat $ - -# Save the current environment variables for next runs -SAVED_CONFIGFLAGS=$@ -SAVED_LDFLAGS=$LDFLAGS -SAVED_CXX=$CXX -SAVED_CXXFLAGS=$CXXFLAGS -SAVED_CPPFLAGS=$CPPFLAGS -SAVED_ASFLAGS=$ASFLAGS -SAVED_WINDRESFLAGS=$WINDRESFLAGS - -# Use environment vars if set -CXXFLAGS="$CXXFLAGS $CPPFLAGS" - -# Backslashes into forward slashes: -# The following OS/2 specific code is performed to deal with handling of backslashes by ksh. -# Borrowed from the Sane configure script - -if test "$ac_emxsupport" != "no" -a "$ac_emxsupport" != "NO"; then - ac_save_IFS="$IFS" - IFS="\\" - ac_TEMP_PATH= - for ac_dir in $PATH; do - IFS=$ac_save_IFS - if test -z "$ac_TEMP_PATH"; then - ac_TEMP_PATH="$ac_dir" - else - ac_TEMP_PATH="$ac_TEMP_PATH/$ac_dir" - fi - done - PATH="$ac_TEMP_PATH" - export PATH - unset ac_TEMP_PATH -fi - -set_var() { - eval ${1}='${2}' -} - -get_var() { - eval echo \$${1} -} - -# Add an engine: id name build subengines -add_engine() { - _engines="${_engines} ${1}" - set_var _engine_${1}_name "${2}" - set_var _engine_${1}_build "${3}" - set_var _engine_${1}_subengines "${4}" - for sub in ${4}; do - set_var _engine_${sub}_sub "yes" - done -} - -add_engine scumm "SCUMM" yes "scumm_7_8 he" -add_engine scumm_7_8 "v7 & v8 games" yes -add_engine he "HE71+ games" yes -add_engine agi "AGI" yes -add_engine agos "AGOS" yes "agos2" -add_engine agos2 "AGOS 2 games" yes -add_engine cine "Cinematique evo 1" yes -add_engine cruise "Cinematique evo 2" yes -add_engine draci "Dragon History" yes -add_engine drascula "Drascula: The Vampire Strikes Back" yes -add_engine gob "Gobli*ns" yes -add_engine groovie "Groovie" yes "groovie2" -add_engine groovie2 "Groovie 2 games" no -add_engine hugo "Hugo Trilogy" no -add_engine kyra "Legend of Kyrandia" yes "lol" -add_engine lol "Lands of Lore" no -add_engine lure "Lure of the Temptress" yes -add_engine m4 "M4/MADS" no -add_engine made "MADE" yes -add_engine mohawk "Mohawk" no -add_engine parallaction "Parallaction" yes -add_engine queen "Flight of the Amazon Queen" yes -add_engine saga "SAGA" yes "ihnm saga2" -add_engine ihnm "IHNM" yes -add_engine saga2 "SAGA 2 games" no -add_engine sci "SCI" yes "sci32" -add_engine sci32 "SCI32 games" no -add_engine sky "Beneath a Steel Sky" yes -add_engine sword1 "Broken Sword" yes -add_engine sword2 "Broken Sword II" yes -add_engine teenagent "Teen Agent" yes -add_engine testbed "TestBed: the Testing framework" no -add_engine tinsel "Tinsel" yes -add_engine touche "Touche: The Adventures of the Fifth Musketeer" yes -add_engine tucker "Bud Tucker in Double Trouble" yes - - -# -# Default settings -# -# Default lib behaviour yes/no/auto -_vorbis=auto -_tremor=auto -_flac=auto -_mad=auto -_alsa=auto -_seq_midi=auto -_zlib=auto -_mpeg2=no -_fluidsynth=auto -_16bit=auto -_readline=auto -# Default option behaviour yes/no -_debug_build=auto -_release_build=auto -_text_console=no -_mt32emu=yes -_build_scalers=yes -_build_hq_scalers=yes -_indeo3=auto -_enable_prof=no -_unix=no -_global_constructors=no -# Default vkeybd/keymapper options -_vkeybd=no -_keymapper=no -# GUI translation options -_translation=yes -# Default platform settings -_backend=sdl -_endian=unknown -_need_memalign=no -_have_x86=no -_verbose_build=no -_dynamic_modules=no -_plugins_default=static -_nasm=auto -# Default commands -_ranlib=ranlib -_strip=strip -_ar="ar cru" -_as="as" -_windres=windres -_win32path="C:/scummvm" -_aos4path="Games:ScummVM" -_staticlibpath=/sw -_sdlconfig=sdl-config -_sdlpath="$PATH" -_nasmpath="$PATH" -NASMFLAGS="" -NASM="" - -# Directories for installing ScummVM. -# This list is closely based on what GNU autoconf does, -# although the default value for datadir differs. -# Like GNU autoconf, we distinguish datadir and datarootdir -# to make it possible to change e.g. the location of the -# man pages independently of that of the engine data files, -# which are placed inside $datadir/scummvm -prefix=NONE -exec_prefix=NONE -bindir='${exec_prefix}/bin' -libdir='${exec_prefix}/lib' -datarootdir='${prefix}/share' -datadir='${datarootdir}/scummvm' -mandir='${datarootdir}/man' -docdir='${datarootdir}/doc/scummvm' -#localedir='${datarootdir}/locale' - -# For cross compiling -_host="" -_host_cpu="" -_host_vendor="" -_host_os="" -_host_alias="" - -_srcdir=`dirname $0` -_port_mk="ports.mk" - -# Use temp files in the build directory -TMPO=./scummvm-conf -TMPC=${TMPO}.cpp -TMPLOG=config.log - -cc_check_no_clean() { - echo >> "$TMPLOG" - cat "$TMPC" >> "$TMPLOG" - echo >> "$TMPLOG" - echo "$CXX $LDFLAGS $CXXFLAGS $TMPC -o $TMPO$HOSTEXEEXT $@" >> "$TMPLOG" - rm -f "$TMPO$HOSTEXEEXT" - ( $CXX $LDFLAGS $CXXFLAGS "$TMPC" -o "$TMPO$HOSTEXEEXT" "$@" ) >> "$TMPLOG" 2>&1 - TMP="$?" - echo "return code: $TMP" >> "$TMPLOG" - echo >> "$TMPLOG" - return "$TMP" -} - -cc_check_clean() { - rm -rf $TMPC $TMPO $TMPO.o $TMPO.dSYM $TMPO$HOSTEXEEXT "$@" -} - -cc_check() { - cc_check_no_clean "$@" - TMP="$?" - cc_check_clean - return "$TMP" -} - -cc_check_define() { -cat > $TMPC << EOF -int main(void) { - #ifndef $1 - syntax error - #endif - return 0; -} -EOF - cc_check -c - return $? -} - -gcc_get_define() { - # Note: The AmigaOS compiler doesn't like the "-" input file, so a real file - # is used instead - rm -f $TMPC - touch $TMPC - $CXX -dM -E $TMPC | fgrep "$1" | head -n1 | cut -d ' ' -f 3- - rm -f $TMPC -} - -# -# Function to provide echo -n for bourne shells that don't have it -# -echo_n() { - printf "$@" -} - -echocheck() { - echo_n "Checking for $@... " -} - -# Add a line of data to config.mk. -add_line_to_config_mk() { - _config_mk_data="$_config_mk_data"' -'"$1" -} - -# Add a line of data to config.h. -add_line_to_config_h() { - _config_h_data="$_config_h_data"' -'"$1" -} - -# Conditionally add a line of data to config.h. Takes two parameters: -# The first one can be set to 'no' to "comment out" the line, i.e. -# make it ineffective, use 'yes' otherwise. -# The second param is the line to insert. -add_to_config_h_if_yes() { - if test "$1" = yes ; then - add_line_to_config_h "$2" - else - add_line_to_config_h "/* $2 */" - fi -} - -# Conditionally add a line of data to config.mk. Takes two parameters: -# The first one can be set to 'no' to "comment out" the line, i.e. -# make it ineffective, use 'yes' otherwise. -# The second param is the line to insert. -add_to_config_mk_if_yes() { - if test "$1" = yes ; then - add_line_to_config_mk "$2" - else - add_line_to_config_mk "# $2" - fi -} - -# Conditionally add a '#define' line to config.h. Takes two parameters: -# The first one can be set to 'yes' or 'no'. If 'yes' is used, then -# the line "#define $2" is added to config.h, otherwise "#undef $2". -define_in_config_h_if_yes() { - if test "$1" = yes ; then - add_line_to_config_h "#define $2" - else - add_line_to_config_h "#undef $2" - fi -} - -# Conditionally add definitions to config.h and config.mk. Takes two parameters: -# The first one can be set to 'yes' or 'no'. If 'yes' is used, then -# the line "#define $2" is added to config.h and "$2 = 1" to config.mk. -# Otherwise "#undef $2" is added to config.h and "# $2 = 1" to config.mk -define_in_config_if_yes() { - if test "$1" = yes ; then - add_line_to_config_h "#define $2" - add_line_to_config_mk "$2 = 1" - else - add_line_to_config_h "#undef $2" - add_line_to_config_mk "# $2 = 1" - fi -} - -# -# Determine sdl-config -# -# TODO: small bit of code to test sdl usability -find_sdlconfig() { - echo_n "Looking for sdl-config... " - sdlconfigs="$_sdlconfig:sdl-config:sdl11-config:sdl12-config" - _sdlconfig= - - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="$SEPARATOR" - for path_dir in $_sdlpath; do - #reset separator to parse sdlconfigs - IFS=":" - for sdlconfig in $sdlconfigs; do - if test -f "$path_dir/$sdlconfig" ; then - _sdlconfig="$path_dir/$sdlconfig" - echo $_sdlconfig - # Save the prefix - _sdlpath=$path_dir - if test `basename $path_dir` = bin ; then - _sdlpath=`dirname $path_dir` - fi - # break at first sdl-config found in path - break 2 - fi - done - done - - IFS="$ac_save_ifs" - - if test -z "$_sdlconfig"; then - echo "none found!" - exit 1 - fi -} - -# -# Determine extension used for executables -# -get_system_exe_extension() { - case $1 in - arm-riscos) - _exeext=",ff8" - ;; - dreamcast | ds | gamecube | n64 | ps2 | psp | wii) - _exeext=".elf" - ;; - gph-linux) - _exeext=".gph" - ;; - mingw* | *os2-emx | wince) - _exeext=".exe" - ;; - *) - _exeext="" - ;; - esac -} - -# -# Generic options functions -# - -# Show the configure help line for an option -option_help() { - tmpopt=`echo $1 | sed 's/_/-/g'` - option=`echo "--${tmpopt} " | sed "s/\(.\{23\}\).*/\1/"` - echo " ${option} ${2}" -} - -# Show an error about an unknown option -option_error() { - echo "error: unrecognised option: $ac_option -Try \`$0 --help' for more information." >&2 - exit 1 -} - - -# -# Engine handling functions -# - -# Get the name of the engine -get_engine_name() { - get_var _engine_$1_name -} - -# Will this engine be built? -get_engine_build() { - get_var _engine_$1_build -} - -# Get the subengines -get_engine_subengines() { - get_var _engine_$1_subengines -} - -# Ask if this is a subengine -get_engine_sub() { - sub=`get_var _engine_$1_sub` - if test -z "$sub" ; then - sub=no - fi - echo $sub -} - -# Enable *all* engines -engine_enable_all() { - for engine in $_engines; do - set_var _engine_${engine}_build "yes" - done -} - -# Disable *all* engines -engine_disable_all() { - for engine in $_engines; do - set_var _engine_${engine}_build "no" - done -} - -# Enable the given engine -engine_enable() { - # Get the parameter - if ( echo $1 | grep '=' ) 2> /dev/null > /dev/null ; then - eng=`echo $1 | cut -d '=' -f 1` - opt=`echo $1 | cut -d '=' -f 2` - else - eng=$1 - opt=yes - fi - engine=`echo $eng | sed 's/-/_/g'` - - # Filter the parameter for the subengines - if test "`get_engine_sub ${engine}`" != "no" -a "$opt" != "yes" ; then - option_error - return - fi - - if test "$opt" = "static" -o "$opt" = "dynamic" -o "$opt" = "yes" ; then - if test "`get_engine_name ${engine}`" != "" ; then - set_var _engine_${engine}_build "$opt" - else - option_error - fi - else - option_error - fi -} - -# Disable the given engine -engine_disable() { - # Filter malformed options - if ( echo $1 | grep '=' ) 2> /dev/null > /dev/null ; then - option_error - return - fi - - engine=`echo $1 | sed 's/-/_/g'` - if test "`get_engine_name ${engine}`" != "" ; then - set_var _engine_${engine}_build "no" - else - option_error - fi -} - -# Show the configure help line for a given engine -show_engine_help() { - if test `get_engine_build $1` = yes ; then - option="disable" - do="don't " - else - option="enable" - do="" - fi - name=`get_engine_name $1` - option_help ${option}-${1} "${do}build the ${name} engine" - for sub in `get_engine_subengines $1`; do - show_subengine_help $sub $1 - done -} - -# Show the configure help line for a given subengine -show_subengine_help() { - if test `get_engine_build $1` = yes ; then - option="disable" - do="exclude" - else - option="enable" - do="include" - fi - name=`get_engine_name $1` - parent=`get_engine_name $2` - option_help ${option}-${1} "${do} the ${name} in ${parent} engine" -} - -# Prepare the strings about the engines to build -prepare_engine_build_strings() { - string=`get_engine_build_string $1 static` - if test -n "$string" ; then - _engines_built_static="${_engines_built_static}#$string@" - fi - - string=`get_engine_build_string $1 dynamic` - if test -n "$string" ; then - _engines_built_dynamic="${_engines_built_dynamic}#$string@" - fi - - string=`get_engine_build_string $1 no` - if test -n "$string" ; then - _engines_skipped="${_engines_skipped}#$string@" - fi -} - -# Get the string about building an engine -get_engine_build_string() { - engine_string="" - engine_build=`get_engine_build $1` - show=no - - # Check if the current engine should be shown for the current status - if test $engine_build = $2 ; then - show=yes - else - # Test for disabled sub-engines - if test $2 = no ; then - for subeng in `get_engine_subengines $1` ; do - if test `get_engine_build $subeng` = no ; then - engine_build=no - show=yes - fi - done - fi - fi - - # Convert static/dynamic to yes to ease the check of subengines - if test $engine_build != no ; then - engine_build=yes - fi - - # The engine should be shown, build the string - if test $show = yes ; then - build_string_func=get_${1}_build_string - if ( type $build_string_func | grep function ) 2> /dev/null > /dev/null ; then - engine_string=`$build_string_func $1 $engine_build` - else - engine_string=`get_subengines_build_string $1 $engine_build` - fi - - engine_string="`get_engine_name $1` $engine_string" - fi - - echo $engine_string -} - -# Get the string about building subengines -get_subengines_build_string() { - all=yes - subengine_string=$3 - for subeng in `get_engine_subengines $1` ; do - if test `get_engine_build $subeng` = $2 ; then - subengine_string="$subengine_string [`get_engine_name $subeng`]" - else - all=no - fi - done - if test $2 != no ; then - if test -n "$subengine_string" ; then - if test $all = yes ; then - subengine_string="[all games]" - fi - fi - fi - - echo $subengine_string -} - -# Engine specific build strings -get_scumm_build_string() { - if test `get_engine_build $1` != no ; then - if test $2 != no ; then - base="[v0-v6 games]" - fi - get_subengines_build_string $1 $2 "$base" - fi -} - -get_saga_build_string() { - if test `get_engine_build $1` != no ; then - if test $2 != no ; then - base="[ITE]" - fi - get_subengines_build_string $1 $2 "$base" - fi -} - -# -# Greet user -# -echo "Running ScummVM configure..." -echo "Configure run on" `date` > $TMPLOG - -# -# Check any parameters we received -# -# TODO: -# * Change --disable-mad / --enable-mad to the way it's done in autoconf: -# That is, --without-mad / --with-mad=/prefix/to/mad. Useful for people -# who have Mad/Vorbis/ALSA installed in a non-standard locations. -# - -for parm in "$@" ; do - if test "$parm" = "--help" || test "$parm" = "-help" || test "$parm" = "-h" ; then - for engine in $_engines; do - if test `get_engine_sub $engine` = no ; then - engines_help="$engines_help`show_engine_help $engine` -" - fi - done - cat << EOF - -Usage: $0 [OPTIONS]... - -Configuration: - -h, --help display this help and exit - --backend=BACKEND backend to build (caanoo, dc, gp2x, gp2xwiz, iphone, - linuxmoto, ds, null, openpandora, ps2, psp, sdl, wii, - wince) - [sdl] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [/usr/local] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`/usr/local/bin', \`/usr/local/lib' etc. You can specify -an installation prefix other than \`/usr/local' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --libdir=DIR object code libraries [EPREFIX/lib] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data - [DATAROOTDIR/scummvm] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/scummvm] - -Special configuration feature: - --host=HOST cross-compile to target HOST (arm-linux, ...) - special targets: dreamcast for Sega Dreamcast - gamecube for Nintendo GameCube - iphone for Apple iPhone - linupy for Yopy PDA - ds for Nintendo DS - ps2 for PlayStation 2 - psp for PlayStation Portable - wii for Nintendo Wii - wince for Windows CE - -Game engines: - --enable-all-engines enable all engines - --disable-all-engines disable all engines -$engines_help -Optional Features: - --disable-debug disable building with debugging symbols - --enable-Werror treat warnings as errors - --enable-release enable building in release mode (this activates - optimizations) - --enable-profiling enable profiling - --enable-plugins enable the support for dynamic plugins - --default-dynamic make plugins dynamic by default - --disable-mt32emu don't enable the integrated MT-32 emulator - --disable-16bit don't enable 16bit color support - --disable-scalers exclude scalers - --disable-hq-scalers exclude HQ2x and HQ3x scalers - --disable-translation don't build support for translated messages - --enable-text-console use text console instead of graphical console - --enable-verbose-build enable regular echoing of commands during build - process - -Optional Libraries: - --with-alsa-prefix=DIR Prefix where alsa is installed (optional) - --disable-alsa disable ALSA midi sound support [autodetect] - - --with-ogg-prefix=DIR Prefix where libogg is installed (optional) - --with-vorbis-prefix=DIR Prefix where libvorbis is installed (optional) - --disable-vorbis disable Ogg Vorbis support [autodetect] - - --with-tremor-prefix=DIR Prefix where tremor is installed (optional) - --disable-tremor disable tremor support [autodetect] - - --with-mad-prefix=DIR Prefix where libmad is installed (optional) - --disable-mad disable libmad (MP3) support [autodetect] - - --with-flac-prefix=DIR Prefix where libFLAC is installed (optional) - --disable-flac disable FLAC support [autodetect] - - --with-zlib-prefix=DIR Prefix where zlib is installed (optional) - --disable-zlib disable zlib (compression) support [autodetect] - - --with-mpeg2-prefix=DIR Prefix where libmpeg2 is installed (optional) - --enable-mpeg2 enable mpeg2 codec for cutscenes [no] - - --disable-indeo3 disable Indeo3 decoder [autodetect] - - --with-fluidsynth-prefix=DIR Prefix where libfluidsynth is - installed (optional) - --disable-fluidsynth disable fluidsynth MIDI driver [autodetect] - - --with-sdl-prefix=DIR Prefix where the sdl-config script is - installed (optional) - - --with-nasm-prefix=DIR Prefix where nasm executable is installed (optional) - --disable-nasm disable assembly language optimizations [autodetect] - - --with-readline-prefix=DIR Prefix where readline is installed (optional) - --disable-readline disable readline support in text console [autodetect] - -Some influential environment variables: - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - CXX C++ compiler command - CXXFLAGS C++ compiler flags - CPPFLAGS C++ preprocessor flags, e.g. -I if you have - headers in a nonstandard directory - ASFLAGS assembler flags - WINDRESFLAGS Windows resource compiler flags - -EOF - exit 0 - fi -done # for parm in ... - -for ac_option in $@; do - case "$ac_option" in - --disable-16bit) _16bit=no ;; - --disable-scalers) _build_scalers=no ;; - --disable-hq-scalers) _build_hq_scalers=no ;; - --enable-alsa) _alsa=yes ;; - --disable-alsa) _alsa=no ;; - --enable-seq-midi) _seq_midi=yes ;; - --disable-seq-midi) _seq_midi=no ;; - --enable-vorbis) _vorbis=yes ;; - --disable-vorbis) _vorbis=no ;; - --enable-tremor) _tremor=yes ;; - --disable-tremor) _tremor=no ;; - --enable-flac) _flac=yes ;; - --disable-flac) _flac=no ;; - --enable-mad) _mad=yes ;; - --disable-mad) _mad=no ;; - --enable-zlib) _zlib=yes ;; - --disable-zlib) _zlib=no ;; - --enable-nasm) _nasm=yes ;; - --disable-nasm) _nasm=no ;; - --enable-mpeg2) _mpeg2=yes ;; - --disable-indeo3) _indeo3=no ;; - --enable-indeo3) _indeo3=yes ;; - --disable-fluidsynth) _fluidsynth=no ;; - --enable-readline) _readline=yes ;; - --disable-readline) _readline=no ;; - --enable-verbose-build) _verbose_build=yes ;; - --enable-plugins) _dynamic_modules=yes ;; - --default-dynamic) _plugins_default=dynamic ;; - --enable-mt32emu) _mt32emu=yes ;; - --disable-mt32emu) _mt32emu=no ;; - --enable-translation) _translation=yes ;; - --disable-translation) _translation=no ;; - --enable-vkeybd) _vkeybd=yes ;; - --disable-vkeybd) _vkeybd=no ;; - --enable-keymapper) _keymapper=yes ;; - --disable-keymapper) _keymapper=no ;; - --enable-text-console) _text_console=yes ;; - --disable-text-console) _text_console=no ;; - --with-fluidsynth-prefix=*) - arg=`echo $ac_option | cut -d '=' -f 2` - FLUIDSYNTH_CFLAGS="-I$arg/include" - FLUIDSYNTH_LIBS="-L$arg/lib" - ;; - --with-mpeg2-prefix=*) - arg=`echo $ac_option | cut -d '=' -f 2` - MPEG2_CFLAGS="-I$arg/include" - MPEG2_LIBS="-L$arg/lib" - ;; - --with-alsa-prefix=*) - arg=`echo $ac_option | cut -d '=' -f 2` - ALSA_CFLAGS="-I$arg/include" - ALSA_LIBS="-L$arg/lib" - ;; - --with-ogg-prefix=*) - arg=`echo $ac_option | cut -d '=' -f 2` - OGG_CFLAGS="-I$arg/include" - OGG_LIBS="-L$arg/lib" - ;; - --with-vorbis-prefix=*) - arg=`echo $ac_option | cut -d '=' -f 2` - VORBIS_CFLAGS="-I$arg/include" - VORBIS_LIBS="-L$arg/lib" - ;; - --with-tremor-prefix=*) - arg=`echo $ac_option | cut -d '=' -f 2` - TREMOR_CFLAGS="-I$arg/include" - TREMOR_LIBS="-L$arg/lib" - ;; - --with-flac-prefix=*) - arg=`echo $ac_option | cut -d '=' -f 2` - FLAC_CFLAGS="-I$arg/include" - FLAC_LIBS="-L$arg/lib" - ;; - --with-mad-prefix=*) - arg=`echo $ac_option | cut -d '=' -f 2` - MAD_CFLAGS="-I$arg/include" - MAD_LIBS="-L$arg/lib" - ;; - --with-zlib-prefix=*) - arg=`echo $ac_option | cut -d '=' -f 2` - ZLIB_CFLAGS="-I$arg/include" - ZLIB_LIBS="-L$arg/lib" - ;; - --with-readline-prefix=*) - arg=`echo $ac_option | cut -d '=' -f 2` - READLINE_CFLAGS="-I$arg/include" - READLINE_LIBS="-L$arg/lib" - ;; - --backend=*) - _backend=`echo $ac_option | cut -d '=' -f 2` - ;; - --enable-debug) - _debug_build=yes - ;; - --disable-debug) - _debug_build=no - ;; - --enable-Werror) - CXXFLAGS="$CXXFLAGS -Werror" - ;; - --enable-release) - _release_build=yes - ;; - --disable-release) - _release_build=no - ;; - --enable-profiling) - _enable_prof=yes - ;; - --with-sdl-prefix=*) - arg=`echo $ac_option | cut -d '=' -f 2` - _sdlpath="$arg:$arg/bin" - ;; - --with-nasm-prefix=*) - arg=`echo $ac_option | cut -d '=' -f 2` - _nasmpath="$arg:$arg/bin" - ;; - --with-staticlib-prefix=*) - _staticlibpath=`echo $ac_option | cut -d '=' -f 2` - ;; - --host=*) - _host=`echo $ac_option | cut -d '=' -f 2` - ;; - --prefix=*) - prefix=`echo $ac_option | cut -d '=' -f 2` - ;; - --exec-prefix=*) - exec_prefix=`echo $ac_option | cut -d '=' -f 2` - ;; - --bindir=*) - bindir=`echo $ac_option | cut -d '=' -f 2` - ;; - --libdir=*) - libdir=`echo $ac_option | cut -d '=' -f 2` - ;; - --datarootdir=*) - datarootdir=`echo $ac_option | cut -d '=' -f 2` - ;; - --datadir=*) - datadir=`echo $ac_option | cut -d '=' -f 2` - ;; - --mandir=*) - mandir=`echo $ac_option | cut -d '=' -f 2` - ;; - --docdir=*) - docdir=`echo $ac_option | cut -d '=' -f 2` - ;; - --enable-all-engines) - engine_enable_all - ;; - --disable-all-engines) - engine_disable_all - ;; - --enable-*) - engine_enable `echo $ac_option | cut -d '-' -f 4-` - ;; - --disable-*) - engine_disable `echo $ac_option | cut -d '-' -f 4-` - ;; - *) - option_error - ;; - esac; -done; - -guessed_host=`$_srcdir/config.guess` -get_system_exe_extension $guessed_host -NATIVEEXEEXT=$_exeext - -case $_host in -android) - _host_os=android - _host_cpu=arm - _host_alias=arm-oe-linux-androideabi - ;; -androidsdl) - _host_os=androidsdl - _host_cpu=arm - _host_alias=arm-eabi - ;; -arm-riscos) - _host_os=riscos - _host_cpu=arm - ;; -caanoo) - _host_os=gph-linux - _host_cpu=arm - _host_alias=arm-none-linux-gnueabi - if test "$_debug_build" = auto; then - # If you want to debug on the Caanoo use '--disable-release --enable-debug' - _debug_build=no - fi - - if test "$_release_build" = auto; then - # Enable release build by default. - _release_build=yes - fi - ;; -dingux) - _host_os=linux - _host_cpu=mipsel - _host_alias=mipsel-linux - ;; -dreamcast) - _host_os=dreamcast - _host_cpu=sh - _host_alias=sh-elf - CXXFLAGS="$CXXFLAGS -ml -m4-single-only" - LDFLAGS="$LDFLAGS -ml -m4-single-only" - ;; -ds) - _host_os=ds - _host_cpu=arm - _host_alias=arm-eabi - ;; -gamecube) - _host_os=gamecube - _host_cpu=ppc - _host_alias=powerpc-gekko - ;; -gp2x) - _host_os=gph-linux - _host_cpu=arm - _host_alias=arm-open2x-linux - if test "$_debug_build" = auto; then - # If you want to debug on the GP2X use '--disable-release --enable-debug' - _debug_build=no - fi - - if test "$_release_build" = auto; then - # Enable release build by default. - _release_build=yes - fi - ;; -gp2xwiz) - _host_os=gph-linux - _host_cpu=arm - _host_alias=arm-open2x-linux - if test "$_debug_build" = auto; then - # If you want to debug on the GP2XWiz use '--disable-release --enable-debug' - _debug_build=no - fi - - if test "$_release_build" = auto; then - # Enable release build by default. - _release_build=yes - fi - ;; -i586-mingw32msvc) - _host_os=mingw32msvc - _host_cpu=i586 - ;; -iphone) - _host_os=iphone - _host_cpu=arm - _host_alias=arm-apple-darwin9 - ;; -linupy) - _host_os=linux - _host_cpu=arm - ;; -motoezx) - _host_os=linux - _host_cpu=arm - _host_alias=arm-linux-gnu - ;; -motomagx) - _host_os=linux - _host_cpu=arm - _host_alias=arm-linux-gnueabi - ;; -n64) - _host_os=n64 - _host_cpu=mips - _host_alias=mips64 - ;; -neuros) - _host_os=linux - _host_cpu=arm - ;; -openpandora) - _host_os=linux - _host_cpu=arm - _host_alias=arm-angstrom-linux-gnueabi - if test "$_debug_build" = auto; then - # If you want to debug on the OP use '--disable-release --enable-debug' - _debug_build=no - fi - - if test "$_release_build" = auto; then - # Enable release build by default. - _release_build=yes - fi - ;; -ppc-amigaos) - _host_os=amigaos - _host_cpu=ppc - ;; -ps2) - _host_os=ps2 - _host_cpu=mips64r5900el - _host_alias=ee - if test "$_debug_build" = auto; then - # Disable debug mode by default. The resulting binaries are far too big in general, - # and one has to disable multiple engines to make it usable. - _debug_build=no - fi - - if test "$_release_build" = auto; then - # Enable release build by default. - _release_build=yes - fi - ;; -psp) - _host_os=psp - _host_cpu=mipsallegrexel - _host_alias=psp - if test -z "$PSPDEV"; then - PSPDEV=`psp-config --pspdev-path` - fi - if test -d "$PSPDEV/psp/lib"; then - LDFLAGS="$LDFLAGS -L$PSPDEV/psp/lib" - fi - LDFLAGS="$LDFLAGS -L$PSPDEV/psp/sdk/lib -specs=$_srcdir/backends/platform/psp/psp.spec" - ;; -samsungtv) - _host_os=linux - _host_cpu=arm - _host_alias=arm-linux-gnueabi - ;; -wii) - _host_os=wii - _host_cpu=ppc - _host_alias=powerpc-gekko - ;; -wince) - _host_os=wince - _host_cpu=arm - _host_alias=arm-wince-mingw32ce - ;; -*) - if test -n "$_host"; then - guessed_host=`$_srcdir/config.sub $_host` - fi - _host_cpu=`echo $guessed_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` - _host_vendor=`echo $guessed_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` - _host_os=`echo $guessed_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - ;; -esac - -if test -z "$_host_alias"; then - _host_alias="$_host_cpu-$_host_os" -else - # if _host_alias was set, default to the standard GNU tools - _ranlib=$_host_alias-ranlib - _strip=$_host_alias-strip - _ar="$_host_alias-ar cru" - _as="$_host_alias-as" - _windres=$_host_alias-windres -fi - -# -# Determine extra build flags for debug and/or release builds -# - -if test "$_debug_build" != no; then - # debug mode not explicitly disabled -> compile with -g - CXXFLAGS="$CXXFLAGS -g" -fi - -if test "$_release_build" = yes; then - # Release mode enabled: enable optimizations. This also - # makes it possible to use -Wuninitialized, so let's do that. - # We will also add a define, which indicates we are doing - # an build for a release version. - CXXFLAGS="$CXXFLAGS -O2 -Wuninitialized -DRELEASE_BUILD" -fi - - -# -# Determine extension used for executables -# -get_system_exe_extension $_host_os -HOSTEXEEXT=$_exeext - -# -# Determine separator used for $PATH -# -case $_host_os in -os2-emx* ) - SEPARATOR=";" - ;; -* ) - SEPARATOR=":" - ;; -esac - -# -# Platform specific sanity checks -# -case $_host_os in -android) - if test -z "$ANDROID_SDK"; then - echo "Please set ANDROID_SDK in your environment. export ANDROID_SDK=" - exit 1 - fi - ;; -ds | gamecube | wii) - if test -z "$DEVKITPRO"; then - echo "Please set DEVKITPRO in your environment. export DEVKITPRO=" - exit 1 - fi - ;; -n64) - if test -z "$N64SDK"; then - echo "Please set N64SDK in your environment. export N64SDK=" - exit 1 - fi - ;; -ps2) - if test -z "$PS2SDK"; then - echo "Please set PS2SDK in your environment. export PS2SDK=" - exit 1 - fi - ;; -psp) - PSPSDK=`psp-config --pspsdk-path` - if test -z "$PSPSDK"; then - echo "Please set the path to PSPSDK in your environment." - exit 1 - fi - ;; -*) - ;; -esac - -# -# Determine the C++ compiler -# -echo_n "Looking for C++ compiler... " - -# Check whether the given command is a working C++ compiler -test_compiler() { - cat > tmp_cxx_compiler.cpp << EOF - class Foo { int a; }; - int main(int argc, char **argv) { - Foo *a = new Foo(); delete a; return 0; - } -EOF - - echo "testing compiler: $1" >> "$TMPLOG" - - if test -n "$_host"; then - # In cross-compiling mode, we cannot run the result - eval "$1 $CXXFLAGS $LDFLAGS -o $TMPO.o -c tmp_cxx_compiler.cpp" 2> /dev/null && cc_check_clean tmp_cxx_compiler.cpp - else - eval "$1 $CXXFLAGS $LDFLAGS -o $TMPO$HOSTEXEEXT tmp_cxx_compiler.cpp" 2> /dev/null && eval "$TMPO$HOSTEXEEXT 2> /dev/null" && cc_check_clean tmp_cxx_compiler.cpp - fi -} - -# Prepare a list of candidates for the C++ compiler -if test -n "$CXX" && test_compiler "$CXX"; then - # Use the compiler specified in CXX - echo $CXX -else - if test -n "$_host"; then - compilers="$_host_alias-g++ $_host_alias-c++ $_host-g++ $_host-c++" - else - compilers="g++ c++" - fi - - # Iterate over all candidates, pick the first working one - CXX= - for compiler in $compilers; do - if test_compiler $compiler; then - echo "success testing compiler: $compiler" >> "$TMPLOG" - CXX=$compiler - echo $CXX - break - else - echo "failure testing compiler: $compiler" >> "$TMPLOG" - fi - done -fi - -if test -z "$CXX"; then - echo "none found!" - exit 1 -fi - -# By default, use the C++ compiler as linker -LD=$CXX - -# -# Determine the compiler version -# -echocheck "compiler version" - -have_gcc=no -cc_check_define __GNUC__ && have_gcc=yes - -if test "$have_gcc" = yes; then - add_line_to_config_mk 'HAVE_GCC = 1' - _cxx_major=`gcc_get_define __GNUC__` - _cxx_minor=`gcc_get_define __GNUC_MINOR__` - cxx_version="`( $CXX -dumpversion ) 2>&1`" - - if test -n "`gcc_get_define __clang__`"; then - add_line_to_config_mk 'HAVE_CLANG = 1' - fi - - if test "$_cxx_major" -eq 2 && test "$_cxx_minor" -ge 95 || \ - test "$_cxx_major" -gt 2 ; then - cxx_version="$cxx_version, ok" - cxx_verc_fail=no - else - cxx_version="$cxx_version, bad" - cxx_verc_fail=yes - fi -else - # TODO: Big scary warning about unsupported compilers - cxx_version=`( $CXX -version ) 2>&1` - if test "$?" -eq 0; then - cxx_version="`echo "${cxx_version}" | sed -ne 's/^.*[^0-9]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*$/\1/gp'`" - if test -z "${cxx_version}"; then - cxx_version="not found" - cxx_verc_fail=yes - fi - echo non-gcc compiler version ${cxx_version} - else - cxx_version="not found" - cxx_verc_fail=yes - echo found non-gcc compiler version ${cxx_version} - fi - - case $_host_os in - irix*) - case $cxx_version in - 7.4.4*) - # We just assume this is SGI MIPSpro - _cxx_major=7 - _cxx_minor=4 - cxx_verc_fail=no - add_line_to_config_mk 'CXX_UPDATE_DEP_FLAG = -MDupdate "$(*D)/$(DEPDIR)/$(*F).d"' - add_line_to_config_mk '-include Makedepend' - ;; - *) - cxx_version="$cxx_version, bad" - cxx_verc_fail=yes - ;; - esac - ;; - *) - cxx_version="$cxx_version, bad" - cxx_verc_fail=yes - ;; - esac -fi - -echo "$cxx_version" - -if test "$cxx_verc_fail" = yes ; then - echo - echo "The version of your compiler is not supported at this time" - echo "Please ensure you are using GCC >= 2.95" - exit 1 -fi - -echocheck "whether -Wglobal-constructors work" -cat > $TMPC << EOF -int main() { return 0; } -EOF -cc_check -Wglobal-constructors && _global_constructors=yes - -if test "$_global_constructors" = yes; then - CXXFLAGS="$CXXFLAGS -Wglobal-constructors" -fi -echo $_global_constructors - -# -# Check for endianness -# -echo_n "Checking endianness... " -cat > tmp_endianness_check.cpp << EOF -short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; -short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; -void _ascii() { char* s = (char*) ascii_mm; s = (char*) ascii_ii; } -short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; -short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; -void _ebcdic() { char* s = (char*) ebcdic_mm; s = (char*) ebcdic_ii; } -int main() { _ascii (); _ebcdic (); return 0; } -EOF -$CXX $CXXFLAGS -c -o $TMPO.o tmp_endianness_check.cpp -if strings $TMPO.o | grep BIGenDianSyS >/dev/null; then - _endian=big -else - _endian=little -fi -echo $_endian; -cc_check_clean tmp_endianness_check.cpp - -# -# Determine a data type with the given length -# -find_type_with_size() { - for datatype in int short char long unknown; do - cat > tmp_find_type_with_size.cpp << EOF -typedef $datatype ac__type_sizeof_; -int main() { - static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) == $1)]; - test_array [0] = 0; - return 0; -} -EOF - if $CXX $CXXFLAGS -c -o $TMPO.o tmp_find_type_with_size.cpp 2>/dev/null ; then - break - else - if test "$datatype" = "unknown"; then - echo "couldn't find data type with $1 bytes" - exit 1 - fi - continue - fi - done - cc_check_clean tmp_find_type_with_size.cpp - echo $datatype -} - -# -# Determine data type sizes -# -echo_n "Type with 1 byte... " -type_1_byte=`find_type_with_size 1` -TMP="$?" -echo "$type_1_byte" -test $TMP -eq 0 || exit 1 # check exit code of subshell - -echo_n "Type with 2 bytes... " -type_2_byte=`find_type_with_size 2` -TMP="$?" -echo "$type_2_byte" -test $TMP -eq 0 || exit 1 # check exit code of subshell - -echo_n "Type with 4 bytes... " -type_4_byte=`find_type_with_size 4` -TMP="$?" -echo "$type_4_byte" -test $TMP -eq 0 || exit 1 # check exit code of subshell - -# -# Check whether we can use x86 asm routines -# -echo_n "Compiling for x86... " -case $_host_cpu in - i386|i486|i586|i686) - _have_x86=yes - ;; - *) - _have_x86=no - ;; -esac -echo "$_have_x86" - -# -# Determine build settings -# -echo_n "Checking hosttype... " -echo $_host_os -case $_host_os in - amigaos*) - CXXFLAGS="$CXXFLAGS -mcrt=newlib -mstrict-align -mcpu=750 -mtune=7400" - LDFLAGS="$LDFLAGS -mcrt=newlib -use-dynld -LSDK:Local/newib/lib" - # We have to use 'long' for our 4 byte typedef because AmigaOS already typedefs (u)int32 - # as (unsigned) long, and consequently we'd get a compiler error otherwise. - type_4_byte='long' - ;; - android) - CXXFLAGS="$CXXFLAGS -Os -msoft-float -mtune=xscale -march=armv5te -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5TE__" - add_line_to_config_mk "ANDROID_SDK = $ANDROID_SDK" - _unix=yes - _seq_midi=no - ;; - androidsdl) - CXXFLAGS="$CXXFLAGS -Os" - _unix=yes - _seq_midi=no - ;; - beos*) - DEFINES="$DEFINES -DSYSTEM_NOT_SUPPORTING_D_TYPE" - # Needs -lbind -lsocket for the timidity MIDI driver - LDFLAGS="-L/boot/home/config/lib" - CFLAGS="-I/boot/home/config/include" - CXXFLAGS="$CXXFLAGS -fhuge-objects" - LIBS="$LIBS -lbind -lsocket" - _unix=yes - _seq_midi=no - ;; - bsd* | hpux* | netbsd* | openbsd* | sunos*) - _unix=yes - ;; - cygwin*) - echo ERROR: Cygwin building is not supported by ScummVM anymore. Consider using MinGW. - exit 1 - ;; - darwin*) - DEFINES="$DEFINES -DMACOSX" - LIBS="$LIBS -framework AudioUnit -framework AudioToolbox -framework Carbon -framework CoreMIDI" - add_line_to_config_mk 'MACOSX = 1' - _unix=yes - ;; - dreamcast) - DEFINES="$DEFINES -D__DC__ -DNONSTANDARD_PORT" - ;; - ds) - # TODO Nintendo DS - DEFINES="$DEFINES -D__DS__ -DNDS -DARM9 -DARM -DNONSTANDARD_PORT" - CXXFLAGS="$CXXFLAGS -isystem $DEVKITPRO/libnds/include -isystem $DEVKITPRO/devkitARM/arm-eabi/include" - CXXFLAGS="$CXXFLAGS -mcpu=arm9tdmi -mtune=arm9tdmi -fomit-frame-pointer -mthumb-interwork" - CXXFLAGS="$CXXFLAGS -ffunction-sections -fdata-sections -fno-strict-aliasing" - LDFLAGS="$LDFLAGS -specs=ds_arm9.specs -mthumb-interwork -mno-fpu -Wl,-Map,map.txt -Wl,--gc-sections" - LDFLAGS="$LDFLAGS -L$DEVKITPRO/libnds/lib" - LIBS="$LIBS -lnds9" - ;; - freebsd*) - LDFLAGS="$LDFLAGS -L/usr/local/lib" - CXXFLAGS="$CXXFLAGS -I/usr/local/include" - _unix=yes - ;; - gamecube) - CXXFLAGS="$CXXFLAGS -Os -mogc -mcpu=750 -meabi -mhard-float" - CXXFLAGS="$CXXFLAGS -ffunction-sections -fdata-sections -fmodulo-sched" - CXXFLAGS="$CXXFLAGS -I$DEVKITPRO/libogc/include" - # libogc is required to link the cc tests (includes _start()) - LDFLAGS="$LDFLAGS -mogc -mcpu=750 -L$DEVKITPRO/libogc/lib/cube -logc" - ;; - haiku*) - DEFINES="$DEFINES -DSYSTEM_NOT_SUPPORTING_D_TYPE" - # Needs -lnetwork for the timidity MIDI driver - LIBS="$LIBS -lnetwork" - CXXFLAGS="$CXXFLAGS -fhuge-objects" - _unix=yes - _seq_midi=no - ;; - irix*) - DEFINES="$DEFINES -DIRIX -DSYSTEM_NOT_SUPPORTING_D_TYPE" - LIBS="$LIBS -lmd -lfastm -lm" - _ranlib=: - _unix=yes - ;; - linux* | uclinux*) - # When not cross-compiling, enable large file support, but don't - # care if getconf doesn't exist or doesn't recognize LFS_CFLAGS. - if test -z "$_host"; then - CXXFLAGS="$CXXFLAGS $(getconf LFS_CFLAGS 2>/dev/null)" - fi - _unix=yes - ;; - mingw*) - DEFINES="$DEFINES -DWIN32 -D__USE_MINGW_ANSI_STDIO=0" - LIBS="$LIBS -lmingw32 -lwinmm" - OBJS="$OBJS scummvmico.o" - ;; - mint*) - DEFINES="$DEFINES -DSYSTEM_NOT_SUPPORTING_D_TYPE" - _unix=yes - ;; - n64) - DEFINES="$DEFINES -D__N64__ -DLIMIT_FPS -DNONSTANDARD_PORT" - DEFINES="$DEFINES -DDISABLE_DEFAULT_SAVEFILEMANAGER -DDISABLE_COMMAND_LINE" - DEFINES="$DEFINES -DDISABLE_FANCY_THEMES -DDISABLE_DOSBOX_OPL -DDISABLE_SID -DDISABLE_NES_APU" - DEFINES="$DEFINES -DREDUCE_MEMORY_USAGE" - ;; - os2-emx*) - _unix=yes # FIXME??? Why?? - ;; - ps2) - # TODO ps2 - CXXFLAGS="$CXXFLAGS -G2" - DEFINES="$DEFINES -D_EE -D__PLAYSTATION2__" - ;; - psp) - CXXFLAGS="$CXXFLAGS -O3 -I$PSPSDK/include -D_PSP_FW_VERSION=150" - ;; - solaris*) - DEFINES="$DEFINES -DSOLARIS -DSYSTEM_NOT_SUPPORTING_D_TYPE" - # Needs -lbind -lsocket for the timidity MIDI driver - LIBS="$LIBS -lnsl -lsocket" - _unix=yes - ;; - wii) - CXXFLAGS="$CXXFLAGS -Os -mrvl -mcpu=750 -meabi -mhard-float" - CXXFLAGS="$CXXFLAGS -ffunction-sections -fdata-sections -fmodulo-sched" - CXXFLAGS="$CXXFLAGS -I$DEVKITPRO/libogc/include" - # libogc is required to link the cc tests (includes _start()) - LDFLAGS="$LDFLAGS -mrvl -mcpu=750 -L$DEVKITPRO/libogc/lib/wii -logc" - ;; - wince) - CXXFLAGS="$CXXFLAGS -O3 -march=armv4 -mtune=xscale" - DEFINES="$DEFINES -D_WIN32_WCE=300 -D__ARM__ -D_ARM_ -DUNICODE -DFPM_DEFAULT -DNONSTANDARD_PORT" - DEFINES="$DEFINES -DWIN32 -Dcdecl= -D__cdecl__=" - ;; - # given this is a shell script assume some type of unix - *) - echo "WARNING: could not establish system type, assuming unix like" - _unix=yes - ;; -esac - -if test -n "$_host"; then - # Cross-compiling mode - add your target here if needed - echo "Cross-compiling to $_host" - case "$_host" in - android) - DEFINES="$DEFINES -DANDROID -DUSE_ARM_SMUSH_ASM" - _unix=yes - _need_memalign=yes - add_line_to_config_mk 'USE_ARM_SOUND_ASM = 1' - add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1' - add_line_to_config_mk 'USE_ARM_GFX_ASM = 1' - add_line_to_config_mk 'USE_ARM_SCALER_ASM = 1' - add_line_to_config_mk 'USE_ARM_COSTUME_ASM = 1' - _backend="android" - _port_mk="backends/platform/android/android.mk" - _seq_midi=no - ;; - androidsdl) - DEFINES="$DEFINES -DANDROID" - _unix=yes - _need_memalign=yes - _seq_midi=no - ;; - arm-linux|arm*-linux-gnueabi|arm-*-linux) - _unix=yes - _need_memalign=yes - add_line_to_config_mk 'USE_ARM_SOUND_ASM = 1' - add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1' - add_line_to_config_mk 'USE_ARM_GFX_ASM = 1' - add_line_to_config_mk 'USE_ARM_COSTUME_ASM = 1' - add_line_to_config_mk 'USE_ARM_SCALER_ASM = 1' - ;; - arm-riscos|linupy) - DEFINES="$DEFINES -DLINUPY" - _unix=yes - _need_memalign=yes - ;; - bfin*) - _need_memalign=yes - ;; - caanoo) - DEFINES="$DEFINES -DCAANOO -DREDUCE_MEMORY_USAGE" - # Disable DOSBOX OPL for now. - DEFINES="$DEFINES -DDISABLE_DOSBOX_OPL" - if test "$_debug_build" = yes; then - DEFINES="$DEFINES -DGPH_DEBUG" - else - # Use -O3 on the Caanoo for non-debug builds. - CXXFLAGS="$CXXFLAGS -O3" - fi - CXXFLAGS="$CXXFLAGS -mcpu=arm926ej-s -mtune=arm926ej-s" - ASFLAGS="$ASFLAGS" - _unix=yes - _need_memalign=yes - add_line_to_config_mk 'USE_ARM_SOUND_ASM = 1' - add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1' - add_line_to_config_mk 'USE_ARM_GFX_ASM = 1' - add_line_to_config_mk 'USE_ARM_COSTUME_ASM = 1' - add_line_to_config_mk 'USE_ARM_SCALER_ASM = 1' - _backend="gph" - _build_hq_scalers=no - _mt32emu=no - _vkeybd=yes - _seq_midi=no - _port_mk="backends/platform/gph/caanoo-bundle.mk" - ;; - *darwin*) - _ranlib=$_host-ranlib - _strip=$_host-strip - ;; - dingux) - DEFINES="$DEFINES -DUNIX -DDINGUX -DDISABLE_DOSBOX_OPL -DREDUCE_MEMORY_USAGE" - ASFLAGS="$ASFLAGS" - CXXFLAGS="$CXXFLAGS -msoft-float -mips32" - _need_memalign=yes - _backend="dingux" - _mt32emu=no - _vkeybd=yes - _build_hq_scalers=no - _keymapper=no - # Force disable vorbis on dingux, it has terrible performance compared to tremor - _vorbis=no - # Force disable seq on dingux, no way to use it and it would get enabled by default with configure - _seq_midi=no - _port_mk="backends/platform/dingux/dingux.mk" - ;; - dreamcast) - DEFINES="$DEFINES -DDISABLE_DEFAULT_SAVEFILEMANAGER -DDISABLE_TEXT_CONSOLE -DDISABLE_COMMAND_LINE -DNOSERIAL" - CXXFLAGS="$CXXFLAGS -O3 -funroll-loops -fschedule-insns2 -fomit-frame-pointer -fdelete-null-pointer-checks" - _need_memalign=yes - _backend="dc" - _build_scalers=no - _mad=yes - _zlib=yes - add_line_to_config_mk 'ronindir = /usr/local/ronin' - _port_mk="backends/platform/dc/dreamcast.mk" - ;; - ds) - # TODO: complete this - DEFINES="$DEFINES -DDISABLE_FANCY_THEMES -DVECTOR_RENDERER_FORMAT=1555" - DEFINES="$DEFINES -DDISABLE_DEFAULT_SAVEFILEMANAGER" - DEFINES="$DEFINES -DREDUCE_MEMORY_USAGE -DSTREAM_AUDIO_FROM_DISK" - DEFINES="$DEFINES -DDISABLE_DOSBOX_OPL -DDISABLE_SID -DDISABLE_NES_APU" - DEFINES="$DEFINES -DDISABLE_COMMAND_LINE" - _need_memalign=yes - add_line_to_config_mk 'USE_ARM_SOUND_ASM = 1' - add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1' - add_line_to_config_mk 'USE_ARM_GFX_ASM = 1' - add_line_to_config_mk 'USE_ARM_COSTUME_ASM = 1' - add_line_to_config_mk 'USE_ARM_SCALER_ASM = 1' - add_line_to_config_h '#define DISABLE_TEXT_CONSOLE' - _backend="ds" - _build_scalers=no - _mt32emu=no - _port_mk="backends/platform/ds/ds.mk" - ;; - gamecube) - _endian=big - _need_memalign=yes - _backend="wii" - _build_scalers=no - _mt32emu=no - _port_mk="backends/platform/wii/wii.mk" - add_line_to_config_mk 'GAMECUBE = 1' - add_line_to_config_h '#define AUDIO_REVERSE_STEREO' - add_line_to_config_h '#define GAMECUBE' - add_line_to_config_h "/* #define DEBUG_WII_USBGECKO */" - add_line_to_config_h "/* #define DEBUG_WII_MEMSTATS */" - add_line_to_config_h "/* #define DEBUG_WII_GDB */" - add_line_to_config_h "#define USE_WII_DI" - ;; - gp2x) - DEFINES="$DEFINES -DGP2X -DREDUCE_MEMORY_USAGE" - # Disable DOSBOX OPL for now. - DEFINES="$DEFINES -DDISABLE_DOSBOX_OPL" - if test "$_debug_build" = yes; then - DEFINES="$DEFINES -DGPH_DEBUG" - fi - CXXFLAGS="$CXXFLAGS -march=armv4t" - ASFLAGS="$ASFLAGS -mfloat-abi=soft" - LDFLAGS="$LDFLAGS -static" - _unix=yes - _need_memalign=yes - add_line_to_config_mk 'USE_ARM_SOUND_ASM = 1' - add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1' - add_line_to_config_mk 'USE_ARM_GFX_ASM = 1' - add_line_to_config_mk 'USE_ARM_COSTUME_ASM = 1' - add_line_to_config_mk 'USE_ARM_SCALER_ASM = 1' - _backend="gp2x" - _build_hq_scalers=no - _mt32emu=no - _vkeybd=yes - _seq_midi=no - _port_mk="backends/platform/gp2x/gp2x-bundle.mk" - ;; - gp2xwiz) - DEFINES="$DEFINES -DGP2XWIZ -DREDUCE_MEMORY_USAGE" - # Disable DOSBOX OPL for now. - DEFINES="$DEFINES -DDISABLE_DOSBOX_OPL" - if test "$_debug_build" = yes; then - DEFINES="$DEFINES -DGPH_DEBUG" - fi - CXXFLAGS="$CXXFLAGS -mcpu=arm926ej-s -mtune=arm926ej-s" - ASFLAGS="$ASFLAGS -mfloat-abi=soft" - _unix=yes - _need_memalign=yes - add_line_to_config_mk 'USE_ARM_SOUND_ASM = 1' - add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1' - add_line_to_config_mk 'USE_ARM_GFX_ASM = 1' - add_line_to_config_mk 'USE_ARM_COSTUME_ASM = 1' - add_line_to_config_mk 'USE_ARM_SCALER_ASM = 1' - _backend="gph" - _build_hq_scalers=no - _mt32emu=no - _vkeybd=yes - _seq_midi=no - _port_mk="backends/platform/gph/gp2xwiz-bundle.mk" - ;; - iphone) - DEFINES="$DEFINES -DIPHONE" - _unix=yes - _need_memalign=yes - add_line_to_config_mk 'USE_ARM_SOUND_ASM = 1' - add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1' - _backend="iphone" - _build_hq_scalers=no - _seq_midi=no - ;; - m68k-atari-mint) - DEFINES="$DEFINES -DSYSTEM_NOT_SUPPORTING_D_TYPE" - _unix=yes - _endian=big - _need_memalign=yes - _ranlib=m68k-atari-mint-ranlib - _ar="m68k-atari-mint-ar cru" - _seq_midi=no - ;; - *mingw32*) - _sdlconfig=$_host-sdl-config - _windres=$_host-windres - _ar="$_host-ar cru" - _ranlib=$_host-ranlib - ;; - mips-sgi*) - _endian=big - _need_memalign=yes - ;; - motoezx) - DEFINES="$DEFINES -DMOTOEZX" - ASFLAGS="$ASFLAGS -mfpu=vfp" - _unix=yes - _need_memalign=yes - add_line_to_config_mk 'USE_ARM_SOUND_ASM = 1' - add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1' - add_line_to_config_mk 'USE_ARM_GFX_ASM = 1' - add_line_to_config_mk 'USE_ARM_COSTUME_ASM = 1' - add_line_to_config_mk 'USE_ARM_SCALER_ASM = 1' - _backend="linuxmoto" - _build_hq_scalers=no - _mt32emu=no - _vkeybd=yes - _seq_midi=no - _port_mk="backends/platform/linuxmoto/linuxmoto.mk" - ;; - motomagx) - DEFINES="$DEFINES -DMOTOMAGX" - ASFLAGS="$ASFLAGS -mfpu=vfp" - _unix=yes - _need_memalign=yes - add_line_to_config_mk 'USE_ARM_SOUND_ASM = 1' - add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1' - add_line_to_config_mk 'USE_ARM_GFX_ASM = 1' - add_line_to_config_mk 'USE_ARM_COSTUME_ASM = 1' - add_line_to_config_mk 'USE_ARM_SCALER_ASM = 1' - _backend="linuxmoto" - _build_hq_scalers=no - _mt32emu=no - _vkeybd=yes - _seq_midi=no - _port_mk="backends/platform/linuxmoto/linuxmoto.mk" - ;; - n64) - CXXFLAGS="$CXXFLAGS -mno-extern-sdata --param max-inline-insns-auto=20 -fomit-frame-pointer" - CXXFLAGS="$CXXFLAGS -march=vr4300 -mtune=vr4300 -mhard-float" - LDFLAGS="$LDFLAGS -march=vr4300 -mtune=vr4300 -nodefaultlibs -nostartfiles -mno-crt0" - LDFLAGS="$LDFLAGS -L$N64SDK/hkz-libn64 -L$N64SDK/lib" - LDFLAGS="$LDFLAGS -T n64ld_cpp.x -Xlinker -Map -Xlinker scummvm.map" - _backend="n64" - _need_memalign=yes - _mt32emu=no - _build_scalers=no - _indeo3=no - _translation=no - _keymapper=no - _text_console=no - _vkeybd=yes - _dynamic_modules=no - _plugins_default=static - # Force use of libmad, libtremor and zlib - _mad=yes - _tremor=yes - _zlib=yes - _port_mk="backends/platform/n64/n64.mk" - ;; - neuros) - DEFINES="$DEFINES -DNEUROS" - _unix=yes - _need_memalign=yes - _backend='null' - _build_hq_scalers=no - _mt32emu=no - ;; - openpandora) - DEFINES="$DEFINES -DOPENPANDORA -DREDUCE_MEMORY_USAGE" - # Disable DOSBOX OPL for now. - DEFINES="$DEFINES -DDISABLE_DOSBOX_OPL" - if test "$_release_build" = no; then - DEFINES="$DEFINES -DOP_DEBUG" - else - # Use -O3 on the OpenPandora for non-debug builds. - CXXFLAGS="$CXXFLAGS -O3" - fi - CXXFLAGS="$CXXFLAGS -march=armv7-a -mtune=cortex-a8 -mfpu=neon" - ASFLAGS="$ASFLAGS -mfloat-abi=soft" - _unix=yes - _need_memalign=yes - add_line_to_config_mk 'USE_ARM_SOUND_ASM = 1' - add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1' - add_line_to_config_mk 'USE_ARM_GFX_ASM = 1' - add_line_to_config_mk 'USE_ARM_COSTUME_ASM = 1' - add_line_to_config_mk 'USE_ARM_SCALER_ASM = 1' - _backend="openpandora" - _build_hq_scalers=yes - _mt32emu=no - _vkeybd=no - _seq_midi=no - _port_mk="backends/platform/openpandora/op-bundle.mk" - ;; - ppc-amigaos) - _endian=big - _need_memalign=yes - ;; - ps2) - # TODO: complete this - DEFINES="$DEFINES -DDISABLE_TEXT_CONSOLE -DDISABLE_COMMAND_LINE -DDISABLE_DOSBOX_OPL" - DEFINES="$DEFINES -DDISABLE_SID -DDISABLE_NES_APU" - _need_memalign=yes - _backend="ps2" - _build_scalers=no - _mt32emu=no - # HACK to enable mad & zlib (they are not properly detected due to linker issues). - # This trick doesn't work for tremor right now, as the PS2 port the resulting library - # libtremor, while our code later on expects it to be called libvorbisidec. - # TODO: Enable tremor, e.g. by adding -ltremor or by renaming the lib. - _mad=yes - _zlib=yes - # HACK to fix compilation of C source files for now. - add_line_to_config_mk 'CC = ee-gcc' - # HACK to fix linking for now. It seems ee-g++ does not handle linking correctly. - LD=ee-gcc - - if test "$_debug_build" = yes; then - # TODO: Setup debug build properly - DEFINES="$DEFINES -D__PS2_DEBUG__" - #INCLUDES="$INCLUDES -I$(PS2GDB)/ee" - #LDFLAGS="$LDFLAGS -L$(PS2GDB)/lib" - LDFLAGS="$LDFLAGS -lps2gdbStub -lps2ip -ldebug" - else - # If not building for debug mode, strip binaries. - CXXFLAGS="$CXXFLAGS -s" - fi - ;; - psp) - _need_memalign=yes - _backend="psp" - _build_scalers=no - _mt32emu=no - _port_mk="backends/platform/psp/psp.mk" - ;; - samsungtv) - DEFINES="$DEFINES -DSAMSUNGTV -DDISABLE_COMMAND_LINE" - ASFLAGS="$ASFLAGS -mfpu=vfp" - HOSTEXEEXT=".so" - _unix=yes - _need_memalign=yes - add_line_to_config_mk 'USE_ARM_SOUND_ASM = 1' - add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1' - add_line_to_config_mk 'USE_ARM_GFX_ASM = 1' - add_line_to_config_mk 'USE_ARM_COSTUME_ASM = 1' - add_line_to_config_mk 'USE_ARM_SCALER_ASM = 1' - _backend="samsungtv" - _mt32emu=no - _vkeybd=yes - ;; - wii) - _endian=big - _need_memalign=yes - _backend="wii" - _build_scalers=no - _port_mk="backends/platform/wii/wii.mk" - add_line_to_config_mk 'GAMECUBE = 0' - add_line_to_config_h '#define AUDIO_REVERSE_STEREO' - add_line_to_config_h "#define DEBUG_WII_USBGECKO" - add_line_to_config_h "/* #define DEBUG_WII_MEMSTATS */" - add_line_to_config_h "/* #define DEBUG_WII_GDB */" - add_line_to_config_h "#define USE_WII_DI" - add_line_to_config_h "#define USE_WII_SMB" - add_line_to_config_h "#define USE_WII_KBD" - ;; - wince) - LDFLAGS="$LDFLAGS -Wl,-Map,scummvm.exe.map -Wl,--stack,65536" - _need_memalign=yes - add_line_to_config_mk 'USE_TREMOLO = 1' - add_line_to_config_mk 'USE_ARM_SOUND_ASM = 1' - add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1' - add_line_to_config_mk 'USE_ARM_GFX_ASM = 1' - add_line_to_config_mk 'USE_ARM_COSTUME_ASM = 1' - add_line_to_config_mk 'USE_ARM_SCALER_ASM = 1' - _backend="wince" - _mt32emu=no - _port_mk="backends/platform/wince/wince.mk" - ;; - *) - echo "WARNING: Unknown target, continuing with auto-detected values" - ;; - esac - -else - # - # Check whether memory alignment is required - # - echo_n "Alignment required... " - case $_host_cpu in - alpha*) - # Hardcode alignment requirements for Alpha processsors - _need_memalign=yes - ;; - arm*) - _need_memalign=yes - ;; - mips*) - # Hardcode alignment requirements for MIPS processsors. - # While these can emulate unaligned memory access, this - # emulation is rather slow. - _need_memalign=yes - ;; - sh*) - # Hardcode alignment requirements for SH processsors. - # While these can emulate unaligned memory access, this - # emulation is rather slow. - _need_memalign=yes - ;; - *) - # Try to auto-detect.... - cat > $TMPC << EOF -#include -#include -int main(int argc, char **argv) { - unsigned char test[8] = { 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88 }; - signal(SIGBUS, exit); - signal(SIGABRT, exit); - signal(SIGSEGV, exit); - if (*((unsigned int *)(test + 1)) != 0x55443322 && *((unsigned int *)(test + 1)) != 0x22334455) { - return 1; - } - return 0; -} -EOF - _need_memalign=yes - cc_check_no_clean && $TMPO$HOSTEXEEXT && _need_memalign=no - cc_check_clean - ;; - esac - echo "$_need_memalign" -fi - -# -# Enable 16bit support only for backends which support it -# -case $_backend in - dreamcast | dingux | gph | openpandora | samsungtv | sdl | wii | psp) - if test "$_16bit" = auto ; then - _16bit=yes - else - _16bit=no - fi - ;; - *) - _16bit=no - ;; -esac - - -# -# Add the results of the above checks to config.h -# -case $_endian in - big) - add_line_to_config_h '#undef SCUMM_LITTLE_ENDIAN' - add_line_to_config_h '#define SCUMM_BIG_ENDIAN' - ;; - little) - add_line_to_config_h '#define SCUMM_LITTLE_ENDIAN' - add_line_to_config_h '#undef SCUMM_BIG_ENDIAN' - ;; - *) - exit 1 - ;; -esac - -define_in_config_h_if_yes $_have_x86 'HAVE_X86' - -define_in_config_h_if_yes $_need_memalign 'SCUMM_NEED_ALIGNMENT' - -if test "$_unix" = yes ; then - DEFINES="$DEFINES -DUNIX" -fi - -# -# Check whether to enable a verbose build -# -echo_n "Checking whether to have a verbose build... " -echo "$_verbose_build" -add_to_config_mk_if_yes "$_verbose_build" 'VERBOSE_BUILD = 1' - -# -# Check whether plugin support is requested and possible -# -echo_n "Checking whether building plugins was requested... " -echo "$_dynamic_modules" -_mak_plugins= -_def_plugin="/* -> plugins disabled */" - -if test "$_dynamic_modules" = yes ; then - echo_n "Checking whether building plugins is supported... " - case $_host_os in - darwin*) -_def_plugin=' -#define PLUGIN_PREFIX "" -#define PLUGIN_SUFFIX ".plugin" -' -_mak_plugins=' -DYNAMIC_MODULES := 1 -PLUGIN_PREFIX := -PLUGIN_SUFFIX := .plugin -PLUGIN_EXTRA_DEPS = $(EXECUTABLE) -CXXFLAGS += -DDYNAMIC_MODULES -PLUGIN_LDFLAGS += -bundle -bundle_loader $(EXECUTABLE) -exported_symbols_list "$(srcdir)/plugin.exp" -PRE_OBJS_FLAGS := -all_load -POST_OBJS_FLAGS := -LIBS += -ldl -' - ;; - dreamcast) -_def_plugin=' -#define PLUGIN_PREFIX "" -#define PLUGIN_SUFFIX ".plg" -' -_mak_plugins=' -DYNAMIC_MODULES := 1 -PLUGIN_PREFIX := -PLUGIN_SUFFIX := .plg -PLUGIN_EXTRA_DEPS = $(abspath $(srcdir)/backends/platform/dc/plugin.x $(srcdir)/backends/platform/dc/plugin.syms) $(EXECUTABLE) -CXXFLAGS += -DDYNAMIC_MODULES -PLUGIN_LDFLAGS = -ml -m4-single-only -nostartfiles -Wl,-q,-T$(srcdir)/backends/platform/dc/plugin.x,--just-symbols,$(EXECUTABLE),--retain-symbols-file,$(srcdir)/backends/platform/dc/plugin.syms -L$(ronindir)/lib -PRE_OBJS_FLAGS := -Wl,--whole-archive -POST_OBJS_FLAGS := -Wl,--no-whole-archive -' - ;; - freebsd*) -_def_plugin=' -#define PLUGIN_PREFIX "lib" -#define PLUGIN_SUFFIX ".so" -' -_mak_plugins=' -DYNAMIC_MODULES := 1 -PLUGIN_PREFIX := lib -PLUGIN_SUFFIX := .so -PLUGIN_EXTRA_DEPS = -CXXFLAGS += -DDYNAMIC_MODULES -CXXFLAGS += -fpic -PLUGIN_LDFLAGS += -shared -PRE_OBJS_FLAGS := -Wl,-export-dynamic -Wl,-whole-archive -POST_OBJS_FLAGS := -Wl,-no-whole-archive -' - ;; - gph*) -_def_plugin=' -#define PLUGIN_PREFIX "" -#define PLUGIN_SUFFIX ".plugin" -' -_mak_plugins=' -DYNAMIC_MODULES := 1 -PLUGIN_PREFIX := -PLUGIN_SUFFIX := .plugin -PLUGIN_EXTRA_DEPS = $(EXECUTABLE) -CXXFLAGS += -DDYNAMIC_MODULES -CXXFLAGS += -fpic -PLUGIN_LDFLAGS += -shared -PRE_OBJS_FLAGS := -Wl,-export-dynamic -Wl,-whole-archive -POST_OBJS_FLAGS := -Wl,-no-whole-archive -LIBS += -ldl -' - ;; - linux*|android|androidsdl) -_def_plugin=' -#define PLUGIN_PREFIX "lib" -#define PLUGIN_SUFFIX ".so" -' -_mak_plugins=' -DYNAMIC_MODULES := 1 -PLUGIN_PREFIX := lib -PLUGIN_SUFFIX := .so -PLUGIN_EXTRA_DEPS = -CXXFLAGS += -DDYNAMIC_MODULES -CXXFLAGS += -fpic -PLUGIN_LDFLAGS += -shared -PRE_OBJS_FLAGS := -Wl,-export-dynamic -Wl,-whole-archive -POST_OBJS_FLAGS := -Wl,-no-whole-archive -LIBS += -ldl -' - ;; - *mingw32*) -_def_plugin=' -#define PLUGIN_PREFIX "" -#define PLUGIN_SUFFIX ".dll" -' -_mak_plugins=' -DYNAMIC_MODULES := 1 -PLUGIN_PREFIX := -PLUGIN_SUFFIX := .dll -PLUGIN_EXTRA_DEPS = $(EXECUTABLE) -CXXFLAGS += -DDYNAMIC_MODULES -PLUGIN_LDFLAGS := -Wl,--enable-auto-import -shared ./libscummvm.a -PRE_OBJS_FLAGS := -Wl,--whole-archive -POST_OBJS_FLAGS := -Wl,--export-all-symbols -Wl,--no-whole-archive -Wl,--out-implib,./libscummvm.a -' - ;; - psp) -_def_plugin=' -#define PLUGIN_PREFIX "" -#define PLUGIN_SUFFIX ".plg" -' -_mak_plugins=' -DYNAMIC_MODULES := 1 -PLUGIN_PREFIX := -PLUGIN_SUFFIX := .plg -PLUGIN_EXTRA_DEPS = $(EXECUTABLE) -CXXFLAGS += -DDYNAMIC_MODULES -LDFLAGS += -Wl,-T$(srcdir)/backends/platform/psp/main_prog.ld -PLUGIN_LDFLAGS = -nostartfiles -Wl,-q,--just-symbols,$(EXECUTABLE),--retain-symbols-file,$(srcdir)/backends/platform/psp/plugin.syms,-T$(srcdir)/backends/platform/psp/plugin.ld -lstdc++ -lc -lm -PRE_OBJS_FLAGS := -Wl,--whole-archive -POST_OBJS_FLAGS := -Wl,--no-whole-archive -' - ;; - *) - _dynamic_modules=no - _mak_plugins= - _def_plugin= - ;; - esac - echo "$_dynamic_modules" -fi - - -# -# Check whether integrated MT-32 emulator support is requested -# -define_in_config_if_yes "$_mt32emu" 'USE_MT32EMU' - -# -# Check whether 16bit color support is requested -# -define_in_config_if_yes "$_16bit" 'USE_RGB_COLOR' - -# -# Check whether to enable the (hq) scalers -# -if test "$_build_scalers" = no ; then - _build_hq_scalers=no -fi -define_in_config_if_yes "$_build_scalers" 'USE_SCALERS' - -define_in_config_if_yes "$_build_hq_scalers" 'USE_HQ_SCALERS' - -# -# Check whether to compile the Indeo3 decoder -# -if test "$_indeo3" = auto ; then - # Autodetect. Build if either the gob engine or plugins are enabled - if test `get_engine_build gob` = yes || test "$_dynamic_modules" = yes ; then - _indeo3=yes - else - _indeo3=no - fi -fi -define_in_config_if_yes "$_indeo3" 'USE_INDEO3' - -# -# Check for math lib -# -cat > $TMPC << EOF -int main(void) { return 0; } -EOF -cc_check -lm && LIBS="$LIBS -lm" - -# -# Check for Ogg Vorbis -# -echocheck "Ogg Vorbis" -if test "$_vorbis" = auto ; then - _vorbis=no - cat > $TMPC << EOF -#include -int main(void) { vorbis_packet_blocksize(0,0); return 0; } -EOF - cc_check $OGG_CFLAGS $OGG_LIBS $VORBIS_CFLAGS $VORBIS_LIBS \ - -lvorbisfile -lvorbis -logg && _vorbis=yes -fi -if test "$_vorbis" = yes ; then - LIBS="$LIBS $OGG_LIBS $VORBIS_LIBS -lvorbisfile -lvorbis -logg" - INCLUDES="$INCLUDES $OGG_CFLAGS $VORBIS_CFLAGS" -fi -define_in_config_if_yes "$_vorbis" 'USE_VORBIS' -echo "$_vorbis" - -# -# Check for Tremor -# -echocheck "Tremor" -if test "$_tremor" = auto ; then - _tremor=no - cat > $TMPC << EOF -#include -int main(void) { vorbis_info_init(0); return 0; } -EOF - cc_check $TREMOR_CFLAGS $TREMOR_LIBS -lvorbisidec && \ - _tremor=yes -fi -if test "$_tremor" = yes && test "$_vorbis" = no; then - add_line_to_config_h '#define USE_TREMOR' - add_line_to_config_h '#define USE_VORBIS' - LIBS="$LIBS $TREMOR_LIBS -lvorbisidec" - INCLUDES="$INCLUDES $TREMOR_CFLAGS" -else - if test "$_vorbis" = yes; then - _tremor="no (Ogg Vorbis/Tremor support is mutually exclusive)" - fi - add_line_to_config_h '#undef USE_TREMOR' -fi -add_to_config_mk_if_yes "$_tremor" 'USE_TREMOR = 1' -echo "$_tremor" - -# -# Check for FLAC -# -echocheck "FLAC >= 1.0.1" -if test "$_flac" = auto ; then - _flac=no - cat > $TMPC << EOF -#include -int main(void) { return FLAC__STREAM_SYNC_LEN >> 30; /* guaranteed to be 0 */ } -EOF - if test "$_vorbis" = yes ; then - cc_check $FLAC_CFLAGS $FLAC_LIBS $OGG_CFLAGS $OGG_LIBS \ - -lFLAC -logg && _flac=yes - else - cc_check $FLAC_CFLAGS $FLAC_LIBS \ - -lFLAC && _flac=yes - fi -fi -if test "$_flac" = yes ; then - if test "$_vorbis" = yes ; then - LIBS="$LIBS $FLAC_LIBS $OGG_LIBS -lFLAC -logg" - else - LIBS="$LIBS $FLAC_LIBS -lFLAC" - fi - INCLUDES="$INCLUDES $FLAC_CFLAGS" -fi -define_in_config_if_yes "$_flac" 'USE_FLAC' -echo "$_flac" - -# -# Check for MAD (MP3 library) -# -echocheck "MAD" -if test "$_mad" = auto ; then - _mad=no - cat > $TMPC << EOF -#include -int main(void) { return 0; } -EOF - cc_check $MAD_CFLAGS $MAD_LIBS -lmad && _mad=yes -fi -if test "$_mad" = yes ; then - LIBS="$LIBS $MAD_LIBS -lmad" - INCLUDES="$INCLUDES $MAD_CFLAGS" -fi -define_in_config_if_yes "$_mad" 'USE_MAD' -echo "$_mad" - -# -# Check for ALSA -# -echocheck "ALSA >= 0.9" -if test "$_alsa" = auto ; then - _alsa=no - cat > $TMPC << EOF -#include -int main(void) { return (!(SND_LIB_MAJOR==0 && SND_LIB_MINOR==9)); } -EOF - cc_check $ALSA_CFLAGS $ALSA_LIBS -lasound && _alsa=yes -fi -if test "$_alsa" = yes ; then - LIBS="$LIBS $ALSA_LIBS -lasound" - INCLUDES="$INCLUDES $ALSA_CFLAGS" -fi -define_in_config_h_if_yes "$_alsa" 'USE_ALSA' -echo "$_alsa" - -# -# Check for SEQ MIDI -# -echocheck "SEQ MIDI" -if test "$_seq_midi" = auto ; then - # TODO: Test for /dev/sequencer presence? Or maybe just for /dev ? - # For now, we just always enable it when "unix" mode is on (backends - # that do not want it can disable it by setting _seq_midi=no). - _seq_midi="$_unix" -fi -define_in_config_h_if_yes "$_seq_midi" 'USE_SEQ_MIDI' -echo "$_seq_midi" - -# -# Check for ZLib -# -echocheck "zlib" -if test "$_zlib" = auto ; then - _zlib=no - cat > $TMPC << EOF -#include -#include -int main(void) { return strcmp(ZLIB_VERSION, zlibVersion()); } -EOF - cc_check $ZLIB_CFLAGS $ZLIB_LIBS -lz && _zlib=yes -fi -if test "$_zlib" = yes ; then - LIBS="$LIBS $ZLIB_LIBS -lz" - INCLUDES="$INCLUDES $ZLIB_CFLAGS" -fi -define_in_config_if_yes "$_zlib" 'USE_ZLIB' -echo "$_zlib" - -# -# Check for LibMPEG2 -# -echocheck "libmpeg2 >= 0.3.2" -if test "$_mpeg2" = auto ; then - _mpeg2=no - cat > $TMPC << EOF -typedef signed $type_1_byte int8_t; -typedef signed $type_2_byte int16_t; -typedef signed $type_4_byte int32_t; - -typedef unsigned $type_1_byte uint8_t; -typedef unsigned $type_2_byte uint16_t; -typedef unsigned $type_4_byte uint32_t; - -#include -int main(void) { - /* mpeg2_state_t first appears in 0.4.0 */ - mpeg2_state_t state; - - #ifdef MPEG2_RELEASE - if (MPEG2_RELEASE >= MPEG2_VERSION(0, 3, 2)) - return 0; - #endif - return 1; -} -EOF - - if test -n "$_host"; then - # don't execute while cross compiling - cc_check $MPEG2_CFLAGS $MPEG2_LIBS -lmpeg2 && _mpeg2=yes - else - cc_check_no_clean $MPEG2_CFLAGS $MPEG2_LIBS -lmpeg2 && $TMPO$HOSTEXEEXT && _mpeg2=yes - cc_check_clean - fi -fi -if test "$_mpeg2" = yes ; then - INCLUDES="$INCLUDES $MPEG2_CFLAGS" - LIBS="$LIBS $MPEG2_LIBS -lmpeg2" -fi -define_in_config_if_yes "$_mpeg2" 'USE_MPEG2' -echo "$_mpeg2" - -# -# Check for libfluidsynth -# -echocheck "libfluidsynth" -if test "$_fluidsynth" = auto ; then - _fluidsynth=no - cat > $TMPC << EOF -#include -int main(void) { return 0; } -EOF - cc_check $FLUIDSYNTH_CFLAGS $FLUIDSYNTH_LIBS -lfluidsynth && _fluidsynth=yes -fi -if test "$_fluidsynth" = yes ; then - case $_host_os in - mingw*) - LIBS="$LIBS $FLUIDSYNTH_LIBS -lfluidsynth -ldsound -lwinmm" - ;; - *) - LIBS="$LIBS $FLUIDSYNTH_LIBS -lfluidsynth" - ;; - esac - INCLUDES="$INCLUDES $FLUIDSYNTH_CFLAGS" -fi -define_in_config_h_if_yes "$_fluidsynth" 'USE_FLUIDSYNTH' -echo "$_fluidsynth" - -# -# Check for readline if text_console is enabled -# -echocheck "readline" -if test "$_text_console" = yes ; then - _READLINE_LIBS="-lreadline" - if test "$_readline" = auto ; then - _readline=no - cat > $TMPC << EOF -#include -#include -#include - -int main(void) { - char *x = readline(""); -} -EOF - cc_check_no_clean $READLINE_CFLAGS $READLINE_LIBS $_READLINE_LIBS && _readline=yes - if test "$_readline" = no ; then - _READLINE_LIBS="-lreadline -ltermcap" - cc_check_no_clean $READLINE_CFLAGS $READLINE_LIBS $_READLINE_LIBS && _readline=yes - fi - fi - cc_check_clean - echo "$_readline" -else - _readline=no - echo "skipping (text console disabled)" -fi - -if test "$_readline" = yes ; then - LIBS="$LIBS $READLINE_LIBS $_READLINE_LIBS" - INCLUDES="$INCLUDES $READLINE_CFLAGS" -fi -define_in_config_h_if_yes "$_readline" 'USE_READLINE' - -define_in_config_h_if_yes "$_text_console" 'USE_TEXT_CONSOLE' - -# -# Check for nasm -# -if test "$_have_x86" = yes ; then - echocheck "nasm" - if test "$_nasm" = no ; then - echo "disabled" - else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$SEPARATOR - - for path_dir in $_nasmpath; do - if test -x "$path_dir/nasm$NATIVEEXEEXT" ; then - NASM="$path_dir/nasm$NATIVEEXEEXT" - NASMFLAGS="-O1 -g" - echo $NASM - break - fi - done - - # fallback to the nasm compatible yasm - if test x$NASM = x -o x$NASM = x'"$NASM"'; then - for path_dir in $_nasmpath; do - if test -x "$path_dir/yasm$NATIVEEXEEXT" ; then - NASM="$path_dir/yasm$NATIVEEXEEXT" - NASMFLAGS="-a x86 -m x86" - echo $NASM - break - fi - done - fi - - IFS="$ac_save_ifs" - - if test x$NASM = x -o x$NASM = x'"$NASM"'; then - echo "not found" - _nasm=no - else - case $_host_os in - os2-emx*) - NASMFLAGS="$NASMFLAGS -f aout" - ;; - mingw*) - NASMFLAGS="$NASMFLAGS -f win32" - ;; - darwin*) - NASMFLAGS="$NASMFLAGS -f macho" - ;; - *) - NASMFLAGS="$NASMFLAGS -f elf" - ;; - esac - _nasm=yes - fi - fi -fi - -define_in_config_if_yes $_nasm 'USE_NASM' - -# -# Enable vkeybd / keymapper -# -if test "$_vkeybd" = yes ; then - DEFINES="$DEFINES -DENABLE_VKEYBD" -fi -if test "$_keymapper" = yes ; then - DEFINES="$DEFINES -DENABLE_KEYMAPPER" -fi - -# Check whether to build translation support -# -echo_n "Building translation support... " -define_in_config_if_yes $_translation 'USE_TRANSLATION' -if test "$_translation" = no ; then - echo "no" -else - echo_n "yes (" - - cat > $TMPC << EOF -#include -int main(void) { setlocale(LC_ALL, ""); return 0; } -EOF - _detectlang=no - cc_check $LDFLAGS $CXXFLAGS && _detectlang=yes - - define_in_config_h_if_yes $_detectlang 'USE_DETECTLANG' - if test "$_detectlang" = yes ; then - echo "with runtime language detection)" - else - echo "without runtime language detection)" - fi -fi - -# -# Figure out installation directories -# -test "x$prefix" = xNONE && prefix=/usr/local -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -DEFINES="$DEFINES -DDATA_PATH=\\\"$datadir\\\"" - -case $_backend in - openpandora) - # Add ../plugins as a path so plugins can be found when running from a .PND. - DEFINES="$DEFINES -DPLUGIN_DIRECTORY=\\\"../plugins\\\"" - ;; - *) - DEFINES="$DEFINES -DPLUGIN_DIRECTORY=\\\"$libdir/scummvm\\\"" - ;; -esac - -# -# Set variables for profiling. -# We need to do it here to prevent mess-ups with the tests e.g. on the PSP -# -if test "$_enable_prof" = yes ; then - CXXFLAGS="$CXXFLAGS -pg" - LDFLAGS="$LDFLAGS -pg" - DEFINES="$DEFINES -DENABLE_PROFILING" -fi - -echo_n "Backend... " -echo_n "$_backend" - -if test "$_nasm" = yes ; then - echo_n ", assembly routines" -fi - -if test "$_16bit" = yes ; then - echo_n ", 16bit color" -fi - -if test "$_build_scalers" = yes ; then - if test "$_build_hq_scalers" = yes ; then - echo_n ", HQ scalers" - else - echo_n ", scalers" - fi -fi - -if test "$_mt32emu" = yes ; then - echo_n ", MT-32 emu" -fi - -if test "$_indeo3" = yes ; then - echo_n ", Indeo3 decoder" -fi - -if test "$_text_console" = yes ; then - echo_n ", text console" -fi - -if test "$_vkeybd" = yes ; then - echo_n ", virtual keyboard" -fi - -if test "$_keymapper" = yes ; then - echo ", keymapper" -else - echo -fi - -# -# Backend related stuff -# -case $_backend in - android) - static_libs='' - system_libs='' - for lib in $LIBS; do - case $lib in - -lz|-lm) - system_libs="$system_libs $lib" - ;; - *) - static_libs="$static_libs $lib" - ;; - esac - done - - # -lgcc is carefully placed here - we want to catch - # all toolchain symbols in *our* libraries rather - # than pick up anything unhygenic from the Android libs. - LIBS="-Wl,-Bstatic $static_libs -Wl,-Bdynamic -lgcc $system_libs -lstdc++ -llog -lGLESv1_CM" - DEFINES="$DEFINES -D__ANDROID__ -DANDROID_BACKEND -DREDUCE_MEMORY_USAGE" - add_line_to_config_mk 'PLUGIN_LDFLAGS += $(LDFLAGS) -Wl,-shared,-Bsymbolic' - - # Work around an Android 2.0+ run-time linker bug: - # The linker doesn't actually look in previously - # loaded libraries when trying to resolve symbols - - # effectively turning all dlopen(RTLD_GLOBAL) calls - # into dlopen(RTLD_LOCAL). It *does* look in - # DT_NEEDED libraries, so the workaround is to add an - # (otherwise unnecessary) dependency from plugins back - # to the main libscummvm.so. - add_line_to_config_mk 'PLUGIN_LDFLAGS += -Lbuild.tmp -lscummvm' - add_line_to_config_mk 'PLUGIN_EXTRA_DEPS += build.tmp/libscummvm.so' - ;; - dc) - INCLUDES="$INCLUDES "'-I$(srcdir)/backends/platform/dc -isystem $(ronindir)/include' - LDFLAGS="$LDFLAGS -Wl,-Ttext,0x8c010000 -nostartfiles "'$(ronindir)/lib/crt0.o -L$(ronindir)/lib' - LIBS="$LIBS -lronin-noserial -lm" - ;; - dingux) - find_sdlconfig - INCLUDES="$INCLUDES `$_sdlconfig --prefix="$_sdlpath" --cflags`" - LIBS="$LIBS `$_sdlconfig --prefix="$_sdlpath" --libs`" - DEFINES="$DEFINES -DSDL_BACKEND -DDINGUX" - LDFLAGS="$LDFLAGS " - MODULES="$MODULES backends/platform/sdl" - ;; - ds) - # TODO ds - INCLUDES="$INCLUDES "'-I$(srcdir)/backends/platform/ds/arm9/source' - INCLUDES="$INCLUDES "'-I$(srcdir)/backends/platform/ds/commoninclude' - INCLUDES="$INCLUDES "'-Ibackends/platform/ds/arm9/data' - ;; - gp2x) - find_sdlconfig - INCLUDES="$INCLUDES `$_sdlconfig --prefix="$_sdlpath" --cflags`" - LIBS="$LIBS `$_sdlconfig --prefix="$_sdlpath" --libs`" - LDFLAGS="$LDFLAGS" - ;; - gph) - find_sdlconfig - INCLUDES="$INCLUDES `$_sdlconfig --prefix="$_sdlpath" --cflags`" - LIBS="$LIBS `$_sdlconfig --prefix="$_sdlpath" --libs`" - LDFLAGS="$LDFLAGS" - ;; - iphone) - OBJCFLAGS="$OBJCFLAGS --std=c99" - LIBS="$LIBS -lobjc -framework UIKit -framework CoreGraphics -framework OpenGLES -framework QuartzCore -framework GraphicsServices -framework CoreFoundation -framework Foundation -framework AudioToolbox -framework CoreAudio" - ;; - linuxmoto) - find_sdlconfig - INCLUDES="$INCLUDES `$_sdlconfig --prefix="$_sdlpath" --cflags`" - LIBS="$LIBS `$_sdlconfig --prefix="$_sdlpath" --libs`" - DEFINES="$DEFINES -DSDL_BACKEND -DLINUXMOTO" - ;; - n64) - INCLUDES="$INCLUDES "'-I$(N64SDK)/include' - INCLUDES="$INCLUDES "'-I$(N64SDK)/mips64/include' - INCLUDES="$INCLUDES "'-I$(N64SDK)/hkz-libn64' - INCLUDES="$INCLUDES "'-I$(srcdir)/backends/platform/n64' - LIBS="$LIBS -lpakfs -lframfs -ln64 -ln64utils -lromfs -lm -lstdc++ -lc -lgcc -lz -lnosys" - ;; - null) - DEFINES="$DEFINES -DUSE_NULL_DRIVER" - ;; - openpandora) - find_sdlconfig - INCLUDES="$INCLUDES `$_sdlconfig --prefix="$_sdlpath" --cflags`" - LIBS="$LIBS `$_sdlconfig --prefix="$_sdlpath" --libs`" - LDFLAGS="$LDFLAGS" - ;; - ps2) - # TODO ps2 - DEFINES="$DEFINES -D_EE -DFORCE_RTL" - INCLUDES="$INCLUDES -I$PS2SDK/ee/include -I$PS2SDK/common/include -I$PS2SDK/ports/include" - LDFLAGS="$LDFLAGS -mno-crt0 $PS2SDK/ee/startup/crt0.o -T $PS2SDK/ee/startup/linkfile" - LDFLAGS="$LDFLAGS -L$PS2SDK/ee/lib -L$PS2SDK/ports/lib" - LIBS="$LIBS -lmc -lpad -lmouse -lhdd -lpoweroff -lsjpcm -lm -lc -lfileXio -lkernel -lstdc++ " - ;; - psp) - DEFINES="$DEFINES -D__PSP__ -DDISABLE_TEXT_CONSOLE -DDISABLE_COMMAND_LINE -DDISABLE_DOSBOX_OPL" - LIBS="$LIBS -lpng -Wl,-Map,mapfile.txt" - ;; - samsungtv) - find_sdlconfig - INCLUDES="$INCLUDES `$_sdlconfig --prefix="$_sdlpath" --cflags`" - LIBS="$LIBS `$_sdlconfig --prefix="$_sdlpath" --libs`" - DEFINES="$DEFINES -DSDL_BACKEND -DSAMSUNGTV" - LDFLAGS="$LDFLAGS -shared -fpic" - MODULES="$MODULES backends/platform/sdl" - ;; - sdl) - find_sdlconfig - INCLUDES="$INCLUDES `$_sdlconfig --prefix="$_sdlpath" --cflags`" - LIBS="$LIBS `$_sdlconfig --prefix="$_sdlpath" --libs`" - DEFINES="$DEFINES -DSDL_BACKEND" - ;; - wii) - DEFINES="$DEFINES -D__WII__ -DGEKKO" - case $_host_os in - gamecube) - LIBS="$LIBS -lgxflux -liso9660 -lfat -logc -ldb" - ;; - *) - LIBS="$LIBS -lgxflux -ldi -liso9660 -ltinysmb -lfat -lwiiuse -lbte -logc -lwiikeyboard -ldb" - ;; - esac - ;; - wince) - INCLUDES="$INCLUDES "'-I$(srcdir) -I$(srcdir)/backends/platform/wince -I$(srcdir)/engines -I$(srcdir)/backends/platform/wince/missing/gcc -I$(srcdir)/backends/platform/wince/CEgui -I$(srcdir)/backends/platform/wince/CEkeys' - LIBS="$LIBS -static -lSDL" - ;; - *) - echo "support for $_backend backend not implemented in configure script yet" - exit 1 - ;; -esac -MODULES="$MODULES backends/platform/$_backend" - -# -# Do CXXFLAGS now that we know the compiler version -# -if test "$have_gcc" = yes ; then - if test "$_cxx_major" -ge "3" ; then - case $_host_os in - # newlib-based system include files suppress non-C89 function - # declarations under __STRICT_ANSI__ - amigaos* | android | androidsdl | ds | dreamcast | gamecube | mingw* | n64 | psp | wii | wince ) - CXXFLAGS="$CXXFLAGS -W -Wno-unused-parameter" - ;; - *) - CXXFLAGS="$CXXFLAGS -ansi -W -Wno-unused-parameter" - ;; - esac - add_line_to_config_mk 'HAVE_GCC3 = 1' - add_line_to_config_mk 'CXX_UPDATE_DEP_FLAG = -MMD -MF "$(*D)/$(DEPDIR)/$(*F).d" -MQ "$@" -MP' - fi; - - if test "$_cxx_major" -eq 4 && test "$_cxx_minor" -ge 3 || \ - test "$_cxx_major" -gt 4 ; then - CXXFLAGS="$CXXFLAGS -Wno-empty-body" - else - CXXFLAGS="$CXXFLAGS -Wconversion" - fi; -fi; - -# Some platforms use certain GNU extensions in header files -case $_host_os in -android | androidsdl | gamecube | psp | wii ) - ;; -*) - CXXFLAGS="$CXXFLAGS -pedantic" - ;; -esac - -# -# Engine selection -# -_engines_built_static="" -_engines_built_dynamic="" -_engines_skipped="" - -for engine in $_engines; do - if test "`get_engine_sub $engine`" = "no" ; then - # It's a main engine - if test `get_engine_build $engine` = no ; then - isbuilt=no - else - # If dynamic plugins aren't supported, mark - # all the engines as static - if test $_dynamic_modules = no ; then - set_var _engine_${engine}_build "static" - else - # If it wasn't explicitly marked as static or - # dynamic, use the configured default - if test `get_engine_build $engine` = yes ; then - set_var _engine_${engine}_build "${_plugins_default}" - fi - fi - - # Prepare the defines - if test `get_engine_build $engine` = dynamic ; then - isbuilt=DYNAMIC_PLUGIN - else - set_var _engine_${engine}_build "static" - isbuilt=STATIC_PLUGIN - fi - fi - - # Prepare the information to be shown - prepare_engine_build_strings $engine - else - # It's a subengine, just say yes or no - if test "`get_engine_build $engine`" = "no" ; then - isbuilt=no - else - isbuilt=1 - fi - fi - - # Save the settings - defname="ENABLE_`echo $engine | tr '[a-z]' '[A-Z]'`" - if test "$isbuilt" = "no" ; then - add_line_to_config_mk "# $defname" - else - add_line_to_config_mk "$defname = $isbuilt" - fi -done - -# -# Show which engines ("frontends") are to be built -# -echo -if test -n "$_engines_built_static" ; then - echo "Engines (builtin):" - echo $_engines_built_static | sed 's/@/\ -/g -s/#/ /g' -fi - -if test -n "$_engines_built_dynamic" ; then - echo "Engines (plugins):" - echo $_engines_built_dynamic | sed 's/@/\ -/g -s/#/ /g' -fi - -if test -n "$_engines_skipped" ; then - echo "Engines Skipped:" - echo $_engines_skipped | sed 's/@/\ -/g -s/#/ /g' -fi - - -echo -echo "Creating config.h" -cat > config.h << EOF -/* This file is automatically generated by configure */ -/* DO NOT EDIT MANUALLY */ - -#ifndef CONFIG_H -#define CONFIG_H - -$_config_h_data - -/* Data types */ -typedef unsigned $type_1_byte byte; -typedef unsigned int uint; -typedef unsigned $type_1_byte uint8; -typedef unsigned $type_2_byte uint16; -typedef unsigned $type_4_byte uint32; -typedef signed $type_1_byte int8; -typedef signed $type_2_byte int16; -typedef signed $type_4_byte int32; - -/* Plugin settings */ -$_def_plugin - -#endif /* CONFIG_H */ -EOF - -echo "Creating config.mk" -cat > config.mk << EOF -# -------- Generated by configure ----------- - -CXX := $CXX -CXXFLAGS := $CXXFLAGS -LD := $LD -LIBS += $LIBS -RANLIB := $_ranlib -STRIP := $_strip -AR := $_ar -AS := $_as -ASFLAGS := $ASFLAGS -WINDRES := $_windres -WINDRESFLAGS := $WINDRESFLAGS -WIN32PATH=$_win32path -AOS4PATH=$_aos4path -STATICLIBPATH=$_staticlibpath - -BACKEND := $_backend -MODULES += $MODULES -MODULE_DIRS += $MODULE_DIRS -EXEEXT := $HOSTEXEEXT -NASM := $NASM -NASMFLAGS := $NASMFLAGS - -prefix = $prefix -exec_prefix = $exec_prefix -bindir = $bindir -libdir = $libdir -datarootdir = $datarootdir -datadir = $datadir -mandir = $mandir -docdir = $docdir - -$_config_mk_data - -INCLUDES += $INCLUDES -OBJS += $OBJS -DEFINES += $DEFINES -LDFLAGS += $LDFLAGS - -$_mak_plugins - -port_mk = $_port_mk - -SAVED_CONFIGFLAGS := $SAVED_CONFIGFLAGS -SAVED_LDFLAGS := $SAVED_LDFLAGS -SAVED_CXX := $SAVED_CXX -SAVED_CXXFLAGS := $SAVED_CXXFLAGS -SAVED_CPPFLAGS := $SAVED_CPPFLAGS -SAVED_ASFLAGS := $SAVED_ASFLAGS -SAVED_WINDRESFLAGS := $SAVED_WINDRESFLAGS -EOF - -# -# Create a custom Makefile when building outside the source tree -# TODO: Add a better check than just looking for 'Makefile' -# -if test ! -f Makefile.common ; then -echo "Creating Makefile" - -cat > Makefile << EOF -# -------- Generated by configure ----------- -srcdir = $_srcdir -vpath %.h \$(srcdir) -vpath %.cpp \$(srcdir) -vpath %.c \$(srcdir) -vpath %.m \$(srcdir) -vpath %.mm \$(srcdir) -vpath %.asm \$(srcdir) -vpath %.s \$(srcdir) -vpath %.S \$(srcdir) -include \$(srcdir)/Makefile -EOF - -fi diff --git a/project/jni/application/scummvm/scummvm b/project/jni/application/scummvm/scummvm index 86b9f9c35..56a21d660 120000 --- a/project/jni/application/scummvm/scummvm +++ b/project/jni/application/scummvm/scummvm @@ -1 +1 @@ -../../../../../scummvm.1.2.0/ \ No newline at end of file +scummvm-1.3.1 \ No newline at end of file diff --git a/project/jni/application/scummvm/scummvm-1.3.1.diff b/project/jni/application/scummvm/scummvm-1.3.1.diff new file mode 100644 index 000000000..dae1ccfbc --- /dev/null +++ b/project/jni/application/scummvm/scummvm-1.3.1.diff @@ -0,0 +1,96 @@ +diff -u -r scummvm-1.3.1-old/configure scummvm-1.3.1/configure +--- scummvm-1.3.1-old/configure 2011-07-03 23:44:51.000000000 +0300 ++++ scummvm-1.3.1/configure 2011-10-17 16:32:52.498962514 +0300 +@@ -653,7 +653,7 @@ + -h, --help display this help and exit + --backend=BACKEND backend to build (android, dc, dingux, ds, gp2x, gph, + iphone, linuxmoto, maemo, n64, null, openpandora, ps2, +- psp, samsungtv, sdl, symbian, webos, wii, wince) [sdl] ++ psp, samsungtv, sdl, symbian, webos, wii, wince, androidsdl) [sdl] + + Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX +@@ -680,6 +680,7 @@ + Special configuration feature: + --host=HOST cross-compile to target HOST (arm-linux, ...) + special targets: android for Android ++ androidsdl for Android with SDL backend + caanoo for Caanoo + dingux for Dingux + dreamcast for Sega Dreamcast +@@ -984,6 +985,11 @@ + _host_cpu=arm + _host_alias=arm-linux-androideabi + ;; ++androidsdl) ++ _host_os=androidsdl ++ _host_cpu=arm ++ _host_alias=arm-linux-androideabi ++ ;; + arm-riscos) + _host_os=riscos + _host_cpu=arm +@@ -1288,9 +1294,9 @@ + + if test -n "$_host"; then + # In cross-compiling mode, we cannot run the result +- eval "$1 $CXXFLAGS $LDFLAGS -o $TMPO.o -c tmp_cxx_compiler.cpp" 2> /dev/null && cc_check_clean tmp_cxx_compiler.cpp ++ eval "$1 $CXXFLAGS $LDFLAGS -o $TMPO.o -c tmp_cxx_compiler.cpp" && cc_check_clean tmp_cxx_compiler.cpp + else +- eval "$1 $CXXFLAGS $LDFLAGS -o $TMPO$HOSTEXEEXT tmp_cxx_compiler.cpp" 2> /dev/null && eval "$TMPO$HOSTEXEEXT 2> /dev/null" && cc_check_clean tmp_cxx_compiler.cpp ++ eval "$1 $CXXFLAGS $LDFLAGS -o $TMPO$HOSTEXEEXT tmp_cxx_compiler.cpp" && eval "$TMPO$HOSTEXEEXT 2> /dev/null" && cc_check_clean tmp_cxx_compiler.cpp + fi + } + +@@ -1559,6 +1565,11 @@ + _unix=yes + _seq_midi=no + ;; ++ androidsdl) ++ CXXFLAGS="$CXXFLAGS -Os" ++ _unix=yes ++ _seq_midi=no ++ ;; + beos*) + DEFINES="$DEFINES -DSYSTEM_NOT_SUPPORTING_D_TYPE" + # Needs -lbind -lsocket for the timidity MIDI driver +@@ -1729,6 +1740,12 @@ + _mt32emu=no + _timidity=no + ;; ++ androidsdl) ++ DEFINES="$DEFINES -DANDROID" ++ _unix=yes ++ _need_memalign=yes ++ _seq_midi=no ++ ;; + arm-linux|arm*-linux-gnueabi|arm-*-linux) + _unix=yes + _need_memalign=yes +@@ -2123,7 +2140,7 @@ + # Enable 16bit support only for backends which support it + # + case $_backend in +- android | dingux | dreamcast | gph | openpandora | psp | samsungtv | sdl | webos | wii) ++ android | androidsdl | dingux | dreamcast | gph | openpandora | psp | samsungtv | sdl | webos | wii) + if test "$_16bit" = auto ; then + _16bit=yes + else +@@ -3180,7 +3197,7 @@ + case $_host_os in + # newlib-based system include files suppress non-C89 function + # declarations under __STRICT_ANSI__ +- amigaos* | android | dreamcast | ds | gamecube | mingw* | n64 | psp | ps2 | wii | wince ) ++ amigaos* | android | androidsdl | dreamcast | ds | gamecube | mingw* | n64 | psp | ps2 | wii | wince ) + CXXFLAGS="$CXXFLAGS -W -Wno-unused-parameter" + ;; + *) +@@ -3203,7 +3220,7 @@ + + # Some platforms use certain GNU extensions in header files + case $_host_os in +-android | gamecube | psp | wii) ++android | androidsdl | gamecube | psp | wii ) + ;; + *) + # ICC does not support pedantic diff --git a/project/jni/application/src b/project/jni/application/src index 104f796a6..74593ead2 120000 --- a/project/jni/application/src +++ b/project/jni/application/src @@ -1 +1 @@ -ballfield \ No newline at end of file +regression \ No newline at end of file diff --git a/regression.sh b/regression.sh new file mode 100755 index 000000000..245f09178 --- /dev/null +++ b/regression.sh @@ -0,0 +1,58 @@ +#!/bin/bash + +if [ -z "$1" ] ; then + echo "Usage: $0 startdate [enddate=now] [revisions-step=10]" + echo "Runs regression tests for all Git revisions up to specified date," + echo "and produces the FPS measurements for each of the revisions." + echo "Naturally, you'll need to have an Android device connected to USB port." + echo "Also, it messes up your current Git branch, so backup all your current changes." +fi + +if echo "$0" | grep "regression/run-regression.sh" ; then +echo Running FPS regression tests +else +mkdir -p regression +cp -f "$0" regression/run-regression.sh +chmod a+x regression/run-regression.sh +regression/run-regression.sh "$@" +exit $? +fi + +FROM="$1" +FROM="`git log -n 1 --format='%cD' \"@{$FROM}\" --`" +TO="$2" +if [ -z "$TODATE" ] ; then + TO="`git log -n 1 --format='%cD' --`" +fi +STEP="$3" +if [ -z "$STEP" ] ; then + STEP=10 +fi + +echo Revisions from "$FROM" to "$TO" , step "$STEP" +rm -rf regression/regression +cp -r project/jni/application/regression regression/regression + +git checkout -f "@{$TO}" +CURRENT="`git log -n 1 --format='%cD' --`" +while [ `date -d "$CURRENT" "+%s"` -gt `date -d "$FROM" "+%s"` ] ; do +CURFMT="`git log -n 1 --format='%ci' -- | sed 's/[+].*//' | sed 's/ /::/'`" +echo $CURFMT +rm -f project/jni/application/src +rm -rf project/jni/application/regression +cp -rf regression/regression project/jni/application/regression +ln -s regression project/jni/application/src +./ChangeAppSettings.sh -a +cd project +rm -rf obj +echo "#define BUILDDATE \"$CURFMT\"" > project/jni/application/regression/regression.h +nice -n19 ndk-build V=1 -j4 && ant debug && cp -f bin/DemoActivity-debug.apk ../regression/$CURFMT.apk +cd .. +adb install -r $CURFMT.apk +adb shell am start -n net.olofson.ballfield.regression/.MainActivity +sleep 5 +adb shell logcat -d -t 20 | grep "SDL REGRESSION BUILDDATE $CURFMT" >> regression/regression.txt + +git checkout -f "@{$STEP}" +CURRENT="`git log -n 1 --format='%cD' --`" +done