1*66bae5e7Schristosmy %targets = (
2*66bae5e7Schristos    "BC-32" => {
3*66bae5e7Schristos        inherit_from     => [ "BASE_Windows" ],
4*66bae5e7Schristos        sys_id           => "WIN32",
5*66bae5e7Schristos        bn_ops           => "BN_LLONG",
6*66bae5e7Schristos        thread_scheme    => "winthreads",
7*66bae5e7Schristos        cc               => "bcc32c",
8*66bae5e7Schristos        CPP              => "cpp32 -oCON -Sc -Sr",
9*66bae5e7Schristos        defines          => add("WIN32_LEAN_AND_MEAN", "OPENSSL_SYS_WIN32",
10*66bae5e7Schristos                                "L_ENDIAN", "DSO_WIN32", "_stricmp=stricmp",
11*66bae5e7Schristos                                "_strnicmp=strnicmp", "_malloca=malloc",
12*66bae5e7Schristos                                "_freea=free", "_setmode=setmode"),
13*66bae5e7Schristos        cflags           => picker(default => add("-q -c",
14*66bae5e7Schristos                                                  threads("-tM"),
15*66bae5e7Schristos                                                  shared("-tR")),
16*66bae5e7Schristos                                   debug   => "-Od -v -vi- -D_DEBUG",
17*66bae5e7Schristos                                   release => "-O2"),
18*66bae5e7Schristos        bin_cflags       => "-tWC",
19*66bae5e7Schristos        lib_cflags       => shared("-tWD -D_WINDLL -D_DLL"),
20*66bae5e7Schristos        coutflag         => "-o",
21*66bae5e7Schristos
22*66bae5e7Schristos        # -Sx isn't documented, but 'cpp32 -H -S' explains it:
23*66bae5e7Schristos        #
24*66bae5e7Schristos        # -Sx     Omit preprocessed text in output
25*66bae5e7Schristos        makedepcmd       => "cpp32 -oCON -Sx -Hp",
26*66bae5e7Schristos        makedep_scheme   => "embarcadero",
27*66bae5e7Schristos
28*66bae5e7Schristos        LD               => "ilink32",
29*66bae5e7Schristos        LDFLAGS          => picker(default => "-x -Gn -q -w-dup",
30*66bae5e7Schristos                                   debug   => '-j"$(BDS)\lib\win32c\debug" ' .
31*66bae5e7Schristos                                              '-L"$(BDS)\lib\win32c\debug" -v',
32*66bae5e7Schristos                                   release => '-j"$(BDS)\lib\win32c\release" ' .
33*66bae5e7Schristos                                              '-L"$(BDS)\lib\win32c\release"'),
34*66bae5e7Schristos        bin_lflags       => "-ap -Tpe c0x32.obj wildargs.obj",
35*66bae5e7Schristos        ldoutflag        => ",",
36*66bae5e7Schristos        ldpostoutflag    => ",,",
37*66bae5e7Schristos        ld_resp_delim    => " +\n",
38*66bae5e7Schristos        ex_libs          => add(sub {
39*66bae5e7Schristos            my @ex_libs = ("import32.lib",
40*66bae5e7Schristos                           ($disabled{shared}
41*66bae5e7Schristos                            ? ($disabled{threads} ? "cw32.lib" : "cw32mt.lib")
42*66bae5e7Schristos                            : ($disabled{threads} ? "cw32i.lib" : "cw32mti.lib")));
43*66bae5e7Schristos            push @ex_libs, "ws2_32.lib" unless $disabled{sock};
44*66bae5e7Schristos            return join(" ", @ex_libs);
45*66bae5e7Schristos        }),
46*66bae5e7Schristos        AR               => "tlib",
47*66bae5e7Schristos        ARFLAGS          => "/P256 /N /u",
48*66bae5e7Schristos        ar_resp_delim    => " &\n",
49*66bae5e7Schristos        RC               => "brcc32",
50*66bae5e7Schristos        RCFLAGS          => '-i"$(BDS)\include\windows\sdk"',
51*66bae5e7Schristos        rcoutflag        => "-fo",
52*66bae5e7Schristos        shared_target    => "win-shared",
53*66bae5e7Schristos        shared_ldflag    => "-aa -Tpd c0d32.obj",
54*66bae5e7Schristos        lddefflag        => ",",
55*66bae5e7Schristos        ldresflag        => ",",
56*66bae5e7Schristos        ld_implib_rule   => 'implib -a $< $**',
57*66bae5e7Schristos        dso_scheme       => "win32",
58*66bae5e7Schristos        shared_defflag   => '',
59*66bae5e7Schristos        perl_platform    => 'Windows::cppbuilder',
60*66bae5e7Schristos        uplink_arch      => 'common',
61*66bae5e7Schristos    }
62*66bae5e7Schristos);
63