3 if (match($0, /\@INCLUDE_RULES\@/ ) ) {
4 print "ALL: \$(TARGETS)";
7 print "LINK = link.exe /nologo /debug /machine:I386 /subsystem:console /incremental:no ";
9 print "CFLAGS = /nologo /c /MDd /W3 /Gm /GX /Zi /Od /D _DEBUG /D WIN32 /D APR_DECLARE_STATIC /FD ";
12 $0 = "\t\$(CL) -c \$< \$(CFLAGS) \$(INCLUDES)";
14 if ( match( $0, /^ALL_LIBS=/ ) ) {
17 if ( match( $0, /^LOCAL_LIBS=/ ) ) {
18 print "LOCAL_LIBS= ../LibD/apr.lib ";
19 print "ALL_LIBS= kernel32\.lib user32\.lib advapi32\.lib Rpcrt4\.lib ws2_32\.lib wsock32\.lib ole32\.lib ";
22 if ( match( $0, /\@CFLAGS\@/ ) ) {
25 gsub( /\$\([^\)]* [^\)]*\)/, "", $0 );
26 gsub( /\$\{LD_FLAGS\}/, "", $0 );
27 gsub( /\.\.\/libapr\.la/, "../LibD/apr.lib", $0 );
28 gsub( /\@RM\@/, "del", $0 );
29 if (gsub( /\$\(RM\) -f/, "del" ) ) {
30 gsub( /\*\.a/, "*.lib *.exp *.idb *.ilk *.pdb", $0 );
31 gsub( /Makefile/, "Makefile *.ncb *.opt", $0 );
33 gsub( /\@CC\@/, "cl", $0);
34 gsub( /\@RANLIB\@/, "", $0);
35 gsub( /-I\$\(INCDIR\)/, "/I \"$(INCDIR)\"", $0);
37 gsub( /\.\.\/libapr\.a/, "../LibD/apr.lib", $0 );
38 if ( gsub( /\@EXEEXT\@/, ".exe", $0 ) ) {
39 gsub( /\$\(CC\) \$\(CFLAGS\)/, "\$\(LINK\) /subsystem:console", $0 );
40 gsub( /-o (\S+)/, "/out:\"$1\"", $0 );
41 gsub( /--export-dynamic /, "", $0 );
42 gsub( /-fPIC /, "", $0 );
44 if ( gsub( /-shared/, "/subsystem:windows /dll", $0 ) ) {
45 gsub( /-o (\S+)/ "/out:\"$1\"", $0 );
47 gsub( /\$\(NONPORTABLE\)/, "", $0 );
48 gsub( /\.a /, ".lib ", $0 );
49 gsub( /\.o /, ".obj ", $0 );
50 gsub( /\.lo /, ".obj ", $0 );