Makefile.os2 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. # Open Watcom makefile to build SDL2 tests for OS/2
  2. # wmake -f Makefile.os2
  3. INCPATH = -I"$(%WATCOM)/h/os2" -I"$(%WATCOM)/h" -I"../include"
  4. CFLAGS = $(INCPATH) -bt=os2 -d0 -q -bm -5s -fp5 -fpi87 -sg -oteanbmier -ei
  5. CFLAGS+= -wx -wcd=303
  6. LIBPATH = ..
  7. LIBS = SDL2.lib $(TESTLIB)
  8. #CFLAGS+= -DHAVE_SDL_TTF
  9. #TTFLIBS = SDL2ttf.lib
  10. TARGETS = testatomic.exe testdisplayinfo.exe testbounds.exe testdraw2.exe &
  11. testdrawchessboard.exe testdropfile.exe testerror.exe testfile.exe &
  12. testfilesystem.exe testgamecontroller.exe testgeometry.exe testgesture.exe &
  13. testhittesting.exe testhotplug.exe testiconv.exe testime.exe testlocale.exe &
  14. testintersections.exe testjoystick.exe testkeys.exe testloadso.exe &
  15. testlock.exe testmessage.exe testoverlay2.exe testplatform.exe &
  16. testpower.exe testsensor.exe testrelative.exe testrendercopyex.exe &
  17. testrendertarget.exe testrumble.exe testscale.exe testsem.exe &
  18. testshader.exe testshape.exe testsprite2.exe testspriteminimal.exe &
  19. teststreaming.exe testthread.exe testtimer.exe testver.exe &
  20. testviewport.exe testwm2.exe torturethread.exe checkkeys.exe &
  21. checkkeysthreads.exe testmouse.exe &
  22. controllermap.exe testhaptic.exe testqsort.exe testresample.exe &
  23. testaudioinfo.exe testaudiocapture.exe loopwave.exe loopwavequeue.exe &
  24. testsurround.exe testyuv.exe testgl2.exe testvulkan.exe testnative.exe &
  25. testautomation.exe
  26. # SDL2test.lib sources (../src/test)
  27. CSRCS = SDL_test_assert.c SDL_test_common.c SDL_test_compare.c &
  28. SDL_test_crc32.c SDL_test_font.c SDL_test_fuzzer.c SDL_test_harness.c &
  29. SDL_test_imageBlit.c SDL_test_imageBlitBlend.c SDL_test_imageFace.c &
  30. SDL_test_imagePrimitives.c SDL_test_imagePrimitivesBlend.c &
  31. SDL_test_log.c SDL_test_md5.c SDL_test_random.c SDL_test_memory.c
  32. TESTLIB = SDL2test.lib
  33. # testautomation sources
  34. TASRCS = testautomation.c testautomation_audio.c testautomation_clipboard.c &
  35. testautomation_events.c testautomation_hints.c &
  36. testautomation_keyboard.c testautomation_main.c &
  37. testautomation_mouse.c testautomation_pixels.c &
  38. testautomation_platform.c testautomation_rect.c &
  39. testautomation_render.c testautomation_rwops.c &
  40. testautomation_sdltest.c testautomation_stdlib.c &
  41. testautomation_surface.c testautomation_syswm.c &
  42. testautomation_timer.c testautomation_video.c
  43. OBJS = $(TARGETS:.exe=.obj)
  44. COBJS = $(CSRCS:.c=.obj)
  45. TAOBJS = $(TASRCS:.c=.obj)
  46. all: $(TARGETS)
  47. .c: ../src/test
  48. $(TESTLIB): $(COBJS)
  49. wlib -q -b -n -c $@ $(COBJS)
  50. .obj.exe:
  51. @%make $(TESTLIB)
  52. wlink SYS os2v2 libpath $(LIBPATH) lib {$(LIBS)} op q op el file {$<} name $@
  53. .c.obj:
  54. wcc386 $(CFLAGS) -fo=$^@ $<
  55. # specials
  56. testautomation.exe: $(TAOBJS)
  57. @%make $(TESTLIB)
  58. wlink SYS os2v2 libpath $(LIBPATH) lib {$(LIBS)} op q op el file {$<} name $@
  59. testnative.exe: testnative.obj testnativeos2.obj
  60. @%make $(TESTLIB)
  61. wlink SYS os2v2 libpath $(LIBPATH) lib {$(LIBS)} op q op el file {$<} name $@
  62. testoverlay2.exe: testoverlay2.obj testyuv_cvt.obj
  63. @%make $(TESTLIB)
  64. wlink SYS os2v2 libpath $(LIBPATH) lib {$(LIBS)} op q op el file {$<} name $@
  65. testyuv.exe: testyuv.obj testyuv_cvt.obj
  66. @%make $(TESTLIB)
  67. wlink SYS os2v2 libpath $(LIBPATH) lib {$(LIBS)} op q op el file {$<} name $@
  68. testime.exe: testime.obj
  69. @%make $(TESTLIB)
  70. wlink SYS os2v2 libpath $(LIBPATH) lib {$(LIBS) $(TTFLIBS)} op q op el file {$<} name $@
  71. clean: .SYMBOLIC
  72. @if exist *.obj rm *.obj
  73. @if exist *.err rm *.err
  74. distclean: .SYMBOLIC clean
  75. @if exist *.exe rm *.exe
  76. @if exist $(TESTLIB) rm $(TESTLIB)