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