1 | package CMT |
---|
2 | |
---|
3 | author arnault@lal.in2p3.fr |
---|
4 | |
---|
5 | tag alpha OSF1 |
---|
6 | tag alpha_dux40 alpha |
---|
7 | tag alpha-debug alpha debug |
---|
8 | |
---|
9 | tag LynxOS-VGPW2 LynxOS |
---|
10 | tag LynxOS-PowerPC LynxOS |
---|
11 | tag RIO806X LynxOS |
---|
12 | tag VMTR2X LynxOS |
---|
13 | |
---|
14 | tag hp9000s780 HP-UX |
---|
15 | tag hp9000s700 HP-UX |
---|
16 | tag hp700_ux101 HP-UX |
---|
17 | tag hp_ux102 HP-UX |
---|
18 | |
---|
19 | tag Linux-i686 Linux |
---|
20 | tag i386_redhat51 Linux |
---|
21 | tag i386_linux22 Linux |
---|
22 | |
---|
23 | tag rs_aix42 AIX |
---|
24 | |
---|
25 | tag sun4u SunOS |
---|
26 | tag sun4x_57 SunOS |
---|
27 | |
---|
28 | # Alternate possible tags for VisualC |
---|
29 | tag VisualC WIN32 |
---|
30 | tag VisualC Win32 |
---|
31 | tag WIN32 VisualC |
---|
32 | |
---|
33 | # Some alternate definitions for debug on VisualC |
---|
34 | tag VisualCdbg WIN32 windebug |
---|
35 | tag VisualD WIN32 windebug |
---|
36 | tag VisualDbg WIN32 windebug |
---|
37 | tag VisualDebug WIN32 windebug |
---|
38 | tag VisualD VisualC windebug |
---|
39 | tag VisualDbg VisualC windebug |
---|
40 | tag Win32Debug VisualC windebug |
---|
41 | |
---|
42 | |
---|
43 | path_remove PATH "CMT" |
---|
44 | path_prepend PATH "${CMTROOT}/${CMTBIN}" \ |
---|
45 | WIN32 "%CMTROOT%\%CMTBIN%" |
---|
46 | |
---|
47 | path_remove CLASSPATH "CMT" |
---|
48 | path_append CLASSPATH "${CMTROOT}/java" \ |
---|
49 | WIN32 "%CMTROOT%\java" |
---|
50 | |
---|
51 | path_append include "" |
---|
52 | path_append lib "" |
---|
53 | |
---|
54 | # |
---|
55 | # C environment |
---|
56 | # |
---|
57 | |
---|
58 | macro cc "gcc" \ |
---|
59 | insure "insure" \ |
---|
60 | alpha "cc" \ |
---|
61 | alphat "cc" \ |
---|
62 | HP-UX "aCC" \ |
---|
63 | hp700_ux101 "gcc" \ |
---|
64 | AIX "xlc" \ |
---|
65 | SunOS "cc" \ |
---|
66 | VisualC "cl.exe" \ |
---|
67 | Darwin "cc" |
---|
68 | |
---|
69 | macro cdebugflags "" \ |
---|
70 | debug "-g" |
---|
71 | |
---|
72 | macro cflags "" \ |
---|
73 | LynxOS-VGPW2 "-X" \ |
---|
74 | insure "-std1" \ |
---|
75 | HP-UX "+Z" \ |
---|
76 | hp700_ux101 "-fpic -ansi" \ |
---|
77 | alpha "-std1" \ |
---|
78 | alphat "-std1" \ |
---|
79 | SunOS "-KPIC" \ |
---|
80 | VisualC '/nologo /DWIN32 /MD /W3 $(includes) /c' |
---|
81 | |
---|
82 | macro pp_cflags "" \ |
---|
83 | LynxOS-VGPW2 "-DVGPW2" \ |
---|
84 | HP-UX "-D_HPUX_SOURCE" \ |
---|
85 | alphat "-DCTHREADS" \ |
---|
86 | AIX "-D_ALL_SOURCE -D_BSD" \ |
---|
87 | Linux "-Di586" |
---|
88 | |
---|
89 | macro ccomp "$(cc) -c $(includes) $(cdebugflags) $(cflags) $(pp_cflags)" \ |
---|
90 | VisualC "cl.exe $(cdebugflags) $(cflags) $(pp_cflags)" |
---|
91 | |
---|
92 | macro clinkflags "" |
---|
93 | |
---|
94 | macro clink "$(cc) $(clinkflags)" \ |
---|
95 | VisualC "link.exe /nologo /machine:IX86 " |
---|
96 | |
---|
97 | |
---|
98 | # |
---|
99 | # Developper Studio environment |
---|
100 | # |
---|
101 | |
---|
102 | macro msdevdll "" \ |
---|
103 | VisualC "/dll" |
---|
104 | |
---|
105 | macro msdevdllflags "" \ |
---|
106 | VisualC '/MT /D "_USRDLL" /D "WDLL_EXPORTS"' \ |
---|
107 | VisualD '/MTd /D "_USRDLL" /D "WDLL_EXPORTS"' |
---|
108 | |
---|
109 | |
---|
110 | # |
---|
111 | # C++ environment |
---|
112 | # |
---|
113 | |
---|
114 | macro ppcmd "-I" \ |
---|
115 | rs_aix41 "-WF,-I" \ |
---|
116 | VisualC "/I " |
---|
117 | |
---|
118 | macro cpp "g++" \ |
---|
119 | insure "insure" \ |
---|
120 | alpha "cxx" \ |
---|
121 | OSF1 "g++" \ |
---|
122 | HP-UX "aCC" \ |
---|
123 | hp700_ux101 "g++" \ |
---|
124 | hp_ux102 "aCC" \ |
---|
125 | AIX "xlC" \ |
---|
126 | Linux "c++" \ |
---|
127 | SunOS "CC" \ |
---|
128 | VisualC "cl.exe" \ |
---|
129 | Darwin "c++" |
---|
130 | |
---|
131 | macro cppdebugflags "" \ |
---|
132 | debug "-g" |
---|
133 | |
---|
134 | macro cppflags "" \ |
---|
135 | alpha "-nocompress -std arm -msg_quiet" \ |
---|
136 | OSF1 "-fpic" \ |
---|
137 | hp9000s780 "+Z" \ |
---|
138 | hp700_ux101 "-fpic" \ |
---|
139 | HP-UX "+Z -Wc,-ansi_for_scope,on" \ |
---|
140 | hp_ux102 "-z +p -Wc,-ansi_for_scope,on +O2 +Onoinitcheck" \ |
---|
141 | Linux "-pipe -ansi -pedantic -W -Wall -Wwrite-strings -Wpointer-arith -Wnested-externs -Woverloaded-virtual -Wbad-function-cast -fnonnull-objects " \ |
---|
142 | SunOS "-KPIC" \ |
---|
143 | VisualC '/nologo /DWIN32 /MD /W3 $(includes) /c' |
---|
144 | |
---|
145 | macro pp_cppflags "" \ |
---|
146 | HP-UX "-D_HPUX_SOURCE" \ |
---|
147 | Linux "-D_GNU_SOURCE" |
---|
148 | |
---|
149 | macro cppcomp "$(cpp) -c $(includes) $(cppdebugflags) $(cppflags) $(pp_cppflags)" \ |
---|
150 | VisualC "cl.exe $(cppdebugflags) $(cppflags) $(pp_cppflags)" |
---|
151 | |
---|
152 | macro cpplinkflags "" |
---|
153 | |
---|
154 | macro cpplink "$(cpp) $(cpplinkflags)" \ |
---|
155 | VisualC "link.exe /nologo /machine:I386" |
---|
156 | |
---|
157 | macro cpp_linkopts "" \ |
---|
158 | OSF1 " -lstdc++ " \ |
---|
159 | alpha " /usr/lib/cmplrs/cxx/libcxx.a -lcxxstd -lexc -lm " \ |
---|
160 | alphat " /usr/lib/cmplrs/cxx/libcxx.a -lcxxstd -lexc -lm " |
---|
161 | |
---|
162 | # |
---|
163 | # Fortran environment |
---|
164 | # |
---|
165 | |
---|
166 | macro for "f77" \ |
---|
167 | HP-UX "fort77" \ |
---|
168 | rs_aix41 "xlf" \ |
---|
169 | Linux "g77" |
---|
170 | |
---|
171 | macro fflags "-g" \ |
---|
172 | VisualC "" |
---|
173 | |
---|
174 | macro fcomp "$(for) -c $(fincludes) $(fflags) $(pp_fflags)" \ |
---|
175 | VisualC "" |
---|
176 | |
---|
177 | macro flink "$(for) $(flinkflags)" |
---|
178 | |
---|
179 | # |
---|
180 | # Java environment |
---|
181 | # |
---|
182 | |
---|
183 | macro javacomp "javac" |
---|
184 | macro javacopy "cp" VisualC "copy" |
---|
185 | macro jar "jar" |
---|
186 | |
---|
187 | # |
---|
188 | # X11 environment |
---|
189 | # |
---|
190 | |
---|
191 | macro X11_cflags "-I/usr/include" \ |
---|
192 | HP-UX "-I/usr/include/X11R5" \ |
---|
193 | SunOS "-I/usr/motif/usr/include" \ |
---|
194 | VisualC "" |
---|
195 | |
---|
196 | macro Xm_cflags "-I/usr/include" \ |
---|
197 | HP-UX "-I/usr/include/Motif1.2" \ |
---|
198 | SunOS "-I/usr/motif/usr/include" \ |
---|
199 | VisualC "" |
---|
200 | |
---|
201 | #### hp9000s700 "/usr/lib/Motif1.2/libXm.sl /usr/lib/X11R5/libXt.sl /usr/lib/X11R5/libX11.sl" |
---|
202 | |
---|
203 | macro X_linkopts ""\ |
---|
204 | alpha "-lXm -lXmu -lXt -lXext -lX11 -ldnet_stub -lm -lots"\ |
---|
205 | OSF1 "-lXm -lXmu -lXt -lXext -lX11 -ldnet_stub -lm -lots"\ |
---|
206 | insure "-lXm -lXmu -lXt -lXext -lX11 -ldnet_stub -lm -lots"\ |
---|
207 | HP-UX "-L/usr/lib -lXm -L/usr/contrib/X11R6/lib -lXmu -lXt -lXext -lX11" \ |
---|
208 | SunOS "-L/usr/motif/usr/lib -lXm -lXt -lX11 -lm"\ |
---|
209 | LynxOS "-lXt -lX11 -lm"\ |
---|
210 | Linux "-L/usr/X11R6/lib -lXm -lXt -lXext -lX11 -lm"\ |
---|
211 | RIO806X "-lXm -lXt -lXext -lX11 -lm"\ |
---|
212 | VGPW2 "-lXm -lXt -lXext -lX11 -lm"\ |
---|
213 | m68k "-lXm -lXt -lXext -lX11 -lm"\ |
---|
214 | IRIX "/usr/lib/libXm.so /usr/lib/libXt.so /usr/lib/libX11.so -lm -lPW"\ |
---|
215 | AIX "/usr/lib/libXm.a /usr/lib/libXt.a /usr/lib/libX11.a -lm" \ |
---|
216 | VisualC "" |
---|
217 | |
---|
218 | # |
---|
219 | # Lex environment |
---|
220 | # |
---|
221 | |
---|
222 | macro lexflags "" |
---|
223 | macro lex "lex $(lexflags)" \ |
---|
224 | i686 "flex $(lexflags)" |
---|
225 | |
---|
226 | # |
---|
227 | # Yacc environment |
---|
228 | # |
---|
229 | |
---|
230 | macro yaccflags " -l -d " \ |
---|
231 | VisualC "" |
---|
232 | |
---|
233 | macro yacc "yacc $(yaccflags)" |
---|
234 | |
---|
235 | # |
---|
236 | # Archive environment |
---|
237 | # |
---|
238 | |
---|
239 | macro ar "ar -clr" \ |
---|
240 | SunOS "ar clr" \ |
---|
241 | VGPW2 "ar clr" \ |
---|
242 | m68k "ar clr" \ |
---|
243 | LynxOS "ar clr" \ |
---|
244 | RIO806X "ar clr" \ |
---|
245 | Linux "ar r" \ |
---|
246 | VisualC "lib.exe /nologo " |
---|
247 | |
---|
248 | macro ranlib "ranlib" \ |
---|
249 | SunOS "ar ts" \ |
---|
250 | VGPW2 "ar ts" \ |
---|
251 | m68k "ranlib" \ |
---|
252 | RIO806X "ranlib" \ |
---|
253 | LynxOS "ar ts" \ |
---|
254 | IRIX "ar ts" |
---|
255 | |
---|
256 | macro make_shlib "echo" \ |
---|
257 | HP-UX "${CMTROOT}/mgr/cmt_make_shlib_common.sh extract" \ |
---|
258 | OSF1 "${CMTROOT}/mgr/cmt_make_shlib_common.sh noextract" \ |
---|
259 | Linux "${CMTROOT}/mgr/cmt_make_shlib_common.sh extract" \ |
---|
260 | SunOS "${CMTROOT}/mgr/cmt_make_shlib_common.sh extract" \ |
---|
261 | VisualC "%CMTROOT%\mgr\cmt_make_shlib.bat" |
---|
262 | |
---|
263 | macro shlibsuffix "" \ |
---|
264 | HP-UX "sl" \ |
---|
265 | OSF1 "so" \ |
---|
266 | SunOS "so" \ |
---|
267 | Linux "so" |
---|
268 | |
---|
269 | macro shlibbuilder "" \ |
---|
270 | HP-UX "aCC" \ |
---|
271 | OSF1 "ld" \ |
---|
272 | SunOS "CC" \ |
---|
273 | Linux "g++" |
---|
274 | |
---|
275 | macro shlibflags "" \ |
---|
276 | HP-UX "-Wl,-a,shared -b +Z -q -Wl,+s -Wl,+vallcompatwarnings" \ |
---|
277 | OSF1 "-shared -expect_unresolved '*'" \ |
---|
278 | Linux "-shared" \ |
---|
279 | SunOS "-G" \ |
---|
280 | VisualC "" |
---|
281 | |
---|
282 | macro symlink "/bin/ln -fs " \ |
---|
283 | VisualC "" |
---|
284 | |
---|
285 | macro symunlink "/bin/rm -f " \ |
---|
286 | VisualC "" |
---|
287 | |
---|
288 | macro build_library_links "$(cmtexe) build library_links -quiet -tag=$(tags)" |
---|
289 | macro remove_library_links "$(cmtexe) remove library_links -quiet -tag=$(tags)" |
---|
290 | |
---|
291 | # |
---|
292 | # Prototype and dependency generation |
---|
293 | # |
---|
294 | |
---|
295 | macro cmtexe "${CMTROOT}/${CMTBIN}/cmt.exe" \ |
---|
296 | WIN32 "%CMTROOT%\%CMTBIN%\cmt.exe" |
---|
297 | |
---|
298 | macro tags "$(CMTCONFIG),$(CMTEXTRATAGS)" |
---|
299 | |
---|
300 | macro build_prototype "$(cmtexe) build prototype" |
---|
301 | macro build_dependencies "$(cmtexe) -quiet -tag=$(tags) build dependencies" |
---|
302 | macro build_triggers "$(cmtexe) build triggers" |
---|
303 | |
---|
304 | macro implied_library_prefix "-l" \ |
---|
305 | LynxOS "$(<PACKAGE>ROOT)/$(bin)/lib" |
---|
306 | |
---|
307 | # VisualC "$(<PACKAGE>ROOT)/$(bin)/" \ |
---|
308 | |
---|
309 | macro implied_library_suffix "" \ |
---|
310 | VisualC ".lib" \ |
---|
311 | LynxOS ".a" |
---|
312 | |
---|
313 | # |
---|
314 | # Generic environments |
---|
315 | # |
---|
316 | |
---|
317 | macro SHELL "/bin/sh" WIN32 "cmd" |
---|
318 | |
---|
319 | macro src "../src/" WIN32 "..\src\" |
---|
320 | macro doc "../doc/" WIN32 "..\doc\" |
---|
321 | macro inc "../src/" WIN32 "..\src\" |
---|
322 | macro mgr "../mgr/" WIN32 "..\mgr\" |
---|
323 | ##macro javabin "../classes/" |
---|
324 | |
---|
325 | macro application_suffix ".exe" |
---|
326 | macro library_prefix "lib" |
---|
327 | macro library_suffix "" |
---|
328 | |
---|
329 | macro lock_command "chmod -R a-w ../*" \ |
---|
330 | VisualC "attrib /S /D +R ..\*" |
---|
331 | |
---|
332 | macro unlock_command "chmod -R g+w ../*" \ |
---|
333 | VisualC "attrib /S /D -R ..\*" |
---|
334 | |
---|
335 | macro preprocessor_command "" \ |
---|
336 | VisualC "" |
---|
337 | |
---|
338 | macro_append MAKEFLAGS " --no-print-directory " |
---|
339 | |
---|
340 | #macro_prepend constituents " configclean " |
---|
341 | |
---|
342 | # |
---|
343 | # Remote definitions |
---|
344 | # |
---|
345 | |
---|
346 | macro gmake_hosts "lx1 rsplus lxtest as7 dxplus ax7 hp2 aleph hp1 hpplus papou1-fe atlas" |
---|
347 | |
---|
348 | macro make_hosts "virgo-control1 rio0a vmpc38a" |
---|
349 | |
---|
350 | macro everywhere "hosts" \ |
---|
351 | LAL "as7 lx1 virgo-control1 papou1-fe hp2 aleph hp1" \ |
---|
352 | LHCb "lxtest hpplus dxplus rsplus" \ |
---|
353 | Atlas "lxtest rsplus atlas dxplus" \ |
---|
354 | Cascina "ax7 vmpc38a rio0a" |
---|
355 | |
---|
356 | |
---|
357 | # |
---|
358 | # Fragments |
---|
359 | # |
---|
360 | |
---|
361 | make_fragment make_header |
---|
362 | make_fragment library_header |
---|
363 | make_fragment application_header |
---|
364 | make_fragment document_header |
---|
365 | make_fragment java_header |
---|
366 | make_fragment jar_header |
---|
367 | make_fragment protos_header |
---|
368 | make_fragment buildproto |
---|
369 | make_fragment library |
---|
370 | make_fragment library_no_share |
---|
371 | make_fragment application |
---|
372 | make_fragment jar |
---|
373 | make_fragment java |
---|
374 | make_fragment java_copy |
---|
375 | make_fragment cleanup_header |
---|
376 | make_fragment cleanup |
---|
377 | make_fragment cleanup_library |
---|
378 | make_fragment cleanup_application |
---|
379 | make_fragment cleanup_java |
---|
380 | make_fragment cleanup_objects |
---|
381 | |
---|
382 | make_fragment fortran |
---|
383 | make_fragment c |
---|
384 | make_fragment cpp |
---|
385 | make_fragment lex |
---|
386 | make_fragment yacc |
---|
387 | |
---|
388 | make_fragment fortran_library |
---|
389 | make_fragment c_library |
---|
390 | make_fragment cpp_library |
---|
391 | make_fragment lex_library |
---|
392 | make_fragment yacc_library |
---|
393 | |
---|
394 | make_fragment dsw_header |
---|
395 | make_fragment dsw_project |
---|
396 | make_fragment dsw_trailer |
---|
397 | make_fragment dsw_all_project_header |
---|
398 | make_fragment dsw_all_project_dependency |
---|
399 | make_fragment dsw_all_project_trailer |
---|
400 | |
---|
401 | make_fragment dsp_library_header |
---|
402 | make_fragment dsp_shared_library_header |
---|
403 | make_fragment dsp_application_header |
---|
404 | make_fragment dsp_windows_header |
---|
405 | make_fragment dsp_contents |
---|
406 | make_fragment dsp_trailer |
---|
407 | make_fragment dsp_all |
---|
408 | |
---|
409 | make_fragment make_setup |
---|
410 | make_fragment make_setup_header |
---|
411 | |
---|
412 | make_fragment constituents_header |
---|
413 | make_fragment group |
---|
414 | make_fragment constituent |
---|
415 | make_fragment constituents_trailer |
---|
416 | |
---|
417 | make_fragment dependencies |
---|
418 | make_fragment dependencies_and_triggers |
---|
419 | |
---|
420 | make_fragment readme_header |
---|
421 | make_fragment readme |
---|
422 | make_fragment readme_doc |
---|
423 | make_fragment readme_use |
---|
424 | make_fragment readme_trailer |
---|
425 | |
---|
426 | make_fragment tex -header=tex_header -suffix=ps |
---|
427 | |
---|
428 | make_fragment check_application |
---|
429 | make_fragment check_java |
---|
430 | make_fragment check_application_header |
---|
431 | |
---|
432 | make_fragment application_launcher -header=application_launcher_header |
---|
433 | |
---|
434 | |
---|
435 | |
---|
436 | macro install_command "cp " \ |
---|
437 | VisualC "copy /Y " |
---|
438 | |
---|
439 | macro uninstall_command "/bin/rm -f " \ |
---|
440 | VisualC "del " |
---|
441 | |
---|
442 | macro mkdir "mkdir" \ |
---|
443 | LynxOS "mkdir -f" |
---|
444 | |
---|
445 | #----------------------------------------------------------------- |
---|
446 | # Generic copy facility |
---|
447 | # It is customized through the parameter: |
---|
448 | # install_dir="<path where to install the sources>" |
---|
449 | # |
---|
450 | make_fragment installer -header=installer_header |
---|
451 | |
---|
452 | |
---|
453 | #----------------------------------------------------------------- |
---|
454 | # Generic usage of the cmt expand model facility |
---|
455 | # the fragment is customized through the following parameters: |
---|
456 | # model="<model text string>" |
---|
457 | # out="<output file name>" |
---|
458 | # |
---|
459 | make_fragment generator -header=generator_header |
---|
460 | |
---|
461 | |
---|
462 | # |
---|
463 | # The supported languages |
---|
464 | # |
---|
465 | |
---|
466 | language fortran -suffix=f -suffix=F -preprocessor_command=$(ppcmd) -linker=$(flink) |
---|
467 | language c -suffix=c -prototypes -linker=$(clink) |
---|
468 | language c++ -suffix=C -suffix=cc -suffix=cxx -suffix=cpp -fragment=cpp -linker=$(cpplink) |
---|
469 | language java -suffix=java -linker=java |
---|
470 | language yacc -suffix=y -prototypes -linker=$(clink) |
---|
471 | language lex -suffix=l -prototypes -linker=$(clink) |
---|
472 | |
---|
473 | # |
---|
474 | # The cmt constituent |
---|
475 | # |
---|
476 | |
---|
477 | application cmt cmt.cxx \ |
---|
478 | cmt_awk.cxx \ |
---|
479 | cmt_branch.cxx \ |
---|
480 | cmt_constituent.cxx \ |
---|
481 | cmt_deps_builder.cxx \ |
---|
482 | cmt_fragment.cxx \ |
---|
483 | cmt_generator.cxx \ |
---|
484 | cmt_include.cxx \ |
---|
485 | cmt_parser.cxx \ |
---|
486 | cmt_script.cxx \ |
---|
487 | cmt_string.cxx \ |
---|
488 | cmt_system.cxx \ |
---|
489 | cmt_tag.cxx \ |
---|
490 | cmt_use.cxx \ |
---|
491 | cmt_symbol.cxx \ |
---|
492 | cmt_error.cxx \ |
---|
493 | cmt_pattern.cxx \ |
---|
494 | cmt_language.cxx \ |
---|
495 | cmt_cvs.cxx \ |
---|
496 | cmt_group.cxx \ |
---|
497 | cmt_database.cxx \ |
---|
498 | cmt_lock.cxx \ |
---|
499 | cmt_triggers.cxx \ |
---|
500 | cmt_regexp.cxx \ |
---|
501 | cmt_model.cxx |
---|
502 | |
---|
503 | private |
---|
504 | |
---|
505 | macro all_constituents cmt |
---|
506 | |
---|
507 | macro_append cpplink "" VisualC " advapi32.lib " |
---|
508 | |
---|
509 | |
---|