test/Makefile.in
author Ryan C. Gordon <icculus@icculus.org>
Thu, 18 Dec 2014 00:19:52 -0500
changeset 9278 8900afb78a19
parent 9012 aa058c87737b
child 9296 905df51500a0
permissions -rw-r--r--
Initial merge of Emscripten port!

With this commit, you can compile SDL2 with Emscripten
( http://emscripten.org/ ), and make your SDL-based C/C++ program
into a web app.

This port was due to the efforts of several people, including: Charlie Birks,
Sathyanarayanan Gunasekaran, Jukka Jylänki, Alon Zakai, Edward Rudd,
Bruce Mitchener, and Martin Gerhardy. (Thanks, everyone!)
     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 	loopwavequeue$(EXE) \
    14 	testatomic$(EXE) \
    15 	testaudioinfo$(EXE) \
    16 	testautomation$(EXE) \
    17 	testdraw2$(EXE) \
    18 	testdrawchessboard$(EXE) \
    19 	testdropfile$(EXE) \
    20 	testerror$(EXE) \
    21 	testfile$(EXE) \
    22 	testgamecontroller$(EXE) \
    23 	testgesture$(EXE) \
    24 	testgl2$(EXE) \
    25 	testgles$(EXE) \
    26 	testgles2$(EXE) \
    27 	testhaptic$(EXE) \
    28 	testhittesting$(EXE) \
    29 	testrumble$(EXE) \
    30 	testhotplug$(EXE) \
    31 	testthread$(EXE) \
    32 	testiconv$(EXE) \
    33 	testime$(EXE) \
    34 	testintersections$(EXE) \
    35 	testrelative$(EXE) \
    36 	testjoystick$(EXE) \
    37 	testkeys$(EXE) \
    38 	testloadso$(EXE) \
    39 	testlock$(EXE) \
    40 	testmultiaudio$(EXE) \
    41 	testmultiaudio2$(EXE) \
    42 	testnative$(EXE) \
    43 	testoverlay2$(EXE) \
    44 	testplatform$(EXE) \
    45 	testpower$(EXE) \
    46 	testfilesystem$(EXE) \
    47 	testrendertarget$(EXE) \
    48 	testresample$(EXE) \
    49 	testscale$(EXE) \
    50 	testsem$(EXE) \
    51 	testshader$(EXE) \
    52 	testshape$(EXE) \
    53 	testsprite2$(EXE) \
    54 	testspriteminimal$(EXE) \
    55 	teststreaming$(EXE) \
    56 	testtimer$(EXE) \
    57 	testver$(EXE) \
    58 	testviewport$(EXE) \
    59 	testwm2$(EXE) \
    60 	torturethread$(EXE) \
    61 	testrendercopyex$(EXE) \
    62 	testmessage$(EXE) \
    63 	controllermap$(EXE) \
    64 	
    65 all: Makefile $(TARGETS)
    66 
    67 Makefile: $(srcdir)/Makefile.in
    68 	$(SHELL) config.status $@
    69 
    70 checkkeys$(EXE): $(srcdir)/checkkeys.c
    71 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
    72 
    73 loopwave$(EXE): $(srcdir)/loopwave.c
    74 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
    75 
    76 loopwavequeue$(EXE): $(srcdir)/loopwavequeue.c
    77 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
    78 
    79 testresample$(EXE): $(srcdir)/testresample.c
    80 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
    81 
    82 testaudioinfo$(EXE): $(srcdir)/testaudioinfo.c
    83 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
    84 
    85 testautomation$(EXE): $(srcdir)/testautomation.c \
    86 		      $(srcdir)/testautomation_audio.c \
    87 		      $(srcdir)/testautomation_clipboard.c \
    88 		      $(srcdir)/testautomation_events.c \
    89 		      $(srcdir)/testautomation_keyboard.c \
    90 		      $(srcdir)/testautomation_main.c \
    91 		      $(srcdir)/testautomation_mouse.c \
    92 		      $(srcdir)/testautomation_pixels.c \
    93 		      $(srcdir)/testautomation_platform.c \
    94 		      $(srcdir)/testautomation_rect.c \
    95 		      $(srcdir)/testautomation_render.c \
    96 		      $(srcdir)/testautomation_rwops.c \
    97 		      $(srcdir)/testautomation_sdltest.c \
    98 		      $(srcdir)/testautomation_stdlib.c \
    99 		      $(srcdir)/testautomation_surface.c \
   100 		      $(srcdir)/testautomation_syswm.c \
   101 		      $(srcdir)/testautomation_timer.c \
   102 		      $(srcdir)/testautomation_video.c \
   103 		      $(srcdir)/testautomation_hints.c
   104 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS) 
   105 
   106 testmultiaudio$(EXE): $(srcdir)/testmultiaudio.c
   107 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   108 
   109 testmultiaudio2$(EXE): $(srcdir)/testmultiaudio2.c
   110 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   111 
   112 testatomic$(EXE): $(srcdir)/testatomic.c
   113 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   114 
   115 testintersections$(EXE): $(srcdir)/testintersections.c
   116 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   117 
   118 testrelative$(EXE): $(srcdir)/testrelative.c
   119 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   120 
   121 testhittesting$(EXE): $(srcdir)/testhittesting.c
   122 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   123 
   124 testdraw2$(EXE): $(srcdir)/testdraw2.c
   125 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   126 
   127 testdrawchessboard$(EXE): $(srcdir)/testdrawchessboard.c
   128 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   129 
   130 testdropfile$(EXE): $(srcdir)/testdropfile.c
   131 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   132 
   133 testerror$(EXE): $(srcdir)/testerror.c
   134 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   135 
   136 testfile$(EXE): $(srcdir)/testfile.c
   137 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   138 
   139 testgamecontroller$(EXE): $(srcdir)/testgamecontroller.c
   140 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   141  
   142 testgesture$(EXE): $(srcdir)/testgesture.c
   143 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS) @MATHLIB@
   144  
   145 testgl2$(EXE): $(srcdir)/testgl2.c
   146 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS) @MATHLIB@
   147 
   148 testgles$(EXE): $(srcdir)/testgles.c
   149 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS) @GLESLIB@ @MATHLIB@
   150 
   151 testgles2$(EXE): $(srcdir)/testgles2.c
   152 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS) @MATHLIB@
   153 
   154 testhaptic$(EXE): $(srcdir)/testhaptic.c
   155 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   156 
   157 testhotplug$(EXE): $(srcdir)/testhotplug.c
   158 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   159 
   160 testrumble$(EXE): $(srcdir)/testrumble.c
   161 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   162 
   163 testthread$(EXE): $(srcdir)/testthread.c
   164 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   165 
   166 testiconv$(EXE): $(srcdir)/testiconv.c
   167 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   168 
   169 testime$(EXE): $(srcdir)/testime.c
   170 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS) @SDL_TTF_LIB@
   171 
   172 testjoystick$(EXE): $(srcdir)/testjoystick.c
   173 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   174 
   175 testkeys$(EXE): $(srcdir)/testkeys.c
   176 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   177 
   178 testloadso$(EXE): $(srcdir)/testloadso.c
   179 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   180 
   181 testlock$(EXE): $(srcdir)/testlock.c
   182 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   183 
   184 ifeq (@ISMACOSX@,true)
   185 testnative$(EXE): $(srcdir)/testnative.c \
   186 			$(srcdir)/testnativecocoa.m \
   187 			$(srcdir)/testnativex11.c
   188 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS) -framework Cocoa @XLIB@
   189 endif
   190 
   191 ifeq (@ISWINDOWS@,true)
   192 testnative$(EXE): $(srcdir)/testnative.c \
   193 			$(srcdir)/testnativew32.c
   194 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   195 endif
   196 
   197 ifeq (@ISUNIX@,true)
   198 testnative$(EXE): $(srcdir)/testnative.c \
   199 			$(srcdir)/testnativex11.c
   200 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS) @XLIB@
   201 endif
   202 
   203 #there's probably a better way of doing this
   204 ifeq (@ISMACOSX@,false)
   205 ifeq (@ISWINDOWS@,false)
   206 ifeq (@ISUNIX@,false)
   207 testnative$(EXE): ;
   208 endif
   209 endif
   210 endif
   211 
   212 testoverlay2$(EXE): $(srcdir)/testoverlay2.c
   213 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   214 
   215 testplatform$(EXE): $(srcdir)/testplatform.c
   216 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   217 
   218 testpower$(EXE): $(srcdir)/testpower.c
   219 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   220 
   221 testfilesystem$(EXE): $(srcdir)/testfilesystem.c
   222 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   223 
   224 testrendertarget$(EXE): $(srcdir)/testrendertarget.c
   225 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   226 
   227 testscale$(EXE): $(srcdir)/testscale.c
   228 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   229 
   230 testsem$(EXE): $(srcdir)/testsem.c
   231 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   232 
   233 testshader$(EXE): $(srcdir)/testshader.c
   234 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS) @GLLIB@ @MATHLIB@
   235 
   236 testshape$(EXE): $(srcdir)/testshape.c
   237 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   238 
   239 testsprite2$(EXE): $(srcdir)/testsprite2.c
   240 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   241 
   242 testspriteminimal$(EXE): $(srcdir)/testspriteminimal.c
   243 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS) @MATHLIB@
   244 
   245 teststreaming$(EXE): $(srcdir)/teststreaming.c
   246 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS) @MATHLIB@
   247 
   248 testtimer$(EXE): $(srcdir)/testtimer.c
   249 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   250 
   251 testver$(EXE): $(srcdir)/testver.c
   252 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   253 
   254 testviewport$(EXE): $(srcdir)/testviewport.c
   255 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   256 
   257 testwm2$(EXE): $(srcdir)/testwm2.c
   258 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   259 
   260 torturethread$(EXE): $(srcdir)/torturethread.c
   261 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   262 
   263 testrendercopyex$(EXE): $(srcdir)/testrendercopyex.c
   264 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS) @MATHLIB@
   265 
   266 testmessage$(EXE): $(srcdir)/testmessage.c
   267 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   268 
   269 controllermap$(EXE): $(srcdir)/controllermap.c
   270 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   271 
   272 
   273 clean:
   274 	rm -f $(TARGETS)
   275 
   276 distclean: clean
   277 	rm -f Makefile
   278 	rm -f config.status config.cache config.log
   279 	rm -rf $(srcdir)/autom4te*