test/Makefile.in
author Sam Lantinga <slouken@libsdl.org>
Fri, 15 Nov 2013 22:05:26 -0800
changeset 7994 37c48b4ecb0c
parent 7807 73da2747c268
child 8014 0a4b6dec7de5
permissions -rw-r--r--
Added viewport test, contributed by Andreas Schiffler and improved by me and Ryan Gordon.
If it works correctly you should see a square moving from the upper left to the lower right, with a little yellow box at the top of the moving square.

You can pass --target as a command line option to have it use a render target instead of rendering directly to the screen. The output should be identical in this case.
slouken@1380
     1
# Makefile to build the SDL tests
slouken@1380
     2
slouken@1380
     3
srcdir  = @srcdir@
slouken@1380
     4
slouken@1380
     5
CC      = @CC@
slouken@1380
     6
EXE	= @EXE@
urkle@7807
     7
CFLAGS  = @CFLAGS@ -g
slouken@1380
     8
LIBS	= @LIBS@
slouken@1380
     9
slouken@5232
    10
TARGETS = \
slouken@5232
    11
	checkkeys$(EXE) \
slouken@5232
    12
	loopwave$(EXE) \
icculus@6412
    13
	testaudioinfo$(EXE) \
slouken@6769
    14
	testautomation$(EXE) \
slouken@5232
    15
	testdraw2$(EXE) \
slouken@7529
    16
	testdrawchessboard$(EXE) \
urkle@7807
    17
	testdropfile$(EXE) \
slouken@5232
    18
	testerror$(EXE) \
slouken@5232
    19
	testfile$(EXE) \
slouken@6690
    20
	testgamecontroller$(EXE) \
slouken@5232
    21
	testgesture$(EXE) \
slouken@5232
    22
	testgl2$(EXE) \
slouken@5232
    23
	testgles$(EXE) \
slouken@5232
    24
	testhaptic$(EXE) \
slouken@5508
    25
	testrumble$(EXE) \
slouken@5508
    26
	testthread$(EXE) \
slouken@5232
    27
	testiconv$(EXE) \
slouken@5232
    28
	testime$(EXE) \
slouken@5232
    29
	testintersections$(EXE) \
slouken@6311
    30
	testrelative$(EXE) \
slouken@5232
    31
	testjoystick$(EXE) \
slouken@5232
    32
	testkeys$(EXE) \
slouken@5232
    33
	testloadso$(EXE) \
slouken@5232
    34
	testlock$(EXE) \
slouken@5232
    35
	testmultiaudio$(EXE) \
slouken@6175
    36
	testnative$(EXE) \
slouken@5232
    37
	testoverlay2$(EXE) \
slouken@5232
    38
	testplatform$(EXE) \
slouken@5232
    39
	testpower$(EXE) \
icculus@7667
    40
	testfilesystem$(EXE) \
slouken@6232
    41
	testrendertarget$(EXE) \
slouken@5232
    42
	testresample$(EXE) \
slouken@5240
    43
	testscale$(EXE) \
slouken@5232
    44
	testsem$(EXE) \
slouken@5232
    45
	testshader$(EXE) \
slouken@5232
    46
	testshape$(EXE) \
slouken@5232
    47
	testsprite2$(EXE) \
slouken@5232
    48
	testspriteminimal$(EXE) \
slouken@5254
    49
	teststreaming$(EXE) \
slouken@5232
    50
	testtimer$(EXE) \
slouken@5232
    51
	testver$(EXE) \
slouken@7994
    52
	testviewport$(EXE) \
slouken@5232
    53
	testwm2$(EXE) \
slouken@5232
    54
	torturethread$(EXE) \
gabomdq@6320
    55
	testrendercopyex$(EXE) \
slouken@6614
    56
	testmessage$(EXE) \
slouken@1380
    57
slouken@1914
    58
all: Makefile $(TARGETS)
slouken@1914
    59
slouken@1914
    60
Makefile: $(srcdir)/Makefile.in
slouken@1914
    61
	$(SHELL) config.status $@
slouken@1380
    62
slouken@1380
    63
checkkeys$(EXE): $(srcdir)/checkkeys.c
slouken@6601
    64
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
slouken@1380
    65
slouken@1380
    66
loopwave$(EXE): $(srcdir)/loopwave.c
slouken@6601
    67
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
slouken@1380
    68
icculus@3017
    69
testresample$(EXE): $(srcdir)/testresample.c
slouken@6601
    70
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
icculus@3017
    71
icculus@2049
    72
testaudioinfo$(EXE): $(srcdir)/testaudioinfo.c
slouken@6601
    73
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
icculus@2049
    74
slouken@6769
    75
testautomation$(EXE): $(srcdir)/testautomation.c \
slouken@7216
    76
		      $(srcdir)/testautomation_audio.c \
slouken@6769
    77
		      $(srcdir)/testautomation_clipboard.c \
slouken@7216
    78
		      $(srcdir)/testautomation_events.c \
slouken@7216
    79
		      $(srcdir)/testautomation_keyboard.c \
jorgen@6866
    80
		      $(srcdir)/testautomation_main.c \
slouken@7216
    81
		      $(srcdir)/testautomation_mouse.c \
slouken@7216
    82
		      $(srcdir)/testautomation_pixels.c \
slouken@6769
    83
		      $(srcdir)/testautomation_platform.c \
slouken@6769
    84
		      $(srcdir)/testautomation_rect.c \
slouken@6769
    85
		      $(srcdir)/testautomation_render.c \
aschiffler@6772
    86
		      $(srcdir)/testautomation_rwops.c \
slouken@7216
    87
		      $(srcdir)/testautomation_sdltest.c \
slouken@7216
    88
		      $(srcdir)/testautomation_stdlib.c \
aschiffler@6800
    89
		      $(srcdir)/testautomation_surface.c \
aschiffler@6801
    90
		      $(srcdir)/testautomation_syswm.c \
aschiffler@7134
    91
		      $(srcdir)/testautomation_timer.c \
slouken@7216
    92
		      $(srcdir)/testautomation_video.c
slouken@7280
    93
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS) 
slouken@6769
    94
icculus@2049
    95
testmultiaudio$(EXE): $(srcdir)/testmultiaudio.c
slouken@6601
    96
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
icculus@2049
    97
slouken@5254
    98
testatomic$(EXE): $(srcdir)/testatomic.c
slouken@6601
    99
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
slouken@5254
   100
slouken@6785
   101
testintersections$(EXE): $(srcdir)/testintersections.c
slouken@6601
   102
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
slouken@2994
   103
slouken@6785
   104
testrelative$(EXE): $(srcdir)/testrelative.c
slouken@6601
   105
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
slouken@6311
   106
slouken@6785
   107
testdraw2$(EXE): $(srcdir)/testdraw2.c
slouken@6601
   108
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
slouken@2914
   109
slouken@7529
   110
testdrawchessboard$(EXE): $(srcdir)/testdrawchessboard.c
slouken@7529
   111
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
slouken@7529
   112
urkle@7807
   113
testdropfile$(EXE): $(srcdir)/testdropfile.c
urkle@7807
   114
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
urkle@7807
   115
slouken@1380
   116
testerror$(EXE): $(srcdir)/testerror.c
slouken@6601
   117
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
slouken@1380
   118
slouken@1453
   119
testfile$(EXE): $(srcdir)/testfile.c
slouken@6601
   120
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
slouken@1453
   121
slouken@6690
   122
testgamecontroller$(EXE): $(srcdir)/testgamecontroller.c
slouken@6690
   123
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
slouken@6690
   124
 
slouken@5254
   125
testgesture$(EXE): $(srcdir)/testgesture.c
slouken@6601
   126
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS) @MATHLIB@
slouken@5254
   127
 
slouken@6785
   128
testgl2$(EXE): $(srcdir)/testgl2.c
slouken@6601
   129
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS) @GLLIB@ @MATHLIB@
slouken@1914
   130
slouken@6785
   131
testgles$(EXE): $(srcdir)/testgles.c
gabomdq@7794
   132
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS) @GLESLIB@ @MATHLIB@
slouken@3087
   133
slouken@5254
   134
testhaptic$(EXE): $(srcdir)/testhaptic.c
slouken@6601
   135
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
slouken@5254
   136
slouken@5360
   137
testrumble$(EXE): $(srcdir)/testrumble.c
slouken@6601
   138
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
slouken@5360
   139
slouken@5508
   140
testthread$(EXE): $(srcdir)/testthread.c
slouken@6601
   141
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
slouken@1380
   142
slouken@1501
   143
testiconv$(EXE): $(srcdir)/testiconv.c
slouken@6601
   144
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
slouken@1501
   145
slouken@6785
   146
testime$(EXE): $(srcdir)/testime.c
slouken@6601
   147
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS) @SDL_TTF_LIB@
slouken@5254
   148
slouken@6785
   149
testjoystick$(EXE): $(srcdir)/testjoystick.c
slouken@6601
   150
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
slouken@1380
   151
slouken@1380
   152
testkeys$(EXE): $(srcdir)/testkeys.c
slouken@6601
   153
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
slouken@1380
   154
slouken@5254
   155
testloadso$(EXE): $(srcdir)/testloadso.c
slouken@6601
   156
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
slouken@5254
   157
slouken@1380
   158
testlock$(EXE): $(srcdir)/testlock.c
slouken@6601
   159
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
slouken@1380
   160
icculus@6390
   161
ifeq (@ISMACOSX@,true)
slouken@6175
   162
testnative$(EXE): $(srcdir)/testnative.c \
slouken@7495
   163
			$(srcdir)/testnativecocoa.m \
slouken@7495
   164
			$(srcdir)/testnativex11.c
slouken@7495
   165
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS) -framework Cocoa @XLIB@
icculus@6390
   166
endif
icculus@6390
   167
icculus@6390
   168
ifeq (@ISWINDOWS@,true)
icculus@6390
   169
testnative$(EXE): $(srcdir)/testnative.c \
icculus@6390
   170
			$(srcdir)/testnativew32.c
slouken@6601
   171
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
icculus@6390
   172
endif
icculus@6390
   173
icculus@6390
   174
ifeq (@ISUNIX@,true)
icculus@6390
   175
testnative$(EXE): $(srcdir)/testnative.c \
icculus@6390
   176
			$(srcdir)/testnativex11.c
slouken@7495
   177
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS) @XLIB@
icculus@6390
   178
endif
slouken@6175
   179
slouken@1380
   180
testoverlay2$(EXE): $(srcdir)/testoverlay2.c
slouken@6601
   181
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
slouken@1380
   182
slouken@1421
   183
testplatform$(EXE): $(srcdir)/testplatform.c
slouken@6601
   184
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
slouken@1421
   185
slouken@5254
   186
testpower$(EXE): $(srcdir)/testpower.c
slouken@6601
   187
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
slouken@5254
   188
icculus@7667
   189
testfilesystem$(EXE): $(srcdir)/testfilesystem.c
icculus@7667
   190
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
icculus@7667
   191
slouken@6785
   192
testrendertarget$(EXE): $(srcdir)/testrendertarget.c
slouken@6601
   193
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
slouken@6232
   194
slouken@6785
   195
testscale$(EXE): $(srcdir)/testscale.c
slouken@6601
   196
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
slouken@5240
   197
slouken@1380
   198
testsem$(EXE): $(srcdir)/testsem.c
slouken@6601
   199
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
slouken@1380
   200
slouken@5232
   201
testshader$(EXE): $(srcdir)/testshader.c
slouken@6601
   202
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS) @GLLIB@ @MATHLIB@
slouken@5232
   203
eligottlieb@4799
   204
testshape$(EXE): $(srcdir)/testshape.c
slouken@6601
   205
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
eligottlieb@4799
   206
slouken@6785
   207
testsprite2$(EXE): $(srcdir)/testsprite2.c
slouken@6785
   208
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
slouken@1895
   209
slouken@5254
   210
testspriteminimal$(EXE): $(srcdir)/testspriteminimal.c
slouken@6601
   211
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS) @MATHLIB@
slouken@5254
   212
slouken@5254
   213
teststreaming$(EXE): $(srcdir)/teststreaming.c
slouken@6601
   214
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS) @MATHLIB@
slouken@5254
   215
slouken@1380
   216
testtimer$(EXE): $(srcdir)/testtimer.c
slouken@6601
   217
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
slouken@1380
   218
slouken@1380
   219
testver$(EXE): $(srcdir)/testver.c
slouken@6601
   220
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
slouken@1380
   221
slouken@7994
   222
testviewport$(EXE): $(srcdir)/testviewport.c
slouken@7994
   223
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
slouken@7994
   224
slouken@6785
   225
testwm2$(EXE): $(srcdir)/testwm2.c
slouken@6601
   226
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
slouken@1895
   227
slouken@1380
   228
torturethread$(EXE): $(srcdir)/torturethread.c
slouken@6601
   229
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
slouken@1380
   230
slouken@6785
   231
testrendercopyex$(EXE): $(srcdir)/testrendercopyex.c
slouken@6601
   232
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS) @MATHLIB@
slouken@6614
   233
slouken@6614
   234
testmessage$(EXE): $(srcdir)/testmessage.c
slouken@6614
   235
	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
slouken@6614
   236
slouken@1380
   237
clean:
slouken@1380
   238
	rm -f $(TARGETS)
slouken@1380
   239
slouken@1380
   240
distclean: clean
slouken@1380
   241
	rm -f Makefile
slouken@1380
   242
	rm -f config.status config.cache config.log
slouken@1380
   243
	rm -rf $(srcdir)/autom4te*