Split the common code in test/Makefile.os2 into a separate file
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171
diff --git a/test/Makefile.os2 b/test/Makefile.os2
index 8600837..75aaeed 100644
--- a/test/Makefile.os2
+++ b/test/Makefile.os2
@@ -1,79 +1,13 @@
# Open Watcom makefile to build SDL2 tests for OS/2
# wmake -f Makefile.os2
-INCPATH = -I"$(%WATCOM)/h/os2" -I"$(%WATCOM)/h" -I"../include"
+SYSTEM = os2v2
-CFLAGS = $(INCPATH) -bt=os2 -d0 -q -bm -5s -fp5 -fpi87 -sg -oteanbmier -ei
-CFLAGS+= -wx -wcd=303
-
-LIBPATH = ..
-LIBS = SDL2.lib SDL2test.lib testutils.lib
-
-#CFLAGS+= -DHAVE_SDL_TTF
-#TTFLIBS = SDL2ttf.lib
-
-TARGETS = testatomic.exe testdisplayinfo.exe testbounds.exe testdraw2.exe &
- testdrawchessboard.exe testdropfile.exe testerror.exe testfile.exe &
- testfilesystem.exe testgamecontroller.exe testgeometry.exe testgesture.exe &
- testhittesting.exe testhotplug.exe testiconv.exe testime.exe testlocale.exe &
- testintersections.exe testjoystick.exe testkeys.exe testloadso.exe &
- testlock.exe testmessage.exe testoverlay2.exe testplatform.exe &
- testpower.exe testsensor.exe testrelative.exe testrendercopyex.exe &
- testrendertarget.exe testrumble.exe testscale.exe testsem.exe &
- testshader.exe testshape.exe testsprite2.exe testspriteminimal.exe &
- teststreaming.exe testthread.exe testtimer.exe testver.exe &
- testviewport.exe testwm2.exe torturethread.exe checkkeys.exe &
- checkkeysthreads.exe testmouse.exe &
- controllermap.exe testhaptic.exe testqsort.exe testresample.exe &
- testaudioinfo.exe testaudiocapture.exe loopwave.exe loopwavequeue.exe &
- testsurround.exe testyuv.exe testgl2.exe testvulkan.exe testnative.exe &
- testautomation.exe
-
-# testautomation sources
-TASRCS = testautomation.c testautomation_audio.c testautomation_clipboard.c &
- testautomation_events.c testautomation_hints.c &
- testautomation_keyboard.c testautomation_main.c &
- testautomation_mouse.c testautomation_pixels.c &
- testautomation_platform.c testautomation_rect.c &
- testautomation_render.c testautomation_rwops.c &
- testautomation_sdltest.c testautomation_stdlib.c &
- testautomation_surface.c testautomation_syswm.c &
- testautomation_timer.c testautomation_video.c
-
-OBJS = $(TARGETS:.exe=.obj)
-COBJS = $(CSRCS:.c=.obj)
-TAOBJS = $(TASRCS:.c=.obj)
-
-all: testutils.lib $(TARGETS)
-
-.c: ../src/test
+INCPATH = -I"$(%WATCOM)/h/os2" -I"$(%WATCOM)/h"
-.obj.exe:
- wlink SYS os2v2 libpath $(LIBPATH) lib {$(LIBS)} op q op el file {$<} name $@
-
-.c.obj:
- wcc386 $(CFLAGS) -fo=$^@ $<
-
-# specials
-testautomation.exe: $(TAOBJS)
- wlink SYS os2v2 libpath $(LIBPATH) lib {$(LIBS)} op q op el file {$<} name $@
-
-testnative.exe: testnative.obj testnativeos2.obj
- wlink SYS os2v2 libpath $(LIBPATH) lib {$(LIBS)} op q op el file {$<} name $@
-
-testoverlay2.exe: testoverlay2.obj testyuv_cvt.obj
- wlink SYS os2v2 libpath $(LIBPATH) lib {$(LIBS)} op q op el file {$<} name $@
-
-testyuv.exe: testyuv.obj testyuv_cvt.obj
- wlink SYS os2v2 libpath $(LIBPATH) lib {$(LIBS)} op q op el file {$<} name $@
-
-testime.exe: testime.obj
- wlink SYS os2v2 libpath $(LIBPATH) lib {$(LIBS) $(TTFLIBS)} op q op el file {$<} name $@
+CFLAGS = -bt=os2 -d0 -q -bm -5s -fp5 -fpi87 -sg -oteanbmier -ei
+CFLAGS+= -wx -wcd=303
-testutils.lib: testutils.obj
- wlib -q -b -n -c -pa -s -t -zld -ii -io $@ $<
+TNSRCS = testnative.c testnativeos2.c
-clean: .SYMBOLIC
- rm -f *.obj *.err
-distclean: .SYMBOLIC clean
- rm -f *.exe *.lib
+!include watcom.mif
diff --git a/test/watcom.mif b/test/watcom.mif
new file mode 100644
index 0000000..b7b36c9
--- /dev/null
+++ b/test/watcom.mif
@@ -0,0 +1,75 @@
+INCPATH+= -I"../include"
+LIBPATH = ..
+LIBS = SDL2.lib SDL2test.lib testutils.lib
+
+#CFLAGS+= -DHAVE_SDL_TTF
+#TTFLIBS = SDL2ttf.lib
+
+CFLAGS+= $(INCPATH)
+
+TARGETS = testatomic.exe testdisplayinfo.exe testbounds.exe testdraw2.exe &
+ testdrawchessboard.exe testdropfile.exe testerror.exe testfile.exe &
+ testfilesystem.exe testgamecontroller.exe testgeometry.exe testgesture.exe &
+ testhittesting.exe testhotplug.exe testiconv.exe testime.exe testlocale.exe &
+ testintersections.exe testjoystick.exe testkeys.exe testloadso.exe &
+ testlock.exe testmessage.exe testoverlay2.exe testplatform.exe &
+ testpower.exe testsensor.exe testrelative.exe testrendercopyex.exe &
+ testrendertarget.exe testrumble.exe testscale.exe testsem.exe &
+ testshader.exe testshape.exe testsprite2.exe testspriteminimal.exe &
+ teststreaming.exe testthread.exe testtimer.exe testver.exe &
+ testviewport.exe testwm2.exe torturethread.exe checkkeys.exe &
+ checkkeysthreads.exe testmouse.exe &
+ controllermap.exe testhaptic.exe testqsort.exe testresample.exe &
+ testaudioinfo.exe testaudiocapture.exe loopwave.exe loopwavequeue.exe &
+ testsurround.exe testyuv.exe testgl2.exe testvulkan.exe testnative.exe &
+ testautomation.exe
+
+# testautomation sources
+TASRCS = testautomation.c testautomation_audio.c testautomation_clipboard.c &
+ testautomation_events.c testautomation_hints.c &
+ testautomation_keyboard.c testautomation_main.c &
+ testautomation_mouse.c testautomation_pixels.c &
+ testautomation_platform.c testautomation_rect.c &
+ testautomation_render.c testautomation_rwops.c &
+ testautomation_sdltest.c testautomation_stdlib.c &
+ testautomation_surface.c testautomation_syswm.c &
+ testautomation_timer.c testautomation_video.c
+
+OBJS = $(TARGETS:.exe=.obj)
+COBJS = $(CSRCS:.c=.obj)
+TAOBJS = $(TASRCS:.c=.obj)
+TNOBJS = $(TNSRCS:.c=.obj)
+
+all: testutils.lib $(TARGETS)
+
+.c: ../src/test
+
+.obj.exe:
+ wlink SYS $(SYSTEM) libpath $(LIBPATH) lib {$(LIBS)} op q op el file {$<} name $@
+
+.c.obj:
+ wcc386 $(CFLAGS) -fo=$^@ $<
+
+# specials
+testautomation.exe: $(TAOBJS)
+ wlink SYS $(SYSTEM) libpath $(LIBPATH) lib {$(LIBS)} op q op el file {$<} name $@
+
+testnative.exe: $(TNOBJS)
+ wlink SYS $(SYSTEM) libpath $(LIBPATH) lib {$(LIBS)} op q op el file {$<} name $@
+
+testoverlay2.exe: testoverlay2.obj testyuv_cvt.obj
+ wlink SYS $(SYSTEM) libpath $(LIBPATH) lib {$(LIBS)} op q op el file {$<} name $@
+
+testyuv.exe: testyuv.obj testyuv_cvt.obj
+ wlink SYS $(SYSTEM) libpath $(LIBPATH) lib {$(LIBS)} op q op el file {$<} name $@
+
+testime.exe: testime.obj
+ wlink SYS $(SYSTEM) libpath $(LIBPATH) lib {$(LIBS) $(TTFLIBS)} op q op el file {$<} name $@
+
+testutils.lib: testutils.obj
+ wlib -q -b -n -c -pa -s -t -zld -ii -io $@ $<
+
+clean: .SYMBOLIC
+ rm -f *.obj *.err
+distclean: .SYMBOLIC clean
+ rm -f *.exe *.lib