]> git.saurik.com Git - wxWidgets.git/blame - distrib/msw/tmake/sc.t
Temporary ugly trick to make release for OpenWatcom possible.
[wxWidgets.git] / distrib / msw / tmake / sc.t
CommitLineData
f2071dda
VZ
1#!#############################################################################
2#! File: sc.t
3#! Purpose: tmake template file from which makefile.sc is generated by running
4#! tmake -t sc wxwin.pro -o makefile.sc
5#! Author: Vadim Zeitlin
6#! Created: 14.07.99
7#! Version: $Id$
8#!#############################################################################
9
10#${
11 #! include the code which parses filelist.txt file and initializes
12 #! %wxCommon, %wxGeneric and %wxMSW hashes.
13 IncludeTemplate("filelist.t");
14
15 #! now transform these hashes into $project tags
16 foreach $file (sort keys %wxGeneric) {
17 my $tag = "";
18 if ( $wxGeneric{$file} =~ /\b(PS|G|16|U)\b/ ) {
19 $tag = "WXNONESSENTIALOBJS";
20 }
21 else {
22 $tag = "WXGENERICOBJS";
23 }
24
25 $file =~ s/cp?p?$/obj/;
26 $project{$tag} .= '$(GENDIR)\\' . $file . " "
27 }
28
0caac3b4
CE
29 foreach $file (sort keys %wxHTML) {
30 next if $wxHTML{$file} =~ /\b16\b/;
31
32 $file =~ s/cp?p?$/obj/;
33 $project{"WXHTMLOBJS"} .= '$(HTMLDIR)\\' . $file . " "
34 }
35
f2071dda 36 foreach $file (sort keys %wxCommon) {
6a253da1
VS
37 next if $wxCommon{$file} =~ /\b(16|U)\b/;
38
f2071dda
VZ
39 $file =~ s/cp?p?$/obj/;
40 $project{"WXCOMMONOBJS"} .= '$(COMMDIR)\\' . $file . " "
41 }
42
43 foreach $file (sort keys %wxMSW) {
44 #! these files don't compile with SC++ 6
0caac3b4 45 #! next if $file =~ /^(joystick|pnghand)\./;
f2071dda 46
4ce1efe1 47 next if $wxMSW{$file} =~ /\b16\b/;
f2071dda 48
c54f5226 49 my $isOleObj = $wxMSW{$file} =~ /\bO\b/;
f2071dda 50 $file =~ s/cp?p?$/obj/;
c54f5226
VZ
51 $project{"WXMSWOBJS"} .= '$(MSWDIR)\\';
52 $project{"WXMSWOBJS"} .= 'ole\\' if $isOleObj;
53 $project{"WXMSWOBJS"} .= $file . " "
f2071dda
VZ
54 }
55#$}
56
0f04dbf3 57# This file was automatically generated by tmake
f2071dda
VZ
58# DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE SC.T!
59
e81cf2eb
CE
60# Digital mars makefile
61# was Symantec C++ makefile for the msw objects
62#
f2071dda
VZ
63# called from src\makefile.sc
64
65# configuration section (see src\makefile.sc) ###########################
66
e81cf2eb 67WXDIR = ..\..
f2071dda
VZ
68
69include ..\makesc.env
70
71DEBUG=0
72
4ce1efe1 73LIBTARGET = $(LIBDIR)\wx$(SC_SUFFIX).lib
f2071dda
VZ
74
75OPTIONS=
76
77# end of configuration section ##########################################
78
79GENDIR=$(WXDIR)\src\generic
80COMMDIR=$(WXDIR)\src\common
0caac3b4 81HTMLDIR=$(WXDIR)\src\html
f2071dda
VZ
82OLEDIR=ole
83MSWDIR=$(WXDIR)\src\msw
84
85GENERICOBJS= #$ ExpandList("WXGENERICOBJS");
86
0caac3b4
CE
87COMMONOBJS = #$ ExpandList("WXCOMMONOBJS");
88
89HTMLOBJS = #$ ExpandList ("WXHTMLOBJS");
f2071dda
VZ
90
91MSWOBJS = #$ ExpandList("WXMSWOBJS");
92
f2071dda 93# Add $(NONESSENTIALOBJS) if wanting generic dialogs, PostScript etc.
7960c7b4 94OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS) $(HTMLOBJS)
f2071dda 95
3eb14b8c 96all: MAKEARCHDIR MAKELIBS PCH $(LIBTARGET) zlib png jpeg tiff regex
4ce1efe1
CE
97
98MAKEARCHDIR:
99 @if not exist $(MSWINCDIR)\setup.h copy $(MSWINCDIR)\setup0.h $(MSWINCDIR)\setup.h
100 @if not exist $(ARCHINCDIR)\wx\setup.h mkdir $(ARCHINCDIR)
101 @if not exist $(ARCHINCDIR)\wx\setup.h mkdir $(ARCHINCDIR)\wx
102 @if not exist $(ARCHINCDIR)\wx\setup.h copy $(MSWINCDIR)\setup.h $(ARCHINCDIR)\wx\setup.h
3eb14b8c 103 @if not exist $(WXOUTDIR)\nul mkdir $(WXOUTDIR)
f2071dda 104
05d3cd45
CE
105#build our own copies of missing libraries
106MAKELIBS:
107 implib /s $(LIBDIR)\$(SHELLLIB) $(LIBDIR)\$(SC_SUFFIX)\$(SHELLLIB).def
108 implib /s $(LIBDIR)\$(WINSOCKLIB) $(LIBDIR)\$(SC_SUFFIX)\$(WINSOCKLIB).def
0caac3b4 109
f2071dda
VZ
110$(LIBTARGET): $(OBJECTS)
111 -del $(LIBTARGET)
112 *lib /PAGESIZE:512 $(LIBTARGET) y $(OBJECTS), nul;
113
3eb14b8c 114clean: clean_msw clean_zlib clean_png clean_jpeg clean_tiff clean_regex clean_pch
2cea8d25
CE
115
116clean_msw:
4ce1efe1
CE
117 -del $(COMMDIR)\*.obj
118 -del $(MSWDIR)\*.obj
119 -del $(GENDIR)\*.obj
e81cf2eb 120 -del $(HTMLDIR)\*.obj
f2071dda 121 -del *.obj
e81cf2eb
CE
122 -del *.sym
123 -del ole\*.obj
124 -del $(LIBTARGET)
f2071dda 125
3eb14b8c
CE
126PCH: $(INCDIR)\wx\wxprec.h
127 dmc $(CPPFLAGS) $(CFLAGS) $(INCLUDE) -HF$(WXOUTDIR)\wxprec.SYM -o$(WXOUTDIR)\wxprec.PCO $(INCDIR)\wx\wxprec.h
128
129clean_pch:
130 del $(WXOUTDIR)\*.sym
131 del $(WXOUTDIR)\*.PCO
132
133
0caac3b4
CE
134png:
135 make -f $(WXDIR)\src\png\makefile.sc FINAL=$(FINAL)
136
137clean_png:
138 make -f $(WXDIR)\src\png\makefile.sc clean
139
140zlib:
141 make -f $(WXDIR)\src\zlib\makefile.sc FINAL=$(FINAL)
142
143clean_zlib:
144 make -f $(WXDIR)\src\zlib\makefile.sc clean
145
146jpeg:
147 make -f $(WXDIR)\src\jpeg\makefile.sc FINAL=$(FINAL)
148
149clean_jpeg:
150 make -f $(WXDIR)\src\jpeg\makefile.sc clean
151
152regex:
153 make -f $(WXDIR)\src\regex\makefile.sc FINAL=$(FINAL)
154
155clean_regex:
156 make -f $(WXDIR)\src\regex\makefile.sc clean
157
158tiff:
159 make -f $(WXDIR)\src\tiff\makefile.sc FINAL=$(FINAL)
160
161clean_tiff:
162 make -f $(WXDIR)\src\tiff\makefile.sc clean
f2071dda 163
9be9b974 164MFTYPE=sc
3eb14b8c
CE
165self : $(WXWIN)\distrib\msw\tmake\filelist.txt $(WXWIN)\distrib\msw\tmake\$(MFTYPE).t
166 perl -x$(WXWIN)\distrib\msw\tmake -S tmake -t$(MFTYPE) wxwin.pro -o $(WXWIN)\distrib\msw\tmake\makefile.sc
167 copy $(WXWIN)\distrib\msw\tmake\makefile.$(MFTYPE) $(WXWIN)\src\msw