#! now transform these hashes into $project tags
foreach $file (sort keys %wxGeneric) {
my $tag = "";
- if ( $wxGeneric{$file} =~ /\b(G|16|U)\b/ ) {
- next;
- }
+ next if $wxGeneric{$file} =~ /\b(PS|G|16|U)\b/;
$file =~ s/cp?p?$/obj/;
$project{"WXGENERICOBJS"} .= "\$(MSWDIR)\\" . $file . " "
}
foreach $file (sort keys %wxCommon) {
+ $isCFile = $file =~ /\.c$/;
$file =~ s/cp?p?$/obj/;
- $project{"WXCOMMONOBJS"} .= "\$(MSWDIR)\\" . $file . " "
+ $obj = "\$(MSWDIR)\\" . $file . " ";
+ $project{"WXCOMMONOBJS"} .= $obj;
+ $project{"WXCOBJS"} .= $obj if $isCFile;
}
foreach $file (sort keys %wxMSW) {
next if $wxMSW{$file} =~ /\b16\b/;
- if ( file =~ /automtn/ ) {
+ if ( $file =~ /^automtn/ ) {
#! comment in old makefile.b32 seems to imply that this file can't
#! be compiled with Borland (leads to crash in oleauto sample)
next;
}
+ my $isOleObj = $wxMSW{$file} =~ /\bO\b/;
$file =~ s/cp?p?$/obj/;
- $project{"WXMSWOBJS"} .= "\$(MSWDIR)\\" . $file . " "
+ my $obj = "\$(MSWDIR)\\" . $file . " ";
+
+ $project{"WXMSWOBJS"} .= $obj;
+ if ( $isOleObj ) {
+ #! remember that this file is in ole subdir
+ $project{"WXOLEOBJS"} .= $obj;
+ }
+
}
#$}
$(LIBTARGET): $(DUMMY).obj $(OBJECTS)
-erase $(LIBTARGET)
- tlib $(LIBTARGET) /P512 @&&!
+ tlib $(LIBTARGET) /P1024 @&&!
+$(OBJECTS:.obj =.obj +) +$(PERIPH_LIBS:.lib =.lib +)
!
my @objs = split;
foreach (@objs) {
$text .= $_ . ": ";
+ if ( $project{"WXOLEOBJS"} =~ /\Q$_/ ) { s/MSWDIR/OLEDIR/; }
s/obj$/\$(SRCSUFF)/;
$text .= $_ . "\n\n";
}
my @objs = split;
foreach (@objs) {
$text .= $_ . ": ";
+ $suffix = $project{"WXCOBJS"} =~ /\Q$_/ ? "c" : '$(SRCSUFF)';
s/MSWDIR/COMMDIR/;
- s/obj$/\$(SRCSUFF)/;
+ s/obj$/$suffix/;
$text .= $_ . "\n\n";
}
#$}