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
     1 
     2 
     3 CFLAGS  := -W -Wall -Wextra -g `sdl2-config --prefix=/usr/local --cflags` -DSDL_NO_COMPAT
     4 LDFLAGS := `sdl2-config --prefix=/usr/local --libs`
     5 
     6 # If it doesn't pick up defaults
     7 #CFLAGS  := -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/local/include/SDL2
     8 #LDFLAGS := -lm -ldl -lesd -lpthread
     9 
    10 SRC         	:= testsdl.c \
    11 						platform/platform.c \
    12 						rect/rect.c \
    13 						surface/surface.c \
    14 						render/render.c \
    15 						audio/audio.c
    16 COMMON_SRC     := SDL_at.c common/common.c
    17 COMMON_INCLUDE := SDL_at.h
    18 
    19 RWOPS_SRC      := rwops/rwops.c rwops/TestSupportRWops_Generic.c
    20 
    21 TESTS_ALL := testsdl \
    22 	platform/platform \
    23 	rwops/rwops \
    24 	rect/rect \
    25 	surface/surface \
    26 	render/render \
    27 	audio/audio
    28 
    29 
    30 .PHONY: all clean test
    31 
    32 
    33 all: $(TESTS_ALL)
    34 
    35 test: all
    36 	@./testsdl
    37 
    38 testsdl: $(SRC) $(RWOPS_SRC) $(COMMON_SRC)
    39 	$(CC) $(CFLAGS) -o $@ $(SRC) $(RWOPS_SRC) $(COMMON_SRC) $(LDFLAGS)
    40 
    41 platform/platform: platform/platform.c $(COMMON_INCLUDE) $(COMMON_SRC)
    42 	$(CC) $(CFLAGS) -o $@ platform/platform.c $(COMMON_SRC) -DTEST_STANDALONE $(LDFLAGS)
    43 
    44 rwops/rwops: $(RWOPS_SRC) $(COMMON_INCLUDE) $(COMMON_SRC)
    45 	$(CC) $(CFLAGS) -o $@ $(RWOPS_SRC) $(COMMON_SRC) -DTEST_STANDALONE $(LDFLAGS)
    46 
    47 rect/rect: rect/rect.c $(COMMON_INCLUDE) $(COMMON_SRC)
    48 	$(CC) $(CFLAGS) -o $@ rect/rect.c $(COMMON_SRC) -DTEST_STANDALONE $(LDFLAGS)
    49 
    50 surface/surface: surface/surface.c $(COMMON_INCLUDE) $(COMMON_SRC)
    51 	$(CC) $(CFLAGS) -o $@ surface/surface.c $(COMMON_SRC) -DTEST_STANDALONE $(LDFLAGS)
    52 
    53 render/render: render/render.c $(COMMON_INCLUDE) $(COMMON_SRC)
    54 	$(CC) $(CFLAGS) -o $@ render/render.c $(COMMON_SRC) -DTEST_STANDALONE $(LDFLAGS)
    55 
    56 audio/audio: audio/audio.c $(COMMON_INCLUDE) $(COMMON_SRC)
    57 	$(CC) $(CFLAGS) -o $@ audio/audio.c $(COMMON_SRC) -DTEST_STANDALONE $(LDFLAGS)
    58 
    59 clean:
    60 	$(RM) $(TESTS_ALL)