git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@249 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
NishiOwO
2025-10-10 10:17:30 +00:00
parent 9b660637a0
commit 36b84e2ee7
6 changed files with 49 additions and 11 deletions

35
tools/watcom.pl Executable file
View File

@@ -0,0 +1,35 @@
#!/usr/bin/env perl
# $Id$
my $target = "nt";
my @cmd = ();
push(@cmd, "-I$ENV{WATCOM}/h");
push(@cmd, "-I$ENV{WATCOM}/h/nt");
push(@cmd, "-DSTBI_NO_SIMD");
foreach my $f (@ARGV){
if($f eq "-static-libgcc"){
next;
}elsif($f =~ /^-Wl,--out-implib,(.+)$/){
push(@cmd, "-Wl,option implib=$1");
next;
}elsif($f =~ /^-W.+$/){
next;
}elsif($f =~ /^-L(.+)$/){
push(@cmd, "-Wl,libpath $1");
next;
}elsif($f eq "-lMw"){
push(@cmd, "-lMw");
next;
}elsif($f =~ /^-l(.+)$/){
push(@cmd, "$1.lib");
next;
}elsif($f =~ /^(?:oo)?src\//){
$target = "nt_dll";
}
push(@cmd, $f);
}
unshift(@cmd, "-b$target");
print("Running: owcc " . join(" ", @cmd) . "\n");
exec("owcc", @cmd);