test/automated/Makefile
author David Ludwig <dludwig@pobox.com>
Tue, 12 Feb 2013 12:57:06 -0500
changeset 8424 3cf9501008f1
parent 6339 3f5867d48dcc
permissions -rw-r--r--
WinRT: fixed bug: SDL_CreateWindow wouldn't work after an initial window was created + destroyed
slouken@3259
     1
slouken@3259
     2
gabomdq@6339
     3
CFLAGS  := -W -Wall -Wextra -g `sdl2-config --prefix=/usr/local --cflags` -DSDL_NO_COMPAT
gabomdq@6339
     4
LDFLAGS := `sdl2-config --prefix=/usr/local --libs`
slouken@3259
     5
slouken@3259
     6
# If it doesn't pick up defaults
gabomdq@6339
     7
#CFLAGS  := -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/local/include/SDL2
slouken@3259
     8
#LDFLAGS := -lm -ldl -lesd -lpthread
slouken@3259
     9
slouken@3259
    10
SRC         	:= testsdl.c \
slouken@3541
    11
						platform/platform.c \
slouken@3541
    12
						rect/rect.c \
slouken@3259
    13
						surface/surface.c \
slouken@3259
    14
						render/render.c \
slouken@3259
    15
						audio/audio.c
slouken@3259
    16
COMMON_SRC     := SDL_at.c common/common.c
slouken@3259
    17
COMMON_INCLUDE := SDL_at.h
slouken@3259
    18
slouken@5153
    19
RWOPS_SRC      := rwops/rwops.c rwops/TestSupportRWops_Generic.c
slouken@5153
    20
slouken@3259
    21
TESTS_ALL := testsdl \
slouken@3541
    22
	platform/platform \
slouken@3259
    23
	rwops/rwops \
slouken@3541
    24
	rect/rect \
slouken@3259
    25
	surface/surface \
slouken@3259
    26
	render/render \
slouken@3259
    27
	audio/audio
slouken@3259
    28
slouken@3259
    29
slouken@3259
    30
.PHONY: all clean test
slouken@3259
    31
slouken@3259
    32
slouken@3259
    33
all: $(TESTS_ALL)
slouken@3259
    34
slouken@3259
    35
test: all
slouken@3259
    36
	@./testsdl
slouken@3259
    37
slouken@5153
    38
testsdl: $(SRC) $(RWOPS_SRC) $(COMMON_SRC)
gabomdq@6339
    39
	$(CC) $(CFLAGS) -o $@ $(SRC) $(RWOPS_SRC) $(COMMON_SRC) $(LDFLAGS)
slouken@3259
    40
slouken@3541
    41
platform/platform: platform/platform.c $(COMMON_INCLUDE) $(COMMON_SRC)
gabomdq@6339
    42
	$(CC) $(CFLAGS) -o $@ platform/platform.c $(COMMON_SRC) -DTEST_STANDALONE $(LDFLAGS)
slouken@3541
    43
slouken@5153
    44
rwops/rwops: $(RWOPS_SRC) $(COMMON_INCLUDE) $(COMMON_SRC)
gabomdq@6339
    45
	$(CC) $(CFLAGS) -o $@ $(RWOPS_SRC) $(COMMON_SRC) -DTEST_STANDALONE $(LDFLAGS)
slouken@3259
    46
slouken@3541
    47
rect/rect: rect/rect.c $(COMMON_INCLUDE) $(COMMON_SRC)
gabomdq@6339
    48
	$(CC) $(CFLAGS) -o $@ rect/rect.c $(COMMON_SRC) -DTEST_STANDALONE $(LDFLAGS)
slouken@3259
    49
slouken@3259
    50
surface/surface: surface/surface.c $(COMMON_INCLUDE) $(COMMON_SRC)
gabomdq@6339
    51
	$(CC) $(CFLAGS) -o $@ surface/surface.c $(COMMON_SRC) -DTEST_STANDALONE $(LDFLAGS)
slouken@3259
    52
slouken@3259
    53
render/render: render/render.c $(COMMON_INCLUDE) $(COMMON_SRC)
gabomdq@6339
    54
	$(CC) $(CFLAGS) -o $@ render/render.c $(COMMON_SRC) -DTEST_STANDALONE $(LDFLAGS)
slouken@3259
    55
slouken@3259
    56
audio/audio: audio/audio.c $(COMMON_INCLUDE) $(COMMON_SRC)
gabomdq@6339
    57
	$(CC) $(CFLAGS) -o $@ audio/audio.c $(COMMON_SRC) -DTEST_STANDALONE $(LDFLAGS)
slouken@3259
    58
slouken@3259
    59
clean:
slouken@3259
    60
	$(RM) $(TESTS_ALL)