fixed the openwatcom compatibility issue produced by OW wasm emitting
authorJohn Tsiombikas <nuclear@mutantstargoat.com>
Sun, 25 Sep 2016 22:46:54 +0000 (01:46 +0300)
committerJohn Tsiombikas <nuclear@mutantstargoat.com>
Sun, 25 Sep 2016 22:46:54 +0000 (01:46 +0300)
leading underscores in front of public symbols.

.gitignore
Makefile
libs/oldmik/Makefile
libs/oldmik/src/resample.asm
libs/oldmik/src/virtch.c

index 1960daf..4b4c87a 100644 (file)
@@ -29,3 +29,4 @@ data
 *.MAP
 *.CFG
 *.cfg
+*.$$$
index e13b685..361a2f2 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -14,9 +14,11 @@ dbg = -d1
 !ifdef __UNIX__
 incpath = -Isrc -Isrc/dos -Ilibs/imago/src -Ilibs/oldmik/src
 libpath = libpath libs/imago libpath libs/oldmik
+RM = rm -f
 !else
 incpath = -Isrc -Isrc\dos -Ilibs\imago\src -Ilibs\oldmik\src
 libpath = libpath libs\imago libpath libs\oldmik
+RM = del
 !endif
 
 AS = nasm
@@ -53,7 +55,7 @@ cxxflags.occ: Makefile
        $(AS) $(ASFLAGS) -o $@ $[*.asm
 
 clean: .symbolic
-       del *.obj
-       del *.occ
-       del *.lnk
-       del $(bin)
+       $(RM) *.obj
+       $(RM) *.occ
+       $(RM) *.lnk
+       $(RM) $(bin)
index c0b72de..72eaa2f 100644 (file)
@@ -10,10 +10,16 @@ alib = mikmod.lib
 opt = -5 -oxl+
 #dbg = -d1
 
+!ifdef __UNIX__
+RM = rm -f
+!else
+RM = del
+!endif
+
 CC = wcc386
 AS = wasm
 CFLAGS = $(dbg) $(opt) -zq -zu -j -s -bt=dos -Isrc
-ASFLAGS = -zq -5pr
+ASFLAGS = -zq -5pr -bt=dos
 
 $(alib): cflags.occ $(obj)
        %write objects.lbc $(obj)
@@ -32,7 +38,7 @@ cflags.occ: Makefile
        $(AS) -fo=$@ $(ASFLAGS) $[*
 
 clean: .symbolic
-       del *.obj
-       del *.occ
-       del *.lbc
-       del $(alib)
+       $(RM) *.obj
+       $(RM) *.occ
+       $(RM) *.lbc
+       $(RM) $(alib)
index afb2540..1ffe920 100644 (file)
@@ -13,6 +13,8 @@ _TEXT   SEGMENT DWORD PUBLIC USE32 'CODE'
 \r
         PUBLIC  AsmStereoNormal_\r
         PUBLIC  AsmMonoNormal_\r
+        PUBLIC  _AsmStereoNormal_\r
+        PUBLIC  _AsmMonoNormal_\r
         \r
 SS2     MACRO index\r
         even\r
@@ -38,6 +40,7 @@ SM2     MACRO index
 \r
 \r
 AsmStereoNormal_ proc USES ebp fs es\r
+_AsmStereoNormal_:\r
         mov    ax,_lvolsel\r
         mov    es,ax                       ; voltab selector naar fs\r
         mov    ax,_rvolsel\r
@@ -83,6 +86,7 @@ AsmStereoNormal_ endp
 \r
 \r
 AsmMonoNormal_ proc USES ebp es\r
+_AsmMonoNormal_:\r
         mov    ax,_lvolsel\r
         mov    es,ax                       ; voltab selector naar fs\r
         xor    eax,eax\r
index 8f7e357..a414e4a 100644 (file)
@@ -73,6 +73,11 @@ extern "C" {
 \r
 UWORD lvolsel,rvolsel;\r
 \r
+#if __WATCOMC__ >= 1200 /* OpenWatcom 1.0+ */\r
+#define AsmStereoNormal _AsmStereoNormal\r
+#define AsmMonoNormal _AsmMonoNormal\r
+#endif\r
+\r
 void AsmStereoNormal(SBYTE *srce,SLONG *dest,SLONG index,SLONG increment,ULONG todo);\r
 #pragma aux AsmStereoNormal    \\r
                parm [esi] [edi] [ebx] [ecx] [edx] \\r