Makefile.minimal
author Sylvain Becker <sylvain.becker@gmail.com>
Thu, 03 Jan 2019 23:22:50 +0100
changeset 12499 e6130a4cca7a
parent 12131 9601849b3079
permissions -rw-r--r--
Android: concurrency issue with egl_surface EGL_BAD_SURFACE - (bug 4142)

Occurs when application goes to background:
- Java activity is destroying SurfaceView holder and "egl_surface" (in onNativeSurfaceDestroyed())
- While native thread is in Android_GLES_SwapWindow(), prepared to call SDL_EGL_SwapBuffers()

The error is "call to eglSwapBuffers failed, reporting an error of EGL_BAD_SURFACE"

It an be reproduced easily by adding a SDL_Delay(100) at the begining of SDL_EGL_SwapBuffers(),
and putting the application into background.
     1 # Makefile to build the SDL library
     2 
     3 INCLUDE = -I./include
     4 CFLAGS  = -g -O2 $(INCLUDE)
     5 AR	= ar
     6 RANLIB	= ranlib
     7 
     8 TARGET  = libSDL.a
     9 SOURCES = \
    10 	src/*.c \
    11 	src/audio/*.c \
    12 	src/audio/dummy/*.c \
    13 	src/cpuinfo/*.c \
    14 	src/events/*.c \
    15 	src/file/*.c \
    16 	src/haptic/*.c \
    17 	src/haptic/dummy/*.c \
    18 	src/joystick/*.c \
    19 	src/joystick/dummy/*.c \
    20 	src/loadso/dummy/*.c \
    21 	src/power/*.c \
    22 	src/filesystem/dummy/*.c \
    23 	src/render/*.c \
    24 	src/render/software/*.c \
    25 	src/sensor/*.c \
    26 	src/sensor/dummy/*.c \
    27 	src/stdlib/*.c \
    28 	src/thread/*.c \
    29 	src/thread/generic/*.c \
    30 	src/timer/*.c \
    31 	src/timer/dummy/*.c \
    32 	src/video/*.c \
    33 	src/video/dummy/*.c \
    34 
    35 OBJECTS = $(shell echo $(SOURCES) | sed -e 's,\.c,\.o,g')
    36 
    37 all: $(TARGET)
    38 
    39 $(TARGET): $(OBJECTS)
    40 	$(AR) crv $@ $^
    41 	$(RANLIB) $@
    42 
    43 clean:
    44 	rm -f $(TARGET) $(OBJECTS)