test/Makefile.in
author Sam Lantinga <slouken@libsdl.org>
Sat, 11 Nov 2017 17:21:47 -0800
changeset 11700 57a894f4028f
parent 11365 a9bd2625fa01
child 11702 cf166abbde4a
permissions -rw-r--r--
Fixed typo in comment
     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 	testaudiocapture$(EXE) \
    17 	testautomation$(EXE) \
    18 	testbounds$(EXE) \
    19 	testcustomcursor$(EXE) \
    20 	testdraw2$(EXE) \
    21 	testdrawchessboard$(EXE) \
    22 	testdropfile$(EXE) \
    23 	testerror$(EXE) \
    24 	testfile$(EXE) \
    25 	testgamecontroller$(EXE) \
    26 	testgesture$(EXE) \
    27 	testgl2$(EXE) \
    28 	testgles$(EXE) \
    29 	testgles2$(EXE) \
    30 	testhaptic$(EXE) \
    31 	testhittesting$(EXE) \
    32 	testrumble$(EXE) \
    33 	testhotplug$(EXE) \
    34 	testthread$(EXE) \
    35 	testiconv$(EXE) \
    36 	testime$(EXE) \
    37 	testintersections$(EXE) \
    38 	testrelative$(EXE) \
    39 	testjoystick$(EXE) \
    40 	testkeys$(EXE) \
    41 	testloadso$(EXE) \
    42 	testlock$(EXE) \
    43 	testmultiaudio$(EXE) \
    44 	testaudiohotplug$(EXE) \
    45 	testnative$(EXE) \
    46 	testoverlay2$(EXE) \
    47 	testplatform$(EXE) \
    48 	testpower$(EXE) \
    49 	testfilesystem$(EXE) \
    50 	testrendertarget$(EXE) \
    51 	testresample$(EXE) \
    52 	testscale$(EXE) \
    53 	testsem$(EXE) \
    54 	testshader$(EXE) \
    55 	testshape$(EXE) \
    56 	testsprite2$(EXE) \
    57 	testspriteminimal$(EXE) \
    58 	teststreaming$(EXE) \
    59 	testtimer$(EXE) \
    60 	testver$(EXE) \
    61 	testviewport$(EXE) \
    62 	testwm2$(EXE) \
    63 	torturethread$(EXE) \
    64 	testrendercopyex$(EXE) \
    65 	testmessage$(EXE) \
    66 	testdisplayinfo$(EXE) \
    67 	testqsort$(EXE) \
    68 	controllermap$(EXE) \
    69 	testvulkan$(EXE) \
    70 	
    71 all: Makefile $(TARGETS) copydatafiles
    72 
    73 Makefile: $(srcdir)/Makefile.in
    74 	$(SHELL) config.status $@
    75 
    76 checkkeys$(EXE): $(srcdir)/checkkeys.c
    77 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
    78 
    79 loopwave$(EXE): $(srcdir)/loopwave.c
    80 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
    81 
    82 loopwavequeue$(EXE): $(srcdir)/loopwavequeue.c
    83 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
    84 
    85 testresample$(EXE): $(srcdir)/testresample.c
    86 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
    87 
    88 testaudioinfo$(EXE): $(srcdir)/testaudioinfo.c
    89 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
    90 
    91 testautomation$(EXE): $(srcdir)/testautomation.c \
    92 		      $(srcdir)/testautomation_audio.c \
    93 		      $(srcdir)/testautomation_clipboard.c \
    94 		      $(srcdir)/testautomation_events.c \
    95 		      $(srcdir)/testautomation_keyboard.c \
    96 		      $(srcdir)/testautomation_main.c \
    97 		      $(srcdir)/testautomation_mouse.c \
    98 		      $(srcdir)/testautomation_pixels.c \
    99 		      $(srcdir)/testautomation_platform.c \
   100 		      $(srcdir)/testautomation_rect.c \
   101 		      $(srcdir)/testautomation_render.c \
   102 		      $(srcdir)/testautomation_rwops.c \
   103 		      $(srcdir)/testautomation_sdltest.c \
   104 		      $(srcdir)/testautomation_stdlib.c \
   105 		      $(srcdir)/testautomation_surface.c \
   106 		      $(srcdir)/testautomation_syswm.c \
   107 		      $(srcdir)/testautomation_timer.c \
   108 		      $(srcdir)/testautomation_video.c \
   109 		      $(srcdir)/testautomation_hints.c
   110 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS) 
   111 
   112 testmultiaudio$(EXE): $(srcdir)/testmultiaudio.c
   113 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   114 
   115 testaudiohotplug$(EXE): $(srcdir)/testaudiohotplug.c
   116 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   117 
   118 testaudiocapture$(EXE): $(srcdir)/testaudiocapture.c
   119 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   120 
   121 testatomic$(EXE): $(srcdir)/testatomic.c
   122 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   123 
   124 testintersections$(EXE): $(srcdir)/testintersections.c
   125 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   126 
   127 testrelative$(EXE): $(srcdir)/testrelative.c
   128 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   129 
   130 testhittesting$(EXE): $(srcdir)/testhittesting.c
   131 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   132 
   133 testdraw2$(EXE): $(srcdir)/testdraw2.c
   134 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   135 
   136 testdrawchessboard$(EXE): $(srcdir)/testdrawchessboard.c
   137 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   138 
   139 testdropfile$(EXE): $(srcdir)/testdropfile.c
   140 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   141 
   142 testerror$(EXE): $(srcdir)/testerror.c
   143 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   144 
   145 testfile$(EXE): $(srcdir)/testfile.c
   146 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   147 
   148 testgamecontroller$(EXE): $(srcdir)/testgamecontroller.c
   149 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   150  
   151 testgesture$(EXE): $(srcdir)/testgesture.c
   152 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS) @MATHLIB@
   153  
   154 testgl2$(EXE): $(srcdir)/testgl2.c
   155 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS) @MATHLIB@
   156 
   157 testgles$(EXE): $(srcdir)/testgles.c
   158 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS) @GLESLIB@ @MATHLIB@
   159 
   160 testgles2$(EXE): $(srcdir)/testgles2.c
   161 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS) @MATHLIB@
   162 
   163 testhaptic$(EXE): $(srcdir)/testhaptic.c
   164 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   165 
   166 testhotplug$(EXE): $(srcdir)/testhotplug.c
   167 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   168 
   169 testrumble$(EXE): $(srcdir)/testrumble.c
   170 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   171 
   172 testthread$(EXE): $(srcdir)/testthread.c
   173 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   174 
   175 testiconv$(EXE): $(srcdir)/testiconv.c
   176 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   177 
   178 testime$(EXE): $(srcdir)/testime.c
   179 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS) @SDL_TTF_LIB@
   180 
   181 testjoystick$(EXE): $(srcdir)/testjoystick.c
   182 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   183 
   184 testkeys$(EXE): $(srcdir)/testkeys.c
   185 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   186 
   187 testloadso$(EXE): $(srcdir)/testloadso.c
   188 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   189 
   190 testlock$(EXE): $(srcdir)/testlock.c
   191 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   192 
   193 ifeq (@ISMACOSX@,true)
   194 testnative$(EXE): $(srcdir)/testnative.c \
   195 			$(srcdir)/testnativecocoa.m \
   196 			$(srcdir)/testnativex11.c
   197 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS) -framework Cocoa @XLIB@
   198 endif
   199 
   200 ifeq (@ISWINDOWS@,true)
   201 testnative$(EXE): $(srcdir)/testnative.c \
   202 			$(srcdir)/testnativew32.c
   203 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   204 endif
   205 
   206 ifeq (@ISUNIX@,true)
   207 testnative$(EXE): $(srcdir)/testnative.c \
   208 			$(srcdir)/testnativex11.c
   209 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS) @XLIB@
   210 endif
   211 
   212 #there's probably a better way of doing this
   213 ifeq (@ISMACOSX@,false)
   214 ifeq (@ISWINDOWS@,false)
   215 ifeq (@ISUNIX@,false)
   216 testnative$(EXE): ;
   217 endif
   218 endif
   219 endif
   220 
   221 testoverlay2$(EXE): $(srcdir)/testoverlay2.c
   222 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   223 
   224 testplatform$(EXE): $(srcdir)/testplatform.c
   225 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   226 
   227 testpower$(EXE): $(srcdir)/testpower.c
   228 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   229 
   230 testfilesystem$(EXE): $(srcdir)/testfilesystem.c
   231 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   232 
   233 testrendertarget$(EXE): $(srcdir)/testrendertarget.c
   234 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   235 
   236 testscale$(EXE): $(srcdir)/testscale.c
   237 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   238 
   239 testsem$(EXE): $(srcdir)/testsem.c
   240 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   241 
   242 testshader$(EXE): $(srcdir)/testshader.c
   243 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS) @GLLIB@ @MATHLIB@
   244 
   245 testshape$(EXE): $(srcdir)/testshape.c
   246 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   247 
   248 testsprite2$(EXE): $(srcdir)/testsprite2.c
   249 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   250 
   251 testspriteminimal$(EXE): $(srcdir)/testspriteminimal.c
   252 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS) @MATHLIB@
   253 
   254 teststreaming$(EXE): $(srcdir)/teststreaming.c
   255 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS) @MATHLIB@
   256 
   257 testtimer$(EXE): $(srcdir)/testtimer.c
   258 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   259 
   260 testver$(EXE): $(srcdir)/testver.c
   261 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   262 
   263 testviewport$(EXE): $(srcdir)/testviewport.c
   264 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   265 
   266 testwm2$(EXE): $(srcdir)/testwm2.c
   267 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   268 
   269 torturethread$(EXE): $(srcdir)/torturethread.c
   270 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   271 
   272 testrendercopyex$(EXE): $(srcdir)/testrendercopyex.c
   273 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS) @MATHLIB@
   274 
   275 testmessage$(EXE): $(srcdir)/testmessage.c
   276 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   277 
   278 testdisplayinfo$(EXE): $(srcdir)/testdisplayinfo.c
   279 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   280 
   281 testqsort$(EXE): $(srcdir)/testqsort.c
   282 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   283 
   284 testbounds$(EXE): $(srcdir)/testbounds.c
   285 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   286 
   287 testcustomcursor$(EXE): $(srcdir)/testcustomcursor.c
   288 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   289 
   290 controllermap$(EXE): $(srcdir)/controllermap.c
   291 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   292 
   293 testvulkan$(EXE): $(srcdir)/testvulkan.c
   294 	$(CC) -o $@ $^ $(CFLAGS) $(LIBS)
   295 
   296 
   297 clean:
   298 	rm -f $(TARGETS)
   299 
   300 distclean: clean
   301 	rm -f Makefile
   302 	rm -f config.status config.cache config.log
   303 	rm -rf $(srcdir)/autom4te*
   304 
   305 
   306 %.bmp: $(srcdir)/%.bmp
   307 	cp $< $@
   308 
   309 %.wav: $(srcdir)/%.wav
   310 	cp $< $@
   311 
   312 copydatafiles: copybmpfiles copywavfiles
   313 .PHONY : copydatafiles
   314 
   315 copybmpfiles: $(foreach bmp,$(wildcard $(srcdir)/*.bmp),$(notdir $(bmp)))
   316 .PHONY : copybmpfiles
   317 
   318 copywavfiles: $(foreach wav,$(wildcard $(srcdir)/*.wav),$(notdir $(wav)))
   319 .PHONY : copywavfiles
   320