Makefile.pandora
author Alex Szpakowski <slime73@gmail.com>
Thu, 15 Jan 2015 01:06:14 -0400
branchiOS-improvements
changeset 9532 318042c16b76
parent 7667 be1cc6f55840
child 10203 ed1bad553a56
permissions -rw-r--r--
Several improvements to the iOS backend:

- Added new custom launch screen code. It uses the launch screen nib when available on iOS 8+, the launch images dictionary if the launch screen nib isn't available, and the old standard image names if the launch image dictionary isn't in the plist.
The launch screen is now hidden during the first call to SDL_PumpEvents rather than SDL_CreateWindow so apps can have the launch screen still visible if they do time-consuming loading after creating their window. It also fades out in roughly the same way as the system launch screen behavior.
It can be disabled by setting the SDL_IPHONE_LAUNCHSCREEN define in SDL_config_iphoneos.h to 0.

- A blank UIView is now created and displayed when the window is first created. The old behavior was to defer creating any view until SDL_GL_CreateContext, which prevented rotation, touch events, and other windowing-related things from working until then. This also makes it easier to use SDL_GetWindowWMInfo after creating a window.

- Moved the keyboard and animation callback code from SDL's UIView subclasses to its UIViewController subclass, which lets them work properly in all cases when a SDL window is valid, even before SDL_GL_CreateContext is called and after SDL_GL_DeleteContext is called.

- SDL_GL_CreateContext, SDL_GL_SwapWindow, SDL_GL_MakeCurrent, and SDL_GL_DeleteContext are more robust.

- Fixed some edge cases where SDL windows weren't rotating properly or their reported sizes were out of sync with their actual sizes.

- Removed all calls to [UIApplication setStatusBarOrientation:]. It doesn't seem to work as expected in all cases in recent iOS versions.

- Some code style cleanup.
slouken@3161
     1
# Makefile to build the pandora SDL library
slouken@3161
     2
slouken@3161
     3
AR	= arm-none-linux-gnueabi-ar
slouken@3161
     4
RANLIB	= arm-none-linux-gnueabi-ranlib
slouken@3161
     5
CC = arm-none-linux-gnueabi-gcc
slouken@3161
     6
CXX = arm-none-linux-gnueabi-g++
slouken@3161
     7
STRIP = arm-none-linux-gnueabi-strip
slouken@3161
     8
slouken@3161
     9
CFLAGS  = -O3 -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfloat-abi=softfp \
slouken@3161
    10
	-mfpu=neon -ftree-vectorize -ffast-math -fomit-frame-pointer -fno-strict-aliasing -fsingle-precision-constant \
slouken@3218
    11
	-I./include -I$(PNDSDK)/usr/include -DSDL_REVISION=0
slouken@3161
    12
slouken@3161
    13
TARGET  = libSDL.a
slouken@3161
    14
slouken@4471
    15
SOURCES = ./src/*.c ./src/audio/*.c ./src/cpuinfo/*.c ./src/events/*.c \
slouken@3161
    16
	./src/file/*.c ./src/stdlib/*.c ./src/thread/*.c ./src/timer/*.c ./src/video/*.c \
icculus@3170
    17
	./src/joystick/*.c ./src/haptic/*.c ./src/power/*.c ./src/video/dummy/*.c ./src/audio/disk/*.c \
icculus@5586
    18
	./src/audio/dummy/*.c ./src/loadso/dlopen/*.c ./src/audio/dsp/*.c \
slouken@3161
    19
	./src/thread/pthread/SDL_systhread.c ./src/thread/pthread/SDL_syssem.c \
slouken@3161
    20
	./src/thread/pthread/SDL_sysmutex.c ./src/thread/pthread/SDL_syscond.c \
slouken@4471
    21
	./src/joystick/linux/*.c ./src/haptic/linux/*.c ./src/timer/unix/*.c \
icculus@7667
    22
	./src/atomic/linux/*.c ./src/filesystem/unix/*.c \
slouken@4471
    23
	./src/video/pandora/SDL_pandora.o ./src/video/pandora/SDL_pandora_events.o ./src/video/x11/*.c 
slouken@3161
    24
	
slouken@3161
    25
slouken@3161
    26
OBJECTS = $(shell echo $(SOURCES) | sed -e 's,\.c,\.o,g')
slouken@3161
    27
slouken@3218
    28
CONFIG_H = $(shell cp include/SDL_config_pandora.h include/SDL_config.h && touch include/SDL_revision.h)
slouken@3218
    29
slouken@3161
    30
all: $(TARGET)
slouken@3161
    31
slouken@3161
    32
$(TARGET): $(CONFIG_H) $(OBJECTS)
slouken@3161
    33
	$(AR) crv $@ $^
slouken@3161
    34
	$(RANLIB) $@
slouken@3161
    35
slouken@3161
    36
clean:
slouken@3161
    37
	rm -f $(TARGET) $(OBJECTS)