summaryrefslogtreecommitdiff
path: root/qt
authormickeyl <mickeyl>2003-12-09 23:18:37 (UTC)
committer mickeyl <mickeyl>2003-12-09 23:18:37 (UTC)
commitcf0db32ce938c3254a8153ec3ac390c7282af5d0 (patch) (unidiff)
tree6a08b705a3781f9f2a63c96f42463fbd58fdf4cb /qt
parenta18b79ad644cfc1a48a87b7d0d06266737d21cbf (diff)
downloadopie-cf0db32ce938c3254a8153ec3ac390c7282af5d0.zip
opie-cf0db32ce938c3254a8153ec3ac390c7282af5d0.tar.gz
opie-cf0db32ce938c3254a8153ec3ac390c7282af5d0.tar.bz2
how did that get back in?
Diffstat (limited to 'qt') (more/less context) (ignore whitespace changes)
-rw-r--r--qt/tmake/propagate.t368
1 files changed, 0 insertions, 368 deletions
diff --git a/qt/tmake/propagate.t b/qt/tmake/propagate.t
deleted file mode 100644
index 1efadaa..0000000
--- a/qt/tmake/propagate.t
+++ b/dev/null
@@ -1,368 +0,0 @@
1#############################################################################
2#!
3#! This is a tmake template for building UNIX libraries.
4#!
5#! Actually, it will be trivial to make app vs. lib a config option.
6#!
7#${
8 Project('CONFIG *= propagate');
9 $project{"TMAKE_CXXFLAGS"} = "";
10 $project{"TMAKE_CFLAGS"} = "";
11 $project{"TMAKE_LFLAGS"} = "";
12 $project{"TMAKE_LIBS"} = "";
13
14 Project('TMAKE_LIBS += $$LIBS'); # Misc. project-specific extras
15
16 if ( !Project("INTERFACE_DECL_PATH") ) {
17 Project('INTERFACE_DECL_PATH = .' );
18 }
19 if ( Config("qgl") ) {
20 #! qgl apps need X11 includes and libraries
21 Project('CONFIG *= x11lib');
22 Project('CONFIG *= x11inc');
23 }
24
25 if ( Config("x11") ) {
26 Project('CONFIG *= x11lib');
27 Project('CONFIG *= x11inc');
28 }
29 if ( Config("opengl") ) {
30 Project('TMAKE_CXXFLAGS *= $(SYSCONF_CXXFLAGS_OPENGL)');
31 Project('TMAKE_LFLAGS *= $(SYSCONF_LFLAGS_OPENGL)');
32 Project('TMAKE_LIBS *= $(SYSCONF_LIBS_OPENGL)');
33 }
34 if ( Config("qt") ) {
35 $moc_aware = 1;
36 Project('TMAKE_CXXFLAGS *= $(SYSCONF_CXXFLAGS_QT)');
37 if ( Project("TARGET") ne "qt"
38 && Project("TARGET") ne "qte" ) {
39 Project('TMAKE_LFLAGS *= $(SYSCONF_LFLAGS_QT)');
40 Project('TMAKE_LFLAGS *= $(SYSCONF_RPATH_QT)');
41 Project('TMAKE_LIBS *= $(SYSCONF_LIBS_QT)');
42 }
43 } elsif ( Config("qtinc") ) {
44 Project('TMAKE_CXXFLAGS *= $(SYSCONF_CXXFLAGS_QT)');
45 }
46 if ( Config("x11inc") ) {
47 Project('TMAKE_CXXFLAGS *= $(SYSCONF_CXXFLAGS_X11)');
48 }
49 if ( Config("x11lib") ) {
50 Project('TMAKE_LFLAGS *= $(SYSCONF_LFLAGS_X11)');
51 Project('TMAKE_LFLAGS *= $(SYSCONF_RPATH_X11)');
52 Project('TMAKE_LIBS *= $(SYSCONF_LIBS_X11)');
53 }
54
55 ##### These may still need replacing
56 if ( !Project("TMAKE_RUN_CC") ) {
57 Project('TMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -o $obj $src');
58 }
59 if ( !Project("TMAKE_RUN_CC_IMP") ) {
60 Project('TMAKE_RUN_CC_IMP = $(CC) -c $(CFLAGS) $(INCPATH) -o $@ $<');
61 }
62 if ( !Project("TMAKE_RUN_CXX") ) {
63 Project('TMAKE_RUN_CXX = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $obj $src');
64 }
65 if ( !Project("TMAKE_RUN_CXX_IMP") ) {
66 Project('TMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<');
67 }
68
69 Project('TMAKE_FILETAGS = HEADERS SOURCES TARGET DESTDIR $$FILETAGS');
70 Project('DESTDIR = ./') unless Project('DESTDIR');
71
72 if ( Config("embedded") && Project("PRECOMPH") ) {
73 Project('SOURCES += allmoc.cpp');
74 $project{'HEADERS_ORIG'} = Project('HEADERS');
75 $project{'HEADERS'} = "";
76 }
77
78 StdInit();
79
80 if ( Config("qt") ) {
81 if ( Project("TARGET") eq "qt"
82 || Project("TARGET") eq "qte" ) {
83 $project{"PNG_OBJECTS"} = &Objects($project{"PNG_SOURCES"});
84 $project{"ZLIB_OBJECTS"} = &Objects($project{"ZLIB_SOURCES"});
85 $project{"FT_OBJECTS"} = &Objects($project{"FT_SOURCES"});
86 }
87 }
88
89 my ($module,$label);
90 for $module ( split / /, $project{"MODULES"} ) {
91 for $label ( "HEADERS", "OBJECTS", "OBJMOC", "SOURCES", "SRCMOC" ) {
92 my $o = "";
93 my $p = $project{$label};
94 while ( $p =~ s/\s*\b($module\/\S*)// ) {
95 $o .= " " if $o;
96 $o .= "$1";
97 }
98 $p =~ s/^ *//;
99 $p =~ s/ *$//;
100 $project{$label} = $p;
101 $project{"${label}_${module}"} = $o;
102 }
103 }
104
105 $project{"DESTDIR"} = FixPath($project{"DESTDIR"});
106 $project{"VERSION"} || ($project{"VERSION"} = "1.0.0");
107 ($project{"VER_MAJ"},
108 $project{"VER_MIN"},
109 $project{"VER_PATCH"}) = $project{"VERSION"} =~ /(\d+)\.(\d+)(?:\.(\d+))?/;
110 $project{"VER_PATCH"} = 0 if !$project{"VER_PATCH"};
111 if ( Config("dll") ) {
112 Project('TMAKE_CXXFLAGS *= $(SYSCONF_CXXFLAGS_SHOBJ)' );
113 Project('TMAKE_CFLAGS *= $(SYSCONF_CFLAGS_SHOBJ)' );
114 Project('TMAKE_LFLAGS *= $(SYSCONF_LFLAGS_SHOBJ)');
115 }
116 if ( Config("yacc") ) {
117 Project('TMAKE_CXXFLAGS *= $(SYSCONF_CXXFLAGS_YACC)' );
118 Project('TMAKE_LIBS *= $(SYSCONF_LIBS_YACC)' );
119 }
120 Project('TMAKE_CXXFLAGS *= $(SYSCONF_CXXFLAGS)' );
121 Project('TMAKE_CFLAGS *= $(SYSCONF_CFLAGS)' );
122 Project('TMAKE_LFLAGS *= $(SYSCONF_LFLAGS)' );
123 if ( Project('TEMPLATE') eq "lib" || Project('TEMPLATE') eq "qt.t" ) {
124 Project('TMAKE_CXXFLAGS *= $(SYSCONF_CXXFLAGS_LIB)' );
125 Project('TMAKE_CFLAGS *= $(SYSCONF_CFLAGS_LIB)' );
126 } else {
127 Project('TMAKE_LIBS *= $(SYSCONF_LIBS)' );
128 }
129#$}
130
131####### Compiler, tools and options
132
133 CXX =$(SYSCONF_CXX) $(QT_CXX_MT)
134 CXXFLAGS=#$ Expand("TMAKE_CXXFLAGS"); ExpandGlue("DEFINES","-D"," -D",""); (Project("TARGET") eq "qt" || Project("TARGET") eq "qte") && ($text = $text . ' $(QT_CXXFLAGS_OPT)');
135 CC =$(SYSCONF_CC) $(QT_C_MT)
136 CFLAGS =#$ Expand("TMAKE_CFLAGS"); ExpandGlue("DEFINES","-D"," -D",""); (Project("TARGET") eq "qt" || Project("TARGET") eq "qte") && ($text = $text . ' $(QT_CFLAGS_OPT)');
137 INCPATH =#$ ExpandGlue("INCPATH","-I"," -I","");
138 LFLAGS =#$ Expand("TMAKE_LFLAGS"); $text .= ' $(QT_LFLAGS_MT)'
139 LIBS =$(SUBLIBS) #${
140 Expand("TMAKE_LIBS");
141 if (Project("TARGET") eq "qt" || Project("TARGET") eq "qte") {
142 $text .= ' $(SYSCONF_LIBS_QTLIB)';
143 } else {
144 $text .= ' $(SYSCONF_LIBS_QTAPP)';
145 }
146#$}
147 MOC =$(SYSCONF_MOC)
148 UIC =$(SYSCONF_UIC)
149
150####### Target
151
152DESTDIR = #$ Expand("DESTDIR");
153VER_MAJ = #$ Expand("VER_MAJ");
154VER_MIN = #$ Expand("VER_MIN");
155VER_PATCH = #$ Expand("VER_PATCH");
156 TARGET= #$ Expand("TARGET"); $text .= '$(QT_THREAD_SUFFIX)' if Project("TARGET") eq "qt" || Project("TARGET") eq "qte";
157TARGET1 = lib$(TARGET).so.$(VER_MAJ)
158
159####### Files
160
161 HEADERS =#$ ExpandList("HEADERS");
162 SOURCES =#$ ExpandList("SOURCES");
163 OBJECTS =#$ ExpandList("OBJECTS"); (Project("TARGET") eq "qt" || Project("TARGET") eq "qte") && ($text = $text . ' $(QT_MODULE_OBJ)');
164INTERFACES = #$ ExpandList("INTERFACES");
165UICDECLS = #$ ExpandList("UICDECLS");
166UICIMPLS = #$ ExpandList("UICIMPLS");
167 SRCMOC =#$ ExpandList("SRCMOC");
168 OBJMOC =#$ ExpandList("OBJMOC");
169#$ if (Project("TARGET") ne "qt" && Project("TARGET") ne "qte") { DisableOutput(); }
170PNG_OBJECTS = #$ ExpandList("PNG_OBJECTS");
171ZLIB_OBJECTS = #$ ExpandList("ZLIB_OBJECTS");
172FT_OBJECTS = #$ ExpandList("FT_OBJECTS");
173#$ if (Project("TARGET") ne "qt" && Project("TARGET") ne "qte") { EnableOutput(); }
174
175#${
176 my $module;
177 $t = "";
178 for $module ( split / /, $project{"MODULES"} ) {
179 $t .= "\nOBJECTS_$module = ";
180 $text = "";
181 ExpandList("OBJECTS_$module");
182 $t .= $text;
183 if ( Project("OBJMOC_$module") ) {
184 $text = "";
185 ExpandList("OBJMOC_$module");
186 $t .= " \\\n\t\t$text";
187 }
188 }
189 $text = "$t\n";
190#$}
191
192####### Implicit rules
193
194.SUFFIXES: .cpp .cxx .cc .C .c
195
196.cpp.o:
197 #$ Expand("TMAKE_RUN_CXX_IMP");
198
199.cxx.o:
200 #$ Expand("TMAKE_RUN_CXX_IMP");
201
202.cc.o:
203 #$ Expand("TMAKE_RUN_CXX_IMP");
204
205.C.o:
206 #$ Expand("TMAKE_RUN_CXX_IMP");
207
208.c.o:
209 #$ Expand("TMAKE_RUN_CC_IMP");
210
211####### Build rules
212
213#${
214 if ( Project("SUBLIBS") ) {
215 $text = "SUBLIBS=";
216 for $m ( split / /, Project("SUBLIBS") ) {
217 $text .= "tmp/lib$m.a ";
218 }
219 $text .= "\n";
220 }
221#$}
222
223#${
224 if ( Project('TEMPLATE') eq "lib" || Project('TEMPLATE') eq "qt.t" ) {
225 $targ='$(SYSCONF_LINK_TARGET)';
226 } else {
227 if ( Config('dll') ) {
228 if ($is_unix) {
229 $targ = '$(TARGET)' . ".so";
230 } else {
231 $targ = '$(TARGET)' . ".dll";
232 $targ = "np" . $targ if Config('np');
233 }
234 } else {
235 $targ = '$(TARGET)';
236 }
237 }
238 $targ = '$(DESTDIR)'.$targ;
239 $text .= 'all: ';
240 ExpandGlue("ALL_DEPS",""," "," ");
241 $text .= $targ . "\n\n";
242 $text .= $targ . ': $(UICDECLS) $(OBJECTS) $(OBJMOC) $(SUBLIBS)';
243 Expand("TARGETDEPS");
244 $text .= "\n\t";
245 if ( Project('TEMPLATE') eq "lib" || Project('TEMPLATE') eq "qt.t" ) {
246 $text .= '$(SYSCONF_LINK_LIB)';
247 } else {
248 $text .= '$(SYSCONF_LINK) $(LFLAGS) ';
249 $text .= '-o '.$targ.' $(OBJECTS) $(OBJMOC) $(LIBS)';
250 }
251#$}
252
253moc: $(SRCMOC)
254
255#$ TmakeSelf();
256
257clean:
258 -rm -f $(OBJECTS) $(OBJMOC) $(SRCMOC) $(UICIMPLS) $(UICDECLS)
259 #$ ExpandGlue("TMAKE_CLEAN","-rm -f "," ","");
260 -rm -f *~ core
261 #$ ExpandGlue("CLEAN_FILES","-rm -f "," ","");
262 -rm -f allmoc.cpp
263
264####### Extension Modules
265
266listpromodules:
267 @echo #$ ExpandList("MODULES_BASE"); ExpandList("MODULES_PRO");
268
269listallmodules:
270 @echo #$ ExpandList("MODULES");
271
272listaddonpromodules:
273 @echo #$ ExpandList("MODULES_PRO");
274
275listaddonentmodules:
276 @echo #$ ExpandList("MODULES_PRO"); ExpandList("MODULES_ENT");
277
278
279REQUIRES=#$ $text .= Project("REQUIRES");
280
281####### Sub-libraries
282
283#${
284 if ( Project("SUBLIBS") ) {
285 for $m ( split / /, Project("SUBLIBS") ) {
286 $text .= "tmp/lib$m.a:\n\t";
287 if ( $m eq "freetype" ) {
288 $text .= '$(MAKE) -C 3rdparty/freetype2 \
289 CONFIG_MK=config$(DASHCROSS).mk OBJ_DIR=../../tmp \
290 ../../tmp/libfreetype.a'."\n";
291 } else {
292 if ( Config('embedded') ) {
293 if ( $m eq "z" ) {
294 $text .= '$(MAKE) -C 3rdparty/zlib -f Makefile$(DASHCROSS); \
295 cp 3rdparty/zlib/libz.a tmp'."\n";
296 }
297 if ( $m eq "png" ) {
298 $text .= '$(MAKE) -C 3rdparty/libpng \
299 -f scripts/makefile.linux$(DASHCROSS); \
300 cp 3rdparty/libpng/libpng.a tmp'."\n";
301 }
302 if ( $m eq "mng" ) {
303 $text .= '$(MAKE) -C 3rdparty/libmng \
304 -f makefiles/makefile.linux$(DASHCROSS); \
305 cp 3rdparty/libmng/libmng.a tmp'."\n";
306 }
307 if ( $m eq "jpeg" ) {
308 $text .= '$(MAKE) -C 3rdparty/jpeglib -f makefile.unix$(DASHCROSS); \
309 cp 3rdparty/jpeglib/libjpeg.a tmp'."\n";
310 }
311 } else {
312 $text .= $project{"MAKELIB$m"}."\n";
313 }
314 }
315
316 }
317 }
318#$}
319
320###### Combined headers
321
322#${
323 if ( Config("embedded") && Project("PRECOMPH") ) {
324 $t = "allmoc.cpp: ".Project("PRECOMPH")." ".$original_HEADERS;
325 ExpandList("HEADERS_ORIG");
326 $t.= $text;
327 $t.= "\n\techo '#include \"".Project("PRECOMPH")."\"' >allmoc.cpp";
328 $t.= "\n\t\$(CXX) -E -DQT_MOC_CPP \$(CXXFLAGS) \$(INCPATH) >allmoc.h allmoc.cpp";
329 $t.= "\n\t\$(MOC) -o allmoc.cpp allmoc.h";
330 $t.= "\n\tperl -pi -e 's{\"allmoc.h\"}{\"".Project("PRECOMPH")."\"}' allmoc.cpp";
331 $t.= "\n\trm allmoc.h";
332 $t.= "\n";
333 $text = $t;
334 }
335#$}
336
337
338####### Compile
339
340#$ BuildObj(Project("OBJECTS"),Project("SOURCES"));
341#$ BuildUicSrc(Project("INTERFACES"));
342#$ BuildObj(Project("UICOBJECTS"),Project("UICIMPLS"));
343#$ BuildMocObj(Project("OBJMOC"),Project("SRCMOC"));
344#$ BuildMocSrc(Project("HEADERS"));
345#$ BuildMocSrc(Project("SOURCES"));
346#$ BuildMocSrc(Project("UICDECLS"));
347#$ if (Project("TARGET") ne "qt" && Project("TARGET") ne "qte") { DisableOutput(); }
348#$ Project("PNG_SOURCES") && BuildObj(Project("PNG_OBJECTS"),Project("PNG_SOURCES"));
349#$ Project("ZLIB_SOURCES") && BuildObj(Project("ZLIB_OBJECTS"),Project("ZLIB_SOURCES"));
350#$ Project("FT_SOURCES") && BuildObj(Project("FT_OBJECTS"),Project("FT_SOURCES"));
351#$ if (Project("TARGET") ne "qt" && Project("TARGET") ne "qte") { EnableOutput(); }
352
353#${
354 my $module;
355 $t = "";
356 for $module ( split / /, $project{"MODULES"} ) {
357 $t .= "\n# Module $module...\n";
358 $text = ""; BuildMocObj(Project("OBJMOC_$module"),Project("SRCMOC_$module"));
359 $t .= $text;
360 $text = ""; BuildMocSrc(Project("HEADERS_$module"));
361 $t .= $text;
362 $text = ""; BuildMocSrc(Project("SOURCES_$module"));
363 $t .= $text;
364 $text = ""; BuildObj(Project("OBJECTS_$module"),Project("SOURCES_$module"));
365 $t .= $text;
366 $text = $t;
367 }
368#$}