]> git.sesse.net Git - rdpsrv/blob - Xserver/config/cf/Motif.rules
Import X server from vnc-3.3.7.
[rdpsrv] / Xserver / config / cf / Motif.rules
1 /* 
2  *  @OSF_COPYRIGHT@
3  *  COPYRIGHT NOTICE
4  *  Copyright (c) 1990, 1991, 1992, 1993 Open Software Foundation, Inc.
5  *  ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for
6  *  the full copyright text.
7  *
8  * (c) Copyright 1996 Digital Equipment Corporation.
9  * (c) Copyright 1996 Hewlett-Packard Company.
10  * (c) Copyright 1996 International Business Machines Corp.
11  * (c) Copyright 1996 Sun Microsystems, Inc.
12  * (c) Copyright 1996 Novell, Inc. 
13  * (c) Copyright 1996 FUJITSU LIMITED.
14  * (c) Copyright 1996 Hitachi.
15  */ 
16 XCOMM $TOG: Motif.rules /main/3 1997/03/24 09:10:35 mgreess $
17
18 /* Note whether we are the top level project. */
19 #ifndef SeenTopLevelProject
20 # define SeenTopLevelProject    YES
21 # define MotifIsTopLevelProject YES
22 #else
23 # define MotifIsTopLevelProject NO
24 #endif
25
26 /* Include the X11 project rules file. */
27 #include <X11.rules>
28
29
30 /* Use the in-tree Motif by default. */
31 #ifndef UseInstalledMotif
32 # define UseInstalledMotif      NO
33 #endif
34 #ifdef UseInstalled
35 # undef UseInstalledMotif
36 # define UseInstalledMotif      YES
37 #endif
38
39 #ifndef ImportMotif
40 # ifdef UseImports
41 #  define ImportMotif           YES
42 # else
43 #  define ImportMotif           NO
44 # endif
45 #endif
46 #if UseInstalledMotif
47 # undef ImportMotif
48 # define ImportMotif            NO
49 #endif
50
51 #ifndef MSimpleProgramTarget
52 #define MSimpleProgramTarget(program)                                   @@\
53 AllTarget(program)                                                      @@\
54                                                                         @@\
55 program: program.o $(DEPS) $(DEPLIBS)                                   @@\
56         RemoveTargetProgram($@)                                         @@\
57         $(CC) -o $@ program.o $(LDOPTIONS) $(DEPS) $(LOCAL_LIBRARIES) $(LDLIBS) $(EXTRA_LOAD_FLAGS)  @@\
58                                                                         @@\
59 clean::                                                                 @@\
60         $(RM) program
61 #endif
62
63 #ifndef MSimpleUilTarget
64 #define MSimpleUilTarget(program)                                       @@\
65 MSimpleProgramTarget(program)                                           @@\
66                                                                         @@\
67 InstallProgram(program,$(BINDIR))                                       @@\
68                                                                         @@\
69 MSimpleUidTarget(program)
70 #endif
71
72 /*
73  * UILFLAGS contains site/vendor-specific flags
74  * defined by UilFlags, which supposed to be set in *.cf or
75  * site.def files.
76  * LOCAL_UILFLAGS(_n) contains client-specific uil flags set in Imakefile
77  */
78
79 #ifndef MSimpleUidTarget
80 #define MSimpleUidTarget(program)                                       @@\
81 AllTarget(program.uid)                                                  @@\
82                                                                         @@\
83 program.uid: program.uil $(DEPUIL)                                      @@\
84         RemoveTargetProgram($@)                                         @@\
85         $(CLIENTENVSETUP) $(UIL) $(UILFLAGS) $(LOCAL_UILFLAGS) -o $@ program.uil $(UIL_INCLUDES)        @@\
86                                                                         @@\
87 InstallNonExecFile(program.uid,$(UIDDIR))                               @@\
88                                                                         @@\
89 clean::                                                                 @@\
90         $(RM) program.uid
91 #endif
92
93 #ifndef MSimpleUidLocaleTarget
94 #define MSimpleUidLocaleTarget(program,locale)                          @@\
95 AllTarget(program.uid)                                                  @@\
96                                                                         @@\
97 program.uid: program.uil $(DEPUIL)                                      @@\
98         RemoveTargetProgram($@)                                         @@\
99         $(CLIENTENVSETUP) $(UIL) $(UILFLAGS) $(LOCAL_UILFLAGS) -o $@ program.uil $(UIL_INCLUDES)        @@\
100                                                                         @@\
101 InstallNonExecFile(program.uid,$(LIBDIR)/locale/uid)                    @@\
102                                                                         @@\
103 clean::                                                                 @@\
104         $(RM) program.uid
105 #endif
106
107 #ifndef MComplexUidTarget_1
108 #define MComplexUidTarget_1(program)                                    @@\
109                                                                         @@\
110 AllTarget(program.uid)                                                  @@\
111                                                                         @@\
112 program.uid:  $(UILS1) $(DEPUIL)                                        @@\
113         RemoveTargetProgram($@)                                         @@\
114         $(CLIENTENVSETUP) $(UIL) $(UILFLAGS) $(LOCAL_UILFLAGS_1) -o $@ program.uil $(UIL_INCLUDES)      @@\
115                                                                         @@\
116 InstallNonExecFile(program.uid,$(UIDDIR))                               @@\
117                                                                         @@\
118 clean::                                                                 @@\
119         $(RM) program.uid
120 #endif
121
122 #ifndef MComplexUidTarget_2
123 #define MComplexUidTarget_2(program)                                    @@\
124                                                                         @@\
125 AllTarget(program.uid)                                                  @@\
126                                                                         @@\
127 program.uid:  $(UILS2) $(DEPUIL)                                        @@\
128         RemoveTargetProgram($@)                                         @@\
129         $(CLIENTENVSETUP) $(UIL) $(UILFLAGS) $(LOCAL_UILFLAGS_2) -o $@ program.uil $(UIL_INCLUDES)      @@\
130                                                                         @@\
131 InstallNonExecFile(program.uid,$(UIDDIR))                               @@\
132                                                                         @@\
133 clean::                                                                 @@\
134         $(RM) program.uid
135 #endif
136
137 #ifndef MComplexUidTarget_3
138 #define MComplexUidTarget_3(program)                                    @@\
139                                                                         @@\
140 AllTarget(program.uid)                                                  @@\
141                                                                         @@\
142 program.uid:  $(UILS3) $(DEPUIL)                                        @@\
143         RemoveTargetProgram($@)                                         @@\
144         $(CLIENTENVSETUP) $(UIL) $(UILFLAGS) $(LOCAL_UILFLAGS_3) -o $@ program.uil $(UIL_INCLUDES)      @@\
145                                                                         @@\
146 InstallNonExecFile(program.uid,$(UIDDIR))                               @@\
147                                                                         @@\
148 clean::                                                                 @@\
149         $(RM) program.uid
150 #endif
151
152 #ifndef MComplexUidTarget_4
153 #define MComplexUidTarget_4(program)                                    @@\
154                                                                         @@\
155 AllTarget(program.uid)                                                  @@\
156                                                                         @@\
157 program.uid:  $(UILS4) $(DEPUIL)                                        @@\
158         RemoveTargetProgram($@)                                         @@\
159         $(CLIENTENVSETUP) $(UIL) $(UILFLAGS) $(LOCAL_UILFLAGS_4) -o $@ program.uil $(UIL_INCLUDES)      @@\
160                                                                         @@\
161 InstallNonExecFile(program.uid,$(UIDDIR))                               @@\
162                                                                         @@\
163 clean::                                                                 @@\
164         $(RM) program.uid
165 #endif
166
167 #ifndef MComplexUidTarget_5
168 #define MComplexUidTarget_5(program)                                    @@\
169                                                                         @@\
170 AllTarget(program.uid)                                                  @@\
171                                                                         @@\
172 program.uid:  $(UILS5) $(DEPUIL)                                        @@\
173         RemoveTargetProgram($@)                                         @@\
174         $(CLIENTENVSETUP) $(UIL) $(UILFLAGS) $(LOCAL_UILFLAGS_5) -o $@ program.uil $(UIL_INCLUDES)      @@\
175                                                                         @@\
176 InstallNonExecFile(program.uid,$(UIDDIR))                               @@\
177                                                                         @@\
178 clean::                                                                 @@\
179         $(RM) program.uid
180 #endif
181
182 #ifndef MComplexUidTarget_6
183 #define MComplexUidTarget_6(program)                                    @@\
184                                                                         @@\
185 AllTarget(program.uid)                                                  @@\
186                                                                         @@\
187 program.uid:  $(UILS6) $(DEPUIL)                                        @@\
188         RemoveTargetProgram($@)                                         @@\
189         $(CLIENTENVSETUP) $(UIL) $(UILFLAGS) $(LOCAL_UILFLAGS_6) -o $@ program.uil $(UIL_INCLUDES)      @@\
190                                                                         @@\
191 InstallNonExecFile(program.uid,$(UIDDIR))                               @@\
192                                                                         @@\
193 clean::                                                                 @@\
194         $(RM) program.uid
195 #endif
196
197 #ifndef MComplexUidTarget_7
198 #define MComplexUidTarget_7(program)                                    @@\
199                                                                         @@\
200 AllTarget(program.uid)                                                  @@\
201                                                                         @@\
202 program.uid:  $(UILS7) $(DEPUIL)                                        @@\
203         RemoveTargetProgram($@)                                         @@\
204         $(CLIENTENVSETUP) $(UIL) $(UILFLAGS) $(LOCAL_UILFLAGS_7) -o $@ program.uil $(UIL_INCLUDES)      @@\
205                                                                         @@\
206 InstallNonExecFile(program.uid,$(UIDDIR))                               @@\
207                                                                         @@\
208 clean::                                                                 @@\
209         $(RM) program.uid
210 #endif
211
212 #ifndef MComplexUidTarget_8
213 #define MComplexUidTarget_8(program)                                    @@\
214                                                                         @@\
215 AllTarget(program.uid)                                                  @@\
216                                                                         @@\
217 program.uid:  $(UILS8) $(DEPUIL)                                        @@\
218         RemoveTargetProgram($@)                                         @@\
219         $(CLIENTENVSETUP) $(UIL) $(UILFLAGS) $(LOCAL_UILFLAGS_8) -o $@ program.uil $(UIL_INCLUDES)      @@\
220                                                                         @@\
221 InstallNonExecFile(program.uid,$(UIDDIR))                               @@\
222                                                                         @@\
223 clean::                                                                 @@\
224         $(RM) program.uid
225 #endif
226
227 #ifndef MComplexUidTarget_9
228 #define MComplexUidTarget_9(program)                                    @@\
229                                                                         @@\
230 AllTarget(program.uid)                                                  @@\
231                                                                         @@\
232 program.uid:  $(UILS9) $(DEPUIL)                                        @@\
233         RemoveTargetProgram($@)                                         @@\
234         $(CLIENTENVSETUP) $(UIL) $(UILFLAGS) $(LOCAL_UILFLAGS_9) -o $@ program.uil $(UIL_INCLUDES)      @@\
235                                                                         @@\
236 InstallNonExecFile(program.uid,$(UIDDIR))                               @@\
237                                                                         @@\
238 clean::                                                                 @@\
239         $(RM) program.uid
240 #endif
241
242 #ifndef MComplexUidTarget_10
243 #define MComplexUidTarget_10(program)                                   @@\
244                                                                         @@\
245 AllTarget(program.uid)                                                  @@\
246                                                                         @@\
247 program.uid:  $(UILS10) $(DEPUIL)                                       @@\
248         RemoveTargetProgram($@)                                         @@\
249         $(CLIENTENVSETUP) $(UIL) $(UILFLAGS) $(LOCAL_UILFLAGS_10) -o $@ program.uil $(UIL_INCLUDES)     @@\
250                                                                         @@\
251 InstallNonExecFile(program.uid,$(UIDDIR))                               @@\
252                                                                         @@\
253 clean::                                                                 @@\
254         $(RM) program.uid
255 #endif
256
257 #ifndef MComplexProgramTarget
258 #define MComplexProgramTarget(program,locallib,syslib)                  @@\
259         PROGRAM = program                                               @@\
260                                                                         @@\
261 AllTarget(program)                                                      @@\
262                                                                         @@\
263 program: $(OBJS) $(DEPLIBS)                                             @@\
264         RemoveTargetProgram($@)                                         @@\
265         $(CC) -o $@ $(LDOPTIONS) $(OBJS) locallib $(LDLIBS) syslib $(EXTRA_LOAD_FLAGS)  @@\
266                                                                         @@\
267 CenterProgramTarget(program,$(SRCS),$(OBJS),locallib,syslib)            @@\
268                                                                         @@\
269 InstallProgram(program,$(BINDIR))                                       @@\
270                                                                         @@\
271 install.man::                                                           @@\
272         @echo To install documentation for $(PROGRAM), consult the Release Notes        @@\
273         @echo and/or README file in the current directory.              @@\
274 DependTarget()                                                          @@\
275 LintTarget()                                                            @@\
276                                                                         @@\
277 clean::                                                                 @@\
278         $(RM) $(PROGRAM)
279 #endif
280
281 #ifndef MComplexProgramTarget_1
282 #define MComplexProgramTarget_1(program,locallib,syslib)                @@\
283             OBJS = $(OBJS1) $(OBJS2) $(OBJS3)                           @@\
284             SRCS = $(SRCS1) $(SRCS2) $(SRCS3)                           @@\
285                                                                         @@\
286 AllTarget($(PROGRAMS))                                                  @@\
287                                                                         @@\
288 program: $(OBJS1) $(DEPLIBS1)                                           @@\
289         RemoveTargetProgram($@)                                         @@\
290         $(CC) -o $@ $(LDOPTIONS) $(OBJS1) locallib $(LDLIBS) syslib $(EXTRA_LOAD_FLAGS) @@\
291                                                                         @@\
292 CenterProgramTarget(program,$(SRCS1),$(OBJS1),locallib,syslib)          @@\
293                                                                         @@\
294 InstallProgram(program,$(BINDIR))                                       @@\
295                                                                         @@\
296 install.man::                                                           @@\
297         @echo To install documentation for $(PROGRAMS), consult the Release Notes       @@\
298         @echo and/or README file in the current directory.              @@\
299 DependTarget()                                                          @@\
300 LintTarget()                                                            @@\
301                                                                         @@\
302 clean::                                                                 @@\
303         $(RM) $(PROGRAMS)
304 #endif
305
306 #ifndef MComplexProgramTarget_2
307 #define MComplexProgramTarget_2(program,locallib,syslib)                @@\
308 program: $(OBJS2) $(DEPLIBS2)                                           @@\
309         RemoveTargetProgram($@)                                         @@\
310         $(CC) -o $@ $(LDOPTIONS) $(OBJS2) locallib $(LDLIBS) syslib $(EXTRA_LOAD_FLAGS) @@\
311                                                                         @@\
312 CenterProgramTarget(program,$(SRCS2),$(OBJS2),locallib,syslib)          @@\
313                                                                         @@\
314 InstallProgram(program,$(BINDIR))
315 #endif
316
317 #ifndef MComplexProgramTarget_3
318 #define MComplexProgramTarget_3(program,locallib,syslib)                @@\
319         PROGRAM_3 = program                                     @@\
320 program: $(OBJS3) $(DEPLIBS3)                                           @@\
321         RemoveTargetProgram($@)                                         @@\
322         $(CC) -o $@ $(LDOPTIONS) $(OBJS3) locallib $(LDLIBS) syslib $(EXTRA_LOAD_FLAGS) @@\
323                                                                         @@\
324 CenterProgramTarget(program,$(SRCS3),$(OBJS3),locallib,syslib)          @@\
325                                                                         @@\
326 InstallProgram(program,$(BINDIR))
327 #endif
328
329 #ifndef MComplexProgramTarget_4
330 #define MComplexProgramTarget_4(program,locallib,syslib)                @@\
331         PROGRAM_4 = program                                     @@\
332 program: $(OBJS4) $(DEPLIBS4)                                           @@\
333         RemoveTargetProgram($@)                                         @@\
334         $(CC) -o $@ $(LDOPTIONS) $(OBJS4) locallib $(LDLIBS) syslib $(EXTRA_LOAD_FLAGS) @@\
335                                                                         @@\
336 CenterProgramTarget(program,$(SRCS4),$(OBJS4),locallib,syslib)          @@\
337                                                                         @@\
338 InstallProgram(program,$(BINDIR))
339 #endif
340
341 #ifndef MComplexProgramTarget_5
342 #define MComplexProgramTarget_5(program,locallib,syslib)                @@\
343         PROGRAM_5 = program                                     @@\
344 program: $(OBJS5) $(DEPLIBS5)                                           @@\
345         RemoveTargetProgram($@)                                         @@\
346         $(CC) -o $@ $(LDOPTIONS) $(OBJS5) locallib $(LDLIBS) syslib $(EXTRA_LOAD_FLAGS) @@\
347                                                                         @@\
348 CenterProgramTarget(program,$(SRCS5),$(OBJS5),locallib,syslib)          @@\
349                                                                         @@\
350 InstallProgram(program,$(BINDIR))
351 #endif
352
353 #ifndef MComplexProgramTarget_6
354 #define MComplexProgramTarget_6(program,locallib,syslib)                @@\
355         PROGRAM_6 = program                                     @@\
356 program: $(OBJS6) $(DEPLIBS6)                                           @@\
357         RemoveTargetProgram($@)                                         @@\
358         $(CC) -o $@ $(LDOPTIONS) $(OBJS6) locallib $(LDLIBS) syslib $(EXTRA_LOAD_FLAGS) @@\
359                                                                         @@\
360 CenterProgramTarget(program,$(SRCS6),$(OBJS6),locallib,syslib)          @@\
361                                                                         @@\
362 InstallProgram(program,$(BINDIR))
363 #endif
364
365 #ifndef MComplexProgramTarget_7
366 #define MComplexProgramTarget_7(program,locallib,syslib)                @@\
367         PROGRAM_7 = program                                     @@\
368 program: $(OBJS7) $(DEPLIBS7)                                           @@\
369         RemoveTargetProgram($@)                                         @@\
370         $(CC) -o $@ $(LDOPTIONS) $(OBJS7) locallib $(LDLIBS) syslib $(EXTRA_LOAD_FLAGS) @@\
371                                                                         @@\
372 CenterProgramTarget(program,$(SRCS7),$(OBJS7),locallib,syslib)          @@\
373                                                                         @@\
374 InstallProgram(program,$(BINDIR))
375 #endif
376
377 #ifndef MComplexProgramTarget_8
378 #define MComplexProgramTarget_8(program,locallib,syslib)                @@\
379         PROGRAM_8 = program                                     @@\
380 program: $(OBJS8) $(DEPLIBS8)                                           @@\
381         RemoveTargetProgram($@)                                         @@\
382         $(CC) -o $@ $(LDOPTIONS) $(OBJS8) locallib $(LDLIBS) syslib $(EXTRA_LOAD_FLAGS) @@\
383                                                                         @@\
384 CenterProgramTarget(program,$(SRCS8),$(OBJS8),locallib,syslib)          @@\
385                                                                         @@\
386 InstallProgram(program,$(BINDIR))
387 #endif
388
389 #ifndef MComplexProgramTarget_9
390 #define MComplexProgramTarget_9(program,locallib,syslib)                @@\
391         PROGRAM_9 = program                                     @@\
392 program: $(OBJS9) $(DEPLIBS9)                                           @@\
393         RemoveTargetProgram($@)                                         @@\
394         $(CC) -o $@ $(LDOPTIONS) $(OBJS9) locallib $(LDLIBS) syslib $(EXTRA_LOAD_FLAGS) @@\
395                                                                         @@\
396 CenterProgramTarget(program,$(SRCS9),$(OBJS9),locallib,syslib)          @@\
397                                                                         @@\
398 InstallProgram(program,$(BINDIR))
399 #endif
400
401 #ifdef AUTOMATION
402 #ifndef TestPPTarget
403 #define TestPPTarget(root)                                              @@\
404 all:: root.Scr root.Dat                                                 @@\
405                                                                         @@\
406 root.Dat: root.dat                                                      @@\
407         $(RM) root.Dat                                                  @@\
408         $(COMMONPP) $(DEFINES) root.dat                                 @@\
409 root.Scr: root.scr                                                      @@\
410         $(RM) root.Scr                                                  @@\
411         $(COMMONPP) $(DEFINES) root.scr
412 #endif 
413 #else
414 #ifndef TestPPTarget
415 #define TestPPTarget(root)                                              @@\
416 all:: root.Dat                                                          @@\
417                                                                         @@\
418 root.Dat: root.dat                                                      @@\
419         $(RM) root.Dat                                                  @@\
420         $(COMMONPP) $(DEFINES) root.dat
421 #endif
422 #endif
423
424 #ifdef AUTOMATION
425 #ifndef TestPPTargetScr
426 #define TestPPTargetScr(root)                                           @@\
427 all:: root.Scr                                                          @@\
428                                                                         @@\
429 root.Scr: root.scr                                                      @@\
430         $(RM) root.Scr                                                  @@\
431         $(COMMONPP) $(DEFINES) root.scr
432 #endif
433 #else
434 #ifndef TestPPTargetScr
435 #define TestPPTargetScr(root)  /**/
436 #endif
437 #endif
438
439 #ifdef AUTOMATION
440 #ifndef TestPPTargetDat
441 #define TestPPTargetDat(root)                                              @@\
442 all:: root.Dat                                                          @@\
443                                                                         @@\
444 root.Dat: root.dat                                                      @@\
445         $(RM) root.Dat                                                  @@\
446         $(COMMONPP) $(DEFINES) root.dat
447 #endif
448 #endif
449 #ifndef AUTOMATION
450 #ifndef TestPPTargetDat
451 #define TestPPTargetDat(root)                                              @@\
452 all:: root.Dat                                                          @@\
453                                                                         @@\
454 root.Dat: root.dat                                                      @@\
455         $(RM) root.Dat                                                  @@\
456         $(COMMONPP) $(DEFINES) root.dat
457 #endif
458 #endif
459
460
461 #ifndef NO_AUTOMATION
462 #ifndef RunTarget
463 #define RunTarget()                                                     @@\
464 all::   RUN                                                             @@\
465                                                                         @@\
466 RUN:    always                                                          @@\
467         $(GENRUN) $(CURRENT_DIR) $(MTOP) $(DEFINES)                     @@\
468                                                                         @@\
469 always:                                                                 @@\
470         $(RM) RUN
471 #endif
472 #else
473 #ifdef UseVista
474 #ifndef RunTarget
475 #define RunTarget()                                                     @@\
476 all::   RUN                                                             @@\
477                                                                         @@\
478 RUN:    always                                                          @@\
479         $(MANRUN) $(CURRENT_DIR) $(MTOP) $(DEFINES)                     @@\
480                                                                         @@\
481 always:                                                                 @@\
482         $(RM) RUN
483 #endif
484 #else
485 #ifdef UsePurify
486 #ifndef RunTarget
487 #define RunTarget()                                                     @@\
488 all::   RUN                                                             @@\
489                                                                         @@\
490 RUN:    always                                                          @@\
491         $(MANRUN) $(CURRENT_DIR) $(MTOP) $(DEFINES)                     @@\
492                                                                         @@\
493 always:                                                                 @@\
494         $(RM) RUN
495 #endif
496 #else
497 #ifndef RunTarget
498 #define RunTarget()                                                     @@\
499 all::   RUN                                                             @@\
500                                                                         @@\
501 RUN:    always                                                          @@\
502                                                                         @@\
503 always:                                                                 @@\
504
505 #endif
506 #endif
507 #endif
508 #endif
509 #ifdef UseVista
510 #ifndef VistaMapRule
511 #define VistaMapRule(targetmap,depend)                                  @@\
512 all:: targetmap                                                         @@\
513                                                                         @@\
514 targetmap: depend                                                       @@\
515         $(RM) $(MTOP)/tests/Vista/targetmap                             @@\
516         CATCMD *.M > $(MTOP)/tests/Vista/targetmap
517 #endif
518 #ifndef ComplexVistaMapRule
519 #define ComplexVistaMapRule(program,filelist)                           @@\
520 all::   program.M                                                       @@\
521                                                                         @@\
522 program.M: filelist                                                     @@\
523         $(RM) program.vista.tmpfile                                     @@\
524         touch program.vista.tmpfile                                     @@\
525         @case '${MFLAGS}' in *[ik]*) set +e;; esac;                     @@\
526         @for i in filelist; do \                                        @@\
527                 cat `basename $$i .o`.M >> program.vista.tmpfile ; done @@\
528         $(RM) program.M                                                 @@\
529         $(MV) program.vista.tmpfile program.M                           @@\
530                                                                         @@\
531 clean::                                                                 @@\
532         $(RM) *.M
533 #endif
534
535 #endif
536
537 /*  Rule for making shadow trees.       */
538 #ifndef MakeShadowTree
539 #define MakeShadowTree(name,dirs)                       @@\
540 all::                                                   @@\
541         @case '${MFLAGS}' in *[ik]*) set +e;; esac;     @@\
542         MakeDir(name)                                   @@\
543         @for i in dirs; \                               @@\
544         do if [ -d $$i/name ]; then \                   @@\
545         exit 0; else set -x; mkdir $$i/name; fi \       @@\
546         done                                            @@\
547         @for i in dirs; \                               @@\
548         do if [ -r name/$$i ]; then \                   @@\
549                 set +x; \                               @@\
550                 else (set -x; $(LN) ../$$i/name  name/$$i); fi \@@\
551         done
552 #endif
553
554 #ifdef BuildPlusPlus
555
556 /* Rules for C++ */
557
558 /*
559  * "CPlusPlusObjectCompile" - compile fragment for a normal C++ object file
560 */
561 #ifndef CPlusPlusObjectCompile
562 #define CPlusPlusObjectCompile(options) $(RM) $@                       @@\
563         $(CPLUSPLUSCOM) -c $(CPLUSPLUSFLAGS) options $*.cxx
564 #endif
565
566 #ifndef CPlusPlusObjectRule
567 #define CPlusPlusObjectRule()                                           @@\
568 .cxx.o:                                                                 @@\
569         CPlusPlusObjectCompile($(_NOOP_))
570 #endif /* CPlusPlusObjectRule */
571
572 #ifndef MCPlusPlusSimpleProgramTarget
573 #define MCPlusPlusSimpleProgramTarget(program)                          @@\
574 AllTarget(program)                                                      @@\
575                                                                         @@\
576 program: program.o $(DEPS) $(DEPLIBS)                                   @@\
577         RemoveTargetProgram($@)                                         @@\
578         $(CPLUSPLUSLINKCOM) -o $@ program.o $(LDOPTIONS) $(DEPS) $(LOCAL_LIBRARIES) $(CPLUSPLUSLIBS) $(LDLIBS) $(EXTRA_LOAD_FLAGS)  @@\
579                                                                         @@\
580 clean::                                                                 @@\
581         $(RM) program
582 #endif
583
584 #ifndef MCPlusPlusComplexProgramTarget
585 #define MCPlusPlusComplexProgramTarget(program,locallib,syslib)         @@\
586         PROGRAM = program                                               @@\
587                                                                         @@\
588 AllTarget(program)                                                      @@\
589                                                                         @@\
590 program: $(OBJS) $(DEPLIBS)                                             @@\
591         RemoveTargetProgram($@)                                         @@\
592         $(CPLUSPLUSLINKCOM) -o $@ $(LDOPTIONS) $(OBJS) locallib $(CPLUSPLUSLIBS) $(LDLIBS) syslib $(EXTRA_LOAD_FLAGS)   @@\
593                                                                         @@\
594 CenterProgramTarget(program,$(SRCS),$(OBJS),locallib,syslib)            @@\
595                                                                         @@\
596 InstallProgram(program,$(BINDIR))                                       @@\
597                                                                         @@\
598 install.man::                                                           @@\
599         @echo To install documentation for $(PROGRAM), consult the Release Notes        @@\
600         @echo and/or README file in the current directory.              @@\
601 DependTarget()                                                          @@\
602 LintTarget()                                                            @@\
603                                                                         @@\
604 clean::                                                                 @@\
605         $(RM) $(PROGRAM)
606 #endif
607
608 #endif /* BuildPlusPlus */
609
610 /* Rules for message catalog building */
611 #ifndef Real_MessageCatalogRule
612 #define Real_MessageCatalogRule(prefix)                                 @@\
613 prefix.cat Concat(prefix,MsgCatI.h):                                    @@\
614         $(RM) Concat(prefix,MsgCatI.h) prefix.cat $(MLOCSRC)/C/msg/prefix.msg   @@\
615         $(MKCATTOOL) Concat(prefix,MsgCatI.h) prefix.msg > $(MLOCSRC)/C/msg/prefix.msg  @@\
616         $(GENCAT) prefix.cat $(MLOCSRC)/C/msg/prefix.msg                @@\
617                                                                         @@\
618 includes:: prefix.cat Concat(prefix,MsgCatI.h)                          @@\
619                                                                         @@\
620 depend:: prefix.cat Concat(prefix,MsgCatI.h)                            @@\
621                                                                         @@\
622 all:: prefix.cat                                                        @@\
623                                                                         @@\
624 clean::                                                                 @@\
625         $(RM) prefix.cat Concat(prefix,MsgCatI.h)
626 #endif
627 #define Stub_MessageCatalogRule(prefix) /**/
628
629
630 /* The X BuildLibDir is now an import, not an export. */
631 #if UseImports || ImportX11
632 # ifndef XBuildLibDir
633 #  define XBuildLibDir $(TOP)/imports/x11/lib
634 # endif
635 #endif
636
637
638 /* Search the Motif ProjectRoot too if it is different. */
639 #ifdef MotifProjectRoot
640 # define MUsrLibDirPath Concat(XUsrLibDirPath,:$(MPROJECTROOT)/lib)
641 #else
642 # define MUsrLibDirPath XUsrLibDirPath
643 #endif
644 #ifdef UsrLibDirPath
645 # undef UsrLibDirPath
646 #endif
647 #define UsrLibDirPath   MUsrLibDirPath
648
649 #if ImportMotif
650 # define MLdPreLibs     -L$(MLIBSRC)
651 #elif defined(UseInstalledMotif) && defined(MotifProjectRoot)
652 # define MLdPreLibs     -L$(MPROJECTROOT)/lib
653 #else
654 # define MLdPreLibs     /**/
655 #endif
656 #ifdef LdPreLibs
657 # undef LdPreLibs
658 #endif
659 #define LdPreLibs       LdPreLib MLdPreLibs XLdPreLibs
660
661 #ifdef LdPostLibs
662 # undef LdPostLibs
663 #endif
664 #ifdef MotifProjectRoot
665 # define MLdPostLibs    -L$(MPROJECTROOT)/lib
666 #else
667 # define MLdPostLibs    /**/
668 #endif
669 #define LdPostLibs      LdPostLib MLdPostLibs XLdPostLibs
670
671 #ifdef TopIncludes
672 # undef TopIncludes
673 #endif
674 #define TopIncludes     TopInclude $(TOP_MOTIF_INCLUDES) $(TOP_X_INCLUDES)
675
676 #if UseInstalledMotif && defined(MotifProjectRoot)
677 # define MotifBuildLibPath      $(MPROJECTROOT)/lib
678 #elif UseInstalledMotif
679 # define MotifBuildLibPath      $(USRLIBDIR)
680 #elif ImportMotif
681 # define MotifBuildLibPath      $(MLIBSRC)
682 #else
683 # define MotifBuildLibPath      $(TOP)/exports/lib
684 #endif
685 #ifdef BuildLibPath
686 # undef BuildLibPath
687 #endif
688 #ifdef SystemBuildLibPath
689 # define BuildLibPath   $(MOTIFENVLIBDIR):$(XENVLIBDIR):$(SYSTEMENVLIBDIR)
690 #else
691 # define BuildLibPath   $(MOTIFENVLIBDIR):$(XENVLIBDIR)
692 #endif
693
694 #ifndef MotifProjectDefines
695 # define MotifProjectDefines    MotifDefines MessageCatalogDefines
696 #endif
697 #ifdef ProjectDefines
698 # undef ProjectDefines
699 #endif
700 #define ProjectDefines  X11ProjectDefines MotifProjectDefines
701
702 #ifndef MotifCplusplusProjectDefines
703 # define MotifCplusplusProjectDefines   MotifProjectDefines
704 #endif
705 #ifdef CplusplusProjectDefines
706 # undef CplusplusProjectDefines
707 #endif
708 #define CplusplusProjectDefines \
709         X11CplusplusProjectDefines MotifCplusplusProjectDefines