annotate test/automated/Makefile @ 3746:be037e51f080 gsoc2009_unit_tests

Allocate memory for testsuite/testcase name so pointer doesn't get bashed.
author Edgar Simo <bobbens@gmail.com>
date Tue, 04 Aug 2009 16:34:04 +0000
parents 2b000dd830e8
children 427f059bc814
rev   line source
3711
80839fc6b8e1 First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
1
80839fc6b8e1 First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
2
3728
97e9704fc267 Using common infrastructure.
Edgar Simo <bobbens@gmail.com>
parents: 3722
diff changeset
3 CFLAGS := -W -Wall -Wextra -g -I. `sdl-config --cflags`
3717
1e46139bc4bc Fixed my setup, putting a more universal makefile up.
Edgar Simo <bobbens@gmail.com>
parents: 3715
diff changeset
4 LDFLAGS := `sdl-config --libs`
3711
80839fc6b8e1 First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
5
3715
3c9d9c052c8f Initial revision of SDL_Surface testsuite.
Edgar Simo <bobbens@gmail.com>
parents: 3714
diff changeset
6 # If it doesn't pick up defaults
3717
1e46139bc4bc Fixed my setup, putting a more universal makefile up.
Edgar Simo <bobbens@gmail.com>
parents: 3715
diff changeset
7 #CFLAGS := -I. -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/local/include/SDL
1e46139bc4bc Fixed my setup, putting a more universal makefile up.
Edgar Simo <bobbens@gmail.com>
parents: 3715
diff changeset
8 #LDFLAGS := -lm -ldl -lesd -lpthread
3715
3c9d9c052c8f Initial revision of SDL_Surface testsuite.
Edgar Simo <bobbens@gmail.com>
parents: 3714
diff changeset
9
3740
e451d5d288e9 Merged into one big app, while keeping modular applications also.
Edgar Simo <bobbens@gmail.com>
parents: 3736
diff changeset
10 SRC := testsdl.c \
e451d5d288e9 Merged into one big app, while keeping modular applications also.
Edgar Simo <bobbens@gmail.com>
parents: 3736
diff changeset
11 rwops/rwops.c \
e451d5d288e9 Merged into one big app, while keeping modular applications also.
Edgar Simo <bobbens@gmail.com>
parents: 3736
diff changeset
12 platform/platform.c \
e451d5d288e9 Merged into one big app, while keeping modular applications also.
Edgar Simo <bobbens@gmail.com>
parents: 3736
diff changeset
13 surface/surface.c \
e451d5d288e9 Merged into one big app, while keeping modular applications also.
Edgar Simo <bobbens@gmail.com>
parents: 3736
diff changeset
14 render/render.c
3728
97e9704fc267 Using common infrastructure.
Edgar Simo <bobbens@gmail.com>
parents: 3722
diff changeset
15 COMMON_SRC := SDL_at.c common/common.c
3711
80839fc6b8e1 First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
16 COMMON_INCLUDE := SDL_at.h
80839fc6b8e1 First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
17
3741
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
18 TESTS_ALL := testsdl rwops/rwops platform/platform surface/surface render/render
3711
80839fc6b8e1 First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
19
80839fc6b8e1 First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
20
3712
916469fbdc29 Make makefile a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents: 3711
diff changeset
21 .PHONY: all clean test
916469fbdc29 Make makefile a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents: 3711
diff changeset
22
916469fbdc29 Make makefile a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents: 3711
diff changeset
23
3741
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
24 all: $(TESTS_ALL)
3712
916469fbdc29 Make makefile a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents: 3711
diff changeset
25
3714
1b710c8e4cfb Test target should build if needed.
Edgar Simo <bobbens@gmail.com>
parents: 3713
diff changeset
26 test: all
3742
2b000dd830e8 Run testsdl instead of the individual testcases.
Edgar Simo <bobbens@gmail.com>
parents: 3741
diff changeset
27 @./testsdl
3711
80839fc6b8e1 First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
28
3741
808fad5fb593 Added command line options.
Edgar Simo <bobbens@gmail.com>
parents: 3740
diff changeset
29 testsdl: $(SRC) $(COMMON_SRC)
3740
e451d5d288e9 Merged into one big app, while keeping modular applications also.
Edgar Simo <bobbens@gmail.com>
parents: 3736
diff changeset
30 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(SRC) $(COMMON_SRC)
e451d5d288e9 Merged into one big app, while keeping modular applications also.
Edgar Simo <bobbens@gmail.com>
parents: 3736
diff changeset
31
3732
e552b7acd45a Better handling of makefile dependencies.
Edgar Simo <bobbens@gmail.com>
parents: 3730
diff changeset
32 rwops/rwops: rwops/rwops.c $(COMMON_INCLUDE) $(COMMON_SRC)
3740
e451d5d288e9 Merged into one big app, while keeping modular applications also.
Edgar Simo <bobbens@gmail.com>
parents: 3736
diff changeset
33 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ rwops/rwops.c $(COMMON_SRC) -DTEST_STANDALONE
3712
916469fbdc29 Make makefile a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents: 3711
diff changeset
34
3736
78f544eded7b Added platform test based ot testplatform.c.
Edgar Simo <bobbens@gmail.com>
parents: 3732
diff changeset
35 platform/platform: platform/platform.c $(COMMON_INCLUDE) $(COMMON_SRC)
3740
e451d5d288e9 Merged into one big app, while keeping modular applications also.
Edgar Simo <bobbens@gmail.com>
parents: 3736
diff changeset
36 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ platform/platform.c $(COMMON_SRC) -DTEST_STANDALONE
3736
78f544eded7b Added platform test based ot testplatform.c.
Edgar Simo <bobbens@gmail.com>
parents: 3732
diff changeset
37
3732
e552b7acd45a Better handling of makefile dependencies.
Edgar Simo <bobbens@gmail.com>
parents: 3730
diff changeset
38 surface/surface: surface/surface.c $(COMMON_INCLUDE) $(COMMON_SRC)
3740
e451d5d288e9 Merged into one big app, while keeping modular applications also.
Edgar Simo <bobbens@gmail.com>
parents: 3736
diff changeset
39 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ surface/surface.c $(COMMON_SRC) -DTEST_STANDALONE
3715
3c9d9c052c8f Initial revision of SDL_Surface testsuite.
Edgar Simo <bobbens@gmail.com>
parents: 3714
diff changeset
40
3732
e552b7acd45a Better handling of makefile dependencies.
Edgar Simo <bobbens@gmail.com>
parents: 3730
diff changeset
41 render/render: render/render.c $(COMMON_INCLUDE) $(COMMON_SRC)
3740
e451d5d288e9 Merged into one big app, while keeping modular applications also.
Edgar Simo <bobbens@gmail.com>
parents: 3736
diff changeset
42 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ render/render.c $(COMMON_SRC) -DTEST_STANDALONE
3730
dafd796f0c95 * Added preliminary render tests, missing some SDL functions to work properly.
Edgar Simo <bobbens@gmail.com>
parents: 3728
diff changeset
43
3712
916469fbdc29 Make makefile a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents: 3711
diff changeset
44 clean:
916469fbdc29 Make makefile a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents: 3711
diff changeset
45 $(RM) $(TESTS_ALL)