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