comparison test/automated/Makefile @ 3541:0c429a5fda8a

Added an automated test for rectangle routines, currently only testing line clipping. Use the Cohen-Sutherland algorithm for line clipping which uses integer math and preserves ordering of clipped points. Removed getopt() support in testsdl.c, replaced with simple argv scanning.
author Sam Lantinga <slouken@libsdl.org>
date Fri, 11 Dec 2009 09:22:34 +0000
parents c32c53fca10d
children f638ded38b8a
comparison
equal deleted inserted replaced
3540:3ad09fdbfcb0 3541:0c429a5fda8a
6 # If it doesn't pick up defaults 6 # If it doesn't pick up defaults
7 #CFLAGS := -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/local/include/SDL 7 #CFLAGS := -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/local/include/SDL
8 #LDFLAGS := -lm -ldl -lesd -lpthread 8 #LDFLAGS := -lm -ldl -lesd -lpthread
9 9
10 SRC := testsdl.c \ 10 SRC := testsdl.c \
11 platform/platform.c \
11 rwops/rwops.c \ 12 rwops/rwops.c \
12 platform/platform.c \ 13 rect/rect.c \
13 surface/surface.c \ 14 surface/surface.c \
14 render/render.c \ 15 render/render.c \
15 audio/audio.c 16 audio/audio.c
16 COMMON_SRC := SDL_at.c common/common.c 17 COMMON_SRC := SDL_at.c common/common.c
17 COMMON_INCLUDE := SDL_at.h 18 COMMON_INCLUDE := SDL_at.h
18 19
19 TESTS_ALL := testsdl \ 20 TESTS_ALL := testsdl \
21 platform/platform \
20 rwops/rwops \ 22 rwops/rwops \
21 platform/platform \ 23 rect/rect \
22 surface/surface \ 24 surface/surface \
23 render/render \ 25 render/render \
24 audio/audio 26 audio/audio
25 27
26 28
33 @./testsdl 35 @./testsdl
34 36
35 testsdl: $(SRC) $(COMMON_SRC) 37 testsdl: $(SRC) $(COMMON_SRC)
36 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(SRC) $(COMMON_SRC) 38 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(SRC) $(COMMON_SRC)
37 39
40 platform/platform: platform/platform.c $(COMMON_INCLUDE) $(COMMON_SRC)
41 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ platform/platform.c $(COMMON_SRC) -DTEST_STANDALONE
42
38 rwops/rwops: rwops/rwops.c $(COMMON_INCLUDE) $(COMMON_SRC) 43 rwops/rwops: rwops/rwops.c $(COMMON_INCLUDE) $(COMMON_SRC)
39 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ rwops/rwops.c $(COMMON_SRC) -DTEST_STANDALONE 44 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ rwops/rwops.c $(COMMON_SRC) -DTEST_STANDALONE
40 45
41 platform/platform: platform/platform.c $(COMMON_INCLUDE) $(COMMON_SRC) 46 rect/rect: rect/rect.c $(COMMON_INCLUDE) $(COMMON_SRC)
42 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ platform/platform.c $(COMMON_SRC) -DTEST_STANDALONE 47 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ rect/rect.c $(COMMON_SRC) -DTEST_STANDALONE
43 48
44 surface/surface: surface/surface.c $(COMMON_INCLUDE) $(COMMON_SRC) 49 surface/surface: surface/surface.c $(COMMON_INCLUDE) $(COMMON_SRC)
45 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ surface/surface.c $(COMMON_SRC) -DTEST_STANDALONE 50 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ surface/surface.c $(COMMON_SRC) -DTEST_STANDALONE
46 51
47 render/render: render/render.c $(COMMON_INCLUDE) $(COMMON_SRC) 52 render/render: render/render.c $(COMMON_INCLUDE) $(COMMON_SRC)