home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 March / PCWELT_3_2006.ISO / base / 05_common.mo / usr / X11R6 / lib / LessTif / config / LessTif.rules < prev    next >
Encoding:
Text File  |  2005-06-09  |  27.0 KB  |  739 lines

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