view test/automated/Makefile @ 3486:c87dbbde2bc2

Fixed bug #891 Mason Wheeler 2009-11-23 06:59:48 PST There's code in SDL_RecreateWindow specifically to handle SDL_WINDOW_FOREIGN, but it appears to have been overlooked in the allowed_flags constant. This causes the line window->flags = (flags & allowed_flags); to strip SDL_WINDOW_FOREIGN from the window's flags, which breaks some code in WIN_WindowProc in SDL_win32Events.c that treats foreign windows differently. This can be trivially fixed by defining allowed_flags as const Uint32 allowed_flags = (SDL_WINDOW_FULLSCREEN | SDL_WINDOW_OPENGL | SDL_WINDOW_BORDERLESS | SDL_WINDOW_RESIZABLE | SDL_WINDOW_INPUT_GRABBED | SDL_WINDOW_FOREIGN);
author Sam Lantinga <slouken@libsdl.org>
date Tue, 24 Nov 2009 04:59:50 +0000
parents c32c53fca10d
children 0c429a5fda8a
line wrap: on
line source



CFLAGS  := -W -Wall -Wextra -g `sdl-config --cflags`
LDFLAGS := `sdl-config --libs`

# If it doesn't pick up defaults
#CFLAGS  := -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/local/include/SDL
#LDFLAGS := -lm -ldl -lesd -lpthread

SRC         	:= testsdl.c \
						rwops/rwops.c \
						platform/platform.c \
						surface/surface.c \
						render/render.c \
						audio/audio.c
COMMON_SRC     := SDL_at.c common/common.c
COMMON_INCLUDE := SDL_at.h

TESTS_ALL := testsdl \
	rwops/rwops \
	platform/platform \
	surface/surface \
	render/render \
	audio/audio


.PHONY: all clean test


all: $(TESTS_ALL)

test: all
	@./testsdl

testsdl: $(SRC) $(COMMON_SRC)
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(SRC) $(COMMON_SRC)

rwops/rwops: rwops/rwops.c $(COMMON_INCLUDE) $(COMMON_SRC)
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ rwops/rwops.c $(COMMON_SRC) -DTEST_STANDALONE

platform/platform: platform/platform.c $(COMMON_INCLUDE) $(COMMON_SRC)
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ platform/platform.c $(COMMON_SRC) -DTEST_STANDALONE

surface/surface: surface/surface.c $(COMMON_INCLUDE) $(COMMON_SRC)
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ surface/surface.c $(COMMON_SRC) -DTEST_STANDALONE

render/render: render/render.c $(COMMON_INCLUDE) $(COMMON_SRC)
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ render/render.c $(COMMON_SRC) -DTEST_STANDALONE

audio/audio: audio/audio.c $(COMMON_INCLUDE) $(COMMON_SRC)
	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ audio/audio.c $(COMMON_SRC) -DTEST_STANDALONE

clean:
	$(RM) $(TESTS_ALL)