Motif.rules 27 KB

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