1 #!#############################################################################
3 #! Purpose: tmake template file for wxWindows makefile for VC++ 1.52, generate
4 #! the makefile by executing the following command:
5 #! tmake -t v15 wxwin.pro -o Makefile
6 #! Author: Vadim Zeitlin
9 #!#############################################################################
11 #! include the code which parses filelist.txt file and initializes
12 #! %wxCommon, %wxGeneric and %wxMSW hashes.
13 IncludeTemplate("filelist.t");
15 #! because we later search for " <filename> " in this string, it should
17 $project{"WXCOBJS"} = " ";
19 #! now transform these hashes into $project tags
20 foreach $file (sort keys %wxGeneric) {
21 if ( $wxGeneric{$file} =~ /\b(PS|G|U)\b/ ) {
22 #! this file for some reason wasn't compiled for VC++ 1.52
23 next unless $file =~ /^prntdlgg\./;
26 $file =~ s/cp?p?$/obj/;
27 $project{"WXGENERICOBJS"} .= $file . " "
30 foreach $file (sort keys %wxCommon) {
31 #! socket files don't compile under Win16 currently
32 next if $wxCommon{$file} =~ /\b(32|S|U)\b/;
34 $isCFile = $file =~ /\.c$/;
35 $file =~ s/cp?p?$/obj/;
37 #! have to split lib in 2 halves because otherwise it's too big
38 $project{$file =~ "^[a-o]" ? "WXCOMMONOBJS1" : "WXCOMMONOBJS2"} .= $obj;
39 $project{"WXCOBJS"} .= $obj if $isCFile;
42 foreach $file (sort keys %wxMSW) {
43 #! don't take files not appropriate for 16-bit Windows
44 next if $wxMSW{$file} =~ /\b(32|O)\b/;
46 $isCFile = $file =~ /\.c$/;
47 $file =~ s/cp?p?$/obj/;
49 #! have to split lib in 2 halves because otherwise it's too big
50 $project{$file =~ "^[a-o]" ? "WXMSWOBJS1" : "WXMSWOBJS2"} .= $obj;
51 $project{"WXCOBJS"} .= $obj if $isCFile;
54 # This file was automatically generated by tmake
55 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE DOS.T!
57 # this is needed because my usual 4NT doesn't work well when invoked from
59 COMSPEC=$(SYSTEMROOT)\system32\cmd.exe
64 TMAKE_DIR=$(WXDIR)\distrib\msw\tmake
66 TMAKE=E:\Perl\5.00471\bin\MSWin32-x86\perl.exe g:\Unix\tmake\bin\tmake
70 # set up the compiler options
71 INCLUDE=/I. /I$(WXDIR)\include /I$(INCLUDE)
72 DEFINES=-D__WXMSW__ -D__WINDOWS__
74 # compile in large memory model
75 CFLAGS=$(CFLAGS) /nologo /W4 /AL
78 CFLAGS=$(CFLAGS) /Zi /Z7
79 DEFINES=$(DEFINES) /D__WXDEBUG__
82 CFLAGS=$(CFLAGS) $(INCLUDE) $(DEFINES)
85 PCH_CREATE=/Ycwx/wxprec.h /Fpwx.pch
86 PCH_USE=/Yuwx/wxprec.h /Fpwx.pch
91 # we can't have all objects in one list because the library becomes too big
92 COMMONOBJS1= #$ ExpandList("WXCOMMONOBJS1");
93 COMMONOBJS2= #$ ExpandList("WXCOMMONOBJS2");
94 GENERICOBJS= #$ ExpandList("WXGENERICOBJS");
95 MSWOBJS1= #$ ExpandList("WXMSWOBJS1");
96 MSWOBJS2= #$ ExpandList("WXMSWOBJS2");
98 OBJECTS=$(COMMONOBJS1) $(COMMONOBJS2) $(GENERICOBJS) $(MSWOBJS1) $(MSWOBJS2)
101 all: Makefile $(WXLIB)
103 $(WXLIB) : pch $(OBJECTS)
108 pch: wx/msw/setup.h dummy.obj
110 dummy.obj: $(WXDIR)/src/msw/dummy.cpp
111 $(CPP) $(CPPFLAGS) $(PCH_CREATE) /c /Tp $?
114 sub generate_rules_for_dir
121 my $isC = $project{"WXCOBJS"} =~ / \Q$_\E /;
124 my $suffix = $isC ? "c" : "cpp";
125 my $cc = $isC ? '$(CC)' : '$(CPP)';
126 my $flags = $isC ? '$(CFLAGS)' : '$(CPPFLAGS) $(PCH_USE)';
127 $text .= "$name.obj: \$(WXDIR)/src/$dir/$name.$suffix\n" .
128 "\t $cc $flags /c /Tp \$?\n"
132 &generate_rules_for_dir("msw", $project{"WXMSWOBJS1"} . $project{"WXMSWOBJS2"});
134 &generate_rules_for_dir("common", $project{"WXCOMMONOBJS1"} . $project{"WXCOMMONOBJS2"});
136 &generate_rules_for_dir("generic", $project{"WXGENERICOBJS"});
139 Makefile: $(TMAKE_DIR)\makefile.v15
142 $(TMAKE_DIR)\makefile.v15: $(TMAKE_DIR)\filelist.txt $(TMAKE_DIR)\v15.t
144 $(TMAKE) -t v15 wxwin.pro -o makefile.v15