annotate test/automated/Makefile @ 3732:e552b7acd45a gsoc2009_unit_tests

Better handling of makefile dependencies.
author Edgar Simo <bobbens@gmail.com>
date Wed, 15 Jul 2009 14:40:09 +0000
parents dafd796f0c95
children 78f544eded7b
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
3728
97e9704fc267 Using common infrastructure.
Edgar Simo <bobbens@gmail.com>
parents: 3722
diff changeset
10 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
11 COMMON_INCLUDE := SDL_at.h
80839fc6b8e1 First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
12
3730
dafd796f0c95 * Added preliminary render tests, missing some SDL functions to work properly.
Edgar Simo <bobbens@gmail.com>
parents: 3728
diff changeset
13 TESTS_ALL := rwops/rwops surface/surface render/render
3711
80839fc6b8e1 First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
14
80839fc6b8e1 First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
15
3712
916469fbdc29 Make makefile a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents: 3711
diff changeset
16 .PHONY: all clean test
916469fbdc29 Make makefile a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents: 3711
diff changeset
17
916469fbdc29 Make makefile a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents: 3711
diff changeset
18
916469fbdc29 Make makefile a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents: 3711
diff changeset
19 all: $(TESTS_ALL)
916469fbdc29 Make makefile a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents: 3711
diff changeset
20
3714
1b710c8e4cfb Test target should build if needed.
Edgar Simo <bobbens@gmail.com>
parents: 3713
diff changeset
21 test: all
3713
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents: 3712
diff changeset
22 @./rwops/rwops
3715
3c9d9c052c8f Initial revision of SDL_Surface testsuite.
Edgar Simo <bobbens@gmail.com>
parents: 3714
diff changeset
23 @./surface/surface
3730
dafd796f0c95 * Added preliminary render tests, missing some SDL functions to work properly.
Edgar Simo <bobbens@gmail.com>
parents: 3728
diff changeset
24 @./render/render
3711
80839fc6b8e1 First revision of the automated test suite.
Edgar Simo <bobbens@gmail.com>
parents:
diff changeset
25
3732
e552b7acd45a Better handling of makefile dependencies.
Edgar Simo <bobbens@gmail.com>
parents: 3730
diff changeset
26 rwops/rwops: rwops/rwops.c $(COMMON_INCLUDE) $(COMMON_SRC)
3713
a34bab848c7e Better output.
Edgar Simo <bobbens@gmail.com>
parents: 3712
diff changeset
27 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ rwops/rwops.c $(COMMON_SRC)
3712
916469fbdc29 Make makefile a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents: 3711
diff changeset
28
3732
e552b7acd45a Better handling of makefile dependencies.
Edgar Simo <bobbens@gmail.com>
parents: 3730
diff changeset
29 surface/surface: surface/surface.c $(COMMON_INCLUDE) $(COMMON_SRC)
3715
3c9d9c052c8f Initial revision of SDL_Surface testsuite.
Edgar Simo <bobbens@gmail.com>
parents: 3714
diff changeset
30 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ surface/surface.c $(COMMON_SRC)
3c9d9c052c8f Initial revision of SDL_Surface testsuite.
Edgar Simo <bobbens@gmail.com>
parents: 3714
diff changeset
31
3732
e552b7acd45a Better handling of makefile dependencies.
Edgar Simo <bobbens@gmail.com>
parents: 3730
diff changeset
32 render/render: render/render.c $(COMMON_INCLUDE) $(COMMON_SRC)
3730
dafd796f0c95 * Added preliminary render tests, missing some SDL functions to work properly.
Edgar Simo <bobbens@gmail.com>
parents: 3728
diff changeset
33 $(CC) $(CFLAGS) $(LDFLAGS) -o $@ render/render.c $(COMMON_SRC)
dafd796f0c95 * Added preliminary render tests, missing some SDL functions to work properly.
Edgar Simo <bobbens@gmail.com>
parents: 3728
diff changeset
34
3712
916469fbdc29 Make makefile a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents: 3711
diff changeset
35 clean:
916469fbdc29 Make makefile a bit more complete.
Edgar Simo <bobbens@gmail.com>
parents: 3711
diff changeset
36 $(RM) $(TESTS_ALL)