]> git.saurik.com Git - wxWidgets.git/blame - distrib/msw/tmake/watbase.t
Use generic collapsible pane for wxUniv based builds.
[wxWidgets.git] / distrib / msw / tmake / watbase.t
CommitLineData
a0499e2f
VZ
1#!#############################################################################
2#! File: wat.t
3#! Purpose: tmake template file from which makefile.wat is generated by running
4#! tmake -t wat wxwin.pro -o makefile.wat
5#! Author: Vadim Zeitlin
6#! Created: 14.07.99
7#! Version: $Id$
8#!#############################################################################
9#${
10 #! include the code which parses filelist.txt file and initializes
11 #! %wxCommon, %wxGeneric and %wxMSW hashes.
12 IncludeTemplate("filelist.t");
13
14 #! now transform these hashes into $project tags
15 foreach $file (sort keys %wxCommon) {
16 next if $wxCommon{$file} !~ /\bB\b/;
17
18 $isCFile = $file =~ /\.c$/;
19 $file =~ s/cp?p?$/obj/;
20 $project{"WXCOMMONOBJS"} .= $file . " ";
21 $project{"WXCOBJS"} .= $file . " " if $isCFile;
22 }
23
24 foreach $file (sort keys %wxMSW) {
25 next if $wxMSW{$file} !~ /\bB\b/;
26
27 my $isCFile = $file =~ /\.c$/;
28 $file =~ s/cp?p?$/obj/;
29 $project{"WXMSWOBJS"} .= $file . " ";
30 $project{"WXCOBJS"} .= $file . " " if $isCFile;
31 }
32
33 foreach $file (sort keys %wxBase) {
34 my $isCFile = $file =~ /\.c$/;
35 $file =~ s/cp?p?$/obj/;
36 $project{"WXCOMMONOBJS"} .= $file . " ";
37 $project{"WXCOBJS"} .= $file . " " if $isCFile;
38 }
39
40#$}
41#! an attempt to embed '#' directly in the string somehow didn't work...
42#$ $text = chr(35) . '!/binb/wmake.exe';
43
44# This file was automatically generated by tmake
45# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE WATBASE.T!
46
47##############################################################################
48# Name: makebase.wat
49# Purpose: Builds wxBase library for Watcom C++ under Win32
50# Author: Vadim Zeitlin
51# Created: 21.01.03
52# RCS-ID: $Id$
53# Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwindows.org>
54# Licence: wxWindows licence
55##############################################################################
56
57wxUSE_GUI=0
58
59!include ..\makewat.env
60
40bed4b6 61LIBTARGET = $(WXDIR)\lib\wx$(TOOLKIT)$(DEBUGSUFFIX)_w.lib
a0499e2f
VZ
62
63EXTRATARGETS = zlib regex
64EXTRATARGETSCLEAN = clean_zlib clean_regex
65COMMDIR=$(WXDIR)\src\common
66MSWDIR=$(WXDIR)\src\msw
67OLEDIR=$(MSWDIR)\ole
68
69COMMONOBJS = &
40bed4b6 70 #$ ExpandGlue("WXCOMMONOBJS", "\$(OUTPUTDIR)\\", " &\n\t\$(OUTPUTDIR)\\")
a0499e2f
VZ
71
72MSWOBJS = &
40bed4b6 73 #$ ExpandGlue("WXMSWOBJS", "\$(OUTPUTDIR)\\", " &\n\t\$(OUTPUTDIR)\\")
a0499e2f
VZ
74
75OBJECTS = $(COMMONOBJS) $(MSWOBJS)
76
77SETUP_H=$(ARCHINCDIR)\wx\setup.h
78
79all: $(SETUP_H) $(OUTPUTDIR) $(OBJECTS) $(LIBTARGET) $(EXTRATARGETS) .SYMBOLIC
80
81$(ARCHINCDIR)\wx:
82 mkdir $(ARCHINCDIR)
83 mkdir $(ARCHINCDIR)\wx
84
85$(OUTPUTDIR):
86 mkdir $(OUTPUTDIR)
87
88$(SETUP_H): $(WXDIR)\include\wx\msw\setup.h $(ARCHINCDIR)\wx
89 copy $(WXDIR)\include\wx\msw\setup.h $@
90
40bed4b6 91LBCFILE=$(OUTPUTDIR)\wx$(TOOLKIT).lbc
a0499e2f
VZ
92$(LIBTARGET) : $(OBJECTS)
93 %create $(LBCFILE)
94 @for %i in ( $(OBJECTS) ) do @%append $(LBCFILE) +%i
95 wlib /q /b /c /n /p=512 $^@ @$(LBCFILE)
96
97
98clean: .SYMBOLIC $(EXTRATARGETSCLEAN)
572affa4 99 -erase $(OUTPUTDIR)\*.obj
a0499e2f 100 -erase $(LIBTARGET)
572affa4
CE
101 -erase $(OUTPUTDIR)\*.pch
102 -erase $(OUTPUTDIR)\*.err
103 -erase $(OUTPUTDIR)\*.lbc
a0499e2f
VZ
104
105cleanall: clean
106 -erase $(LBCFILE)
107
108#${
109 $_ = $project{"WXMSWOBJS"};
110 my @objs = split;
111 foreach (@objs) {
40bed4b6 112 $text .= "\$(OUTPUTDIR)\\" . $_ . ': $(';
a0499e2f
VZ
113 s/\.obj$//;
114 $text .= 'MSWDIR)\\';
115
116 my $suffix, $cc;
117 if ( $project{"WXCOBJS"} =~ /\b\Q$_\E\b/ ) {
118 $suffix = "c";
119 $cc="CC";
120 $flags="CFLAGS";
121 }
122 else {
123 $suffix = "cpp";
124 $cc="CXX";
125 $flags="CXXFLAGS";
126 }
127 $text .= $_ . ".$suffix\n" .
128 " *\$($cc) \$($flags) \$<" . "\n\n";
129 }
130#$}
131
132########################################################
133# Common objects (always compiled)
134
135#${
136 $_ = $project{"WXCOMMONOBJS"};
137 my @objs = split;
138 foreach (@objs) {
40bed4b6 139 $text .= "\$(OUTPUTDIR)\\" . $_;
a0499e2f
VZ
140 s/\.obj$//;
141 $text .= ': $(COMMDIR)\\';
142 my $suffix, $cc;
143 if ( $project{"WXCOBJS"} =~ /\b\Q$_\E\b/ ) {
144 $suffix = "c";
145 $cc="CC";
146 $flags="CFLAGS";
147 }
148 else {
149 $suffix = "cpp";
150 $cc="CXX";
151 $flags="CXXFLAGS";
152 }
153 $text .= $_ . ".$suffix\n" .
154 " *\$($cc) \$($flags) \$<" . "\n\n";
155 }
156#$}
157
158zlib: .SYMBOLIC
159 cd $(WXDIR)\src\zlib
160 wmake -f makefile.wat all
161 cd $(WXDIR)\src\msw
162
163clean_zlib: .SYMBOLIC
164 cd $(WXDIR)\src\zlib
165 wmake -f makefile.wat clean
166 cd $(WXDIR)\src\msw
167
168regex: .SYMBOLIC
169 cd $(WXDIR)\src\regex
170 wmake -f makefile.wat all
171 cd $(WXDIR)\src\msw
172
173clean_regex: .SYMBOLIC
174 cd $(WXDIR)\src\regex
175 wmake -f makefile.wat clean
176 cd $(WXDIR)\src\msw
177
178MFTYPE=watbase
179self : .SYMBOLIC $(WXDIR)\distrib\msw\tmake\filelist.txt $(WXDIR)\distrib\msw\tmake\$(MFTYPE).t
180 cd $(WXDIR)\distrib\msw\tmake
40bed4b6 181 perl -S tmake -t $(MFTYPE) wxwin.pro -o makebase.wat
a0499e2f 182 copy makebase.wat $(WXDIR)\src\msw