home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-bin / x11r6.1 / lib / x11 / config / imake.tmpl < prev    next >
Encoding:
Text File  |  1996-10-17  |  28.4 KB  |  1,194 lines

  1. XCOMM ----------------------------------------------------------------------
  2. XCOMM Makefile generated from IMAKE_TEMPLATE and INCLUDE_IMAKEFILE
  3. XCOMM $XConsortium: Imake.tmpl /main/r61_main/3 1996/02/02 18:57:32 gildea $
  4. XCOMM
  5.  
  6. /*
  7.  * generic imake template
  8.  */
  9.  
  10. /*
  11.  * Modify Imake.cf when adding a new architecture, do not modify this file.
  12.  * Platform-specific parameters may be set in the appropriate <vendor>.cf
  13.  * configuration files.  Site-specific parameters should be set in the file
  14.  * site.def.  Full rebuilds are recommended if any parameters are changed.
  15.  * If your C preprocessor does not define any unique symbols, you will need
  16.  * to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing
  17.  * "make World" the first time).
  18.  */
  19.  
  20. #define ImakeConfigRelease 6
  21.  
  22. #define    YES    1
  23. #define NO    0
  24.  
  25. .SUFFIXES: .i
  26.  
  27. #include <Imake.cf>
  28.  
  29. XCOMM -----------------------------------------------------------------------
  30. XCOMM site-specific configuration parameters that need to come before
  31. XCOMM the platform-specific parameters - edit site.def to change
  32. #define BeforeVendorCF
  33. #include <site.def>
  34. #undef BeforeVendorCF
  35.  
  36. #if defined(HasGcc2) && !defined(HasGcc)
  37. #define HasGcc HasGcc2
  38. #endif
  39.  
  40. #ifndef HasClearmake
  41. #define HasClearmake NO
  42. #endif
  43.  
  44. /*
  45.  * ClearmakeOSName - insert the current OS type into the clearmake
  46.  * build script, so .o files from different platforms cannot be winked in.
  47.  * If clearmake finds the build script for two .o files is the same, it
  48.  * will share the .o, even across different architectures.  Inserting the
  49.  * O/S name into the build script in a comment prevents unwanted sharing.
  50.  * Note the trailing double-@ in the macro: end a line using this macro
  51.  * with backslash without the double-@ usually used.
  52.  * Like this:
  53.  *
  54.  * #define SomeRule() @@\
  55.  *     something or other @@\
  56.  *     ClearmakeOSName \
  57.  *     something else @@\
  58.  *     and more
  59.  */
  60. #ifndef ClearmakeOSName
  61. #if HasClearmake
  62. #define ClearmakeOSName    @ XCOMM $(OSNAME) @@
  63. #else
  64. #define ClearmakeOSName /**/
  65. #endif
  66. #endif
  67.  
  68. #if HasClearmake
  69. #ifndef MakeCmd
  70. #define MakeCmd clearmake
  71. #endif
  72. #endif
  73.  
  74. #if HasClearmake
  75. XCOMM ----------------------------------------------------------------------
  76. .c.o:
  77.     ClearmakeOSName    $(CC) -c $(CFLAGS) $*.c
  78. #endif
  79.  
  80. XCOMM ----------------------------------------------------------------------
  81. XCOMM platform-specific configuration parameters - edit MacroFile to change
  82. #include MacroIncludeFile
  83.  
  84. XCOMM ----------------------------------------------------------------------
  85. XCOMM site-specific configuration parameters that go after
  86. XCOMM the platform-specific parameters - edit site.def to change
  87. #define AfterVendorCF
  88. #include <site.def>
  89. #undef AfterVendorCF
  90.  
  91. /*
  92.  * defaults for various generic parameters; set in site.def if needed
  93.  */
  94.  
  95. /* the following are needed before we can include Imake.rules */
  96.  
  97. #ifndef SystemV
  98. #define SystemV            NO    /* SYSV (R3) */
  99. #endif
  100. #ifndef SystemV4
  101. #define SystemV4        NO    /* SVR4 */
  102. #endif
  103. #ifndef HasCodeCenter
  104. #define HasCodeCenter        NO
  105. #endif
  106. #ifndef HasSentinel
  107. #define HasSentinel        NO
  108. #endif
  109. #ifndef HasPurify
  110. #define HasPurify        NO
  111. #endif
  112. #ifndef HasTestCenter
  113. #define HasTestCenter        NO
  114. #endif
  115. #ifndef RemoveTargetProgramByMoving
  116. #define RemoveTargetProgramByMoving NO
  117. #endif
  118. #ifndef DoRanlibCmd
  119. #if SystemV || SystemV4
  120. #define DoRanlibCmd NO
  121. #else
  122. #define DoRanlibCmd YES
  123. #endif
  124. #endif
  125. #ifndef ExecableScripts
  126. #if SystemV
  127. #define ExecableScripts        NO
  128. #else
  129. #define ExecableScripts        YES    /* kernel exec() can handle #! */
  130. #endif
  131. #endif
  132.  
  133. #ifndef HasMakefileSafeInclude        /* -include or sinclude in a Makefile */
  134. #if HasClearmake
  135. #define HasMakefileSafeInclude YES
  136. #else
  137. #define HasMakefileSafeInclude NO   /* see also vendor-specific .cf files */
  138. #endif
  139. #endif
  140.  
  141. #include <Imake.rules>
  142.  
  143. #ifndef HasSharedLibraries
  144. #define HasSharedLibraries NO
  145. #endif
  146. #ifndef OSMajorVersion
  147. #define OSMajorVersion          0
  148. #endif
  149. #ifndef OSMinorVersion
  150. #define OSMinorVersion          0
  151. #endif
  152. #ifndef UnalignedReferencesAllowed
  153. #define UnalignedReferencesAllowed NO    /* if arbitrary deref is okay */
  154. #endif
  155. #ifndef AvoidNullMakeCommand
  156. #define AvoidNullMakeCommand NO
  157. #endif
  158. #if AvoidNullMakeCommand
  159. #ifndef NullMakeCommand
  160. #define NullMakeCommand        @ echo -n
  161. #endif
  162. /*
  163.  * An obscure bug in BSD4.3's original make causes it not to recognize a
  164.  * macro definition if the macro name starts with a non-alpha and in
  165.  * column one.
  166.  */
  167.  _NULLCMD_ = NullMakeCommand
  168. #endif
  169.  
  170. #ifndef CrossCompiling
  171. #define CrossCompiling        NO
  172. #endif
  173. #ifndef BourneShell            /* to force shell in makefile */
  174. #define BourneShell        /bin/sh
  175. #endif
  176. #ifndef ConstructMFLAGS
  177. #if SystemV
  178. #define ConstructMFLAGS        YES    /* build MFLAGS from MAKEFLAGS */
  179. #else
  180. #define ConstructMFLAGS        NO    /* build MFLAGS from MAKEFLAGS */
  181. #endif
  182. #endif
  183.  
  184. #ifndef ConstructMAKEFLAGS        /* needed on old BSD-based? */
  185. #define ConstructMAKEFLAGS    NO    /* build MAKEFLAGS from MFLAGS */
  186. #endif
  187.  
  188. #ifndef HasLargeTmp
  189. #define HasLargeTmp        NO    /* be paranoid */
  190. #endif
  191.  
  192. #ifndef HasBSD44Sockets
  193. #define HasBSD44Sockets        NO
  194. #endif
  195. #ifndef HasSockets
  196. #define HasSockets        YES
  197. #endif
  198. #ifndef HasStreams
  199. #define HasStreams        !HasSockets
  200. #endif
  201. #ifndef HasDECnet
  202. #define HasDECnet        NO
  203. #endif
  204. #ifndef HasPoll
  205. #if SystemV || SystemV4
  206. #define HasPoll            YES
  207. #else
  208. #define HasPoll            NO
  209. #endif
  210. #endif
  211. #ifndef HasVFork
  212. #if SystemV
  213. #define HasVFork        NO    /* not yet... */
  214. #else
  215. #define HasVFork        YES
  216. #endif
  217. #endif
  218. #ifndef HasPutenv
  219. #define HasPutenv        NO    /* assume not */
  220. #endif
  221. #ifndef HasVoidSignalReturn
  222. #define HasVoidSignalReturn    YES    /* assume yes */
  223. #endif
  224. #ifndef HasBsearch
  225. #define HasBsearch        YES    /* assume yes */
  226. #endif
  227. #ifndef HasFortran
  228. #define HasFortran        NO
  229. #endif
  230. #ifndef HasCplusplus
  231. #if HasGcc2ForCplusplus
  232. #define HasCplusplus        YES
  233. #else
  234. #define HasCplusplus        NO
  235. #endif
  236. #endif
  237. #ifndef HasNdbm
  238. #define HasNdbm            NO
  239. #endif
  240. #ifndef HasSecureRPC
  241. #define HasSecureRPC        NO    /* if you have Secure RPC */
  242. #endif
  243. #ifndef HasKrb5
  244. #define HasKrb5            NO      /* if you have Kerberos V5 */
  245. #endif
  246. #ifndef HasLatex
  247. #define HasLatex        YES
  248. #endif
  249. #ifndef HasShm
  250. #if SystemV || SystemV4
  251. #define HasShm            YES
  252. #else
  253. #define HasShm            NO
  254. #endif
  255. #endif
  256. #if HasKrb5
  257. #ifndef Krb5Includes
  258. #define Krb5Includes -I/krb5/include
  259. #endif
  260. #ifndef Krb5Libraries
  261. #define Krb5Libraries -L/krb5/lib -L/usr/isode/lib -lkrb5 -lcrypto -lisode -lcom_err -ldbm
  262. #endif
  263. #else
  264. #undef Krb5Includes
  265. #define Krb5Includes /**/
  266. #undef Krb5Libraries
  267. #define Krb5Libraries /**/
  268. #endif
  269. #ifndef NeedConstPrototypes
  270. #define NeedConstPrototypes    NO
  271. #endif
  272. #ifndef NeedVarargsPrototypes
  273. #define NeedVarargsPrototypes    NO
  274. #endif
  275. #ifndef NeedNestedPrototypes
  276. #define NeedNestedPrototypes    NO
  277. #endif
  278. #ifndef NeedFunctionPrototypes
  279. #define NeedFunctionPrototypes (NeedVarargsPrototypes || NeedNestedPrototypes)
  280. #endif
  281. #ifndef NeedWidePrototypes
  282. #define NeedWidePrototypes    YES    /* mix and match ANSI-C, non-ANSI */
  283. #endif
  284.  
  285. #ifndef StripInstalledPrograms
  286. #define StripInstalledPrograms NO    /* leave symbol table just in case */
  287. #endif
  288. #ifndef UseCCMakeDepend            /* use slow cc -E script */
  289. #define UseCCMakeDepend NO
  290. #endif
  291.  
  292. /* DefaultUsrBin is independent of ProjectRoot.
  293.    This is a directory where programs will be found even if PATH
  294.    is not set, for example when coming in remotely via rsh. */
  295. #ifndef DefaultUsrBin
  296. #define    DefaultUsrBin /usr/bin
  297. #endif
  298.  
  299. #ifndef UsrLibDir
  300. #ifdef ProjectRoot
  301. #define UsrLibDir Concat(ProjectRoot,/lib)
  302. #ifndef AlternateUsrLibDir
  303. #define AlternateUsrLibDir YES
  304. #endif
  305. #else
  306. #define UsrLibDir /usr/lib
  307. #ifndef AlternateUsrLibDir
  308. #define AlternateUsrLibDir NO
  309. #endif
  310. #endif
  311. #else
  312. #ifndef AlternateUsrLibDir
  313. #define AlternateUsrLibDir YES
  314. #endif
  315. #endif
  316. #ifndef ShLibDir
  317. #define ShLibDir UsrLibDir
  318. #endif
  319. #ifndef IncRoot
  320. #ifdef ProjectRoot
  321. #define IncRoot Concat(ProjectRoot,/include)
  322. #ifndef AlternateIncRoot
  323. #define AlternateIncRoot YES
  324. #endif
  325. #else
  326. #define IncRoot /usr/include
  327. #ifndef AlternateIncRoot
  328. #define AlternateIncRoot NO
  329. #endif
  330. #endif
  331. #else
  332. #ifndef AlternateIncRoot
  333. #define AlternateIncRoot YES
  334. #endif
  335. #endif
  336. #ifndef LintlibDir
  337. #define LintlibDir $(USRLIBDIR)/lint
  338. #endif
  339. #ifndef SystemManDirectory
  340. #if SystemV4
  341. #define SystemManDirectory /usr/share/man
  342. #else
  343. #define SystemManDirectory /usr/man
  344. #endif
  345. #endif
  346. #ifndef ManDirectoryRoot
  347. #ifdef ProjectRoot
  348. #define ManDirectoryRoot Concat(ProjectRoot,/man)
  349. #else
  350. #define ManDirectoryRoot SystemManDirectory
  351. #endif
  352. #endif
  353. #ifndef ManPath
  354. #define ManPath ManDirectoryRoot
  355. #endif
  356. #ifndef ManSourcePath
  357. #define ManSourcePath $(MANPATH)/man
  358. #endif
  359. #ifndef ManDir
  360. #define ManDir $(MANSOURCEPATH)$(MANSUFFIX)
  361. #endif
  362. #ifndef LibmanDir
  363. #define LibmanDir $(MANSOURCEPATH)$(LIBMANSUFFIX)
  364. #endif
  365. #ifndef FileManDir
  366. #define FileManDir $(MANSOURCEPATH)$(FILEMANSUFFIX)
  367. #endif
  368. #ifndef ConfigSrc
  369. #define ConfigSrc $(TOP)/config
  370. #endif
  371. #ifndef DependDir
  372. #if UseCCMakeDepend
  373. #define DependDir $(CONFIGSRC)/util
  374. #else
  375. #define DependDir $(CONFIGSRC)/makedepend
  376. #endif
  377. #endif
  378. #ifndef UNCOMPRESSPATH
  379. #define UNCOMPRESSPATH /usr/ucb/uncompress
  380. #endif
  381. #ifndef OptimizedCDebugFlags
  382. #define OptimizedCDebugFlags -O
  383. #endif
  384. #ifndef OptimizedCplusplusDebugFlags
  385. #define OptimizedCplusplusDebugFlags OptimizedCDebugFlags
  386. #endif
  387. #ifndef DebuggableCDebugFlags
  388. #define DebuggableCDebugFlags -g
  389. #endif
  390. #ifndef DebuggableCplusplusDebugFlags
  391. #define DebuggableCplusplusDebugFlags DebuggableCDebugFlags
  392. #endif
  393. #ifndef ProfiledCDebugFlags
  394. #define ProfiledCDebugFlags -pg
  395. #endif
  396. #ifndef ProfiledCplusplusDebugFlags
  397. #define ProfiledCplusplusDebugFlags ProfiledCDebugFlags
  398. #endif
  399. #ifndef NoOpCDebugFlags
  400. #define NoOpCDebugFlags /**/
  401. #endif
  402. #ifndef DefaultCDebugFlags
  403. #define DefaultCDebugFlags OptimizedCDebugFlags
  404. #endif
  405. #ifndef DefaultCplusplusDebugFlags
  406. #define DefaultCplusplusDebugFlags OptimizedCplusplusDebugFlags
  407. #endif
  408. #ifndef DefaultCCOptions
  409. #define DefaultCCOptions /* floating point, etc. */
  410. #endif
  411. #ifndef DefaultCplusplusOptions
  412. #define DefaultCplusplusOptions /* floating point, etc. */
  413. #endif
  414. #ifndef NoRConst
  415. #define NoRConst NO /* YES if const for structs of funcs is bad */
  416. #endif
  417. #ifndef InstPgmFlags
  418. #define InstPgmFlags -s
  419. #endif
  420. #ifndef InstBinFlags
  421. #define InstBinFlags -m 0755
  422. #endif
  423. #ifndef InstUidFlags
  424. #define InstUidFlags -m 4711
  425. #endif
  426. #ifndef InstLibFlags
  427. #define InstLibFlags -m 0644
  428. #endif
  429. #ifndef InstIncFlags
  430. #define InstIncFlags -m 0444
  431. #endif
  432. #ifndef InstManFlags
  433. #define InstManFlags -m 0444
  434. #endif
  435. #ifndef InstDatFlags
  436. #define InstDatFlags -m 0444
  437. #endif
  438. #ifndef InstKmemFlags     /* put -g kmem -m 2711 in site.def... */
  439. #define InstKmemFlags InstUidFlags
  440. #endif
  441. #ifndef ArCmdBase
  442. #define ArCmdBase ar
  443. #endif
  444. #ifndef ArCmd
  445. #if HasLargeTmp || SystemV4
  446. #define ArCmd ArCmdBase cq
  447. #else
  448. #define ArCmd ArCmdBase clq
  449. #endif
  450. #endif
  451. #ifndef ArAddCmd
  452. #if HasLargeTmp || SystemV4
  453. #define ArAddCmd ArCmdBase ru
  454. #else
  455. #define ArAddCmd ArCmdBase rul
  456. #endif
  457. #endif
  458. #ifndef ArExtCmd
  459. #if HasLargeTmp || SystemV4
  460. #define ArExtCmd ArCmdBase x
  461. #else
  462. #define ArExtCmd ArCmdBase xl
  463. #endif
  464. #endif
  465. #ifndef BootstrapCFlags
  466. #define BootstrapCFlags /**/
  467. #endif
  468. #ifndef HasGcc2
  469. #define HasGcc2 NO
  470. #endif
  471. #ifndef HasGcc
  472. #define HasGcc HasGcc2
  473. #endif
  474. #ifndef HasGcc2ForCplusplus
  475. #define HasGcc2ForCplusplus NO
  476. #endif
  477. #ifndef HasCenterLineC
  478. #define HasCenterLineC NO
  479. #endif
  480. #ifndef HasCenterLineCplusplus
  481. #define HasCenterLineCplusplus NO
  482. #endif
  483. #ifndef CcCmd
  484. #if HasGcc2
  485. #define CcCmd gcc -fpcc-struct-return 
  486. #else
  487. #if HasGcc
  488. #define CcCmd gcc -fstrength-reduce -fpcc-struct-return 
  489. #else
  490. #if HasCenterLineC
  491. #define CcCmd clcc
  492. #else
  493. #define CcCmd cc
  494. #endif
  495. #endif
  496. #endif
  497. #endif
  498. #ifndef CplusplusCmd
  499. #if HasGcc2ForCplusplus
  500. #define CplusplusCmd g++
  501. #else
  502. #define CplusplusCmd CC
  503. #endif
  504. #endif
  505. #ifndef CplusplusStandardDefines
  506. #define CplusplusStandardDefines StandardDefines
  507. #endif
  508. #ifndef CplusplusExtraDefines
  509. #define CplusplusExtraDefines /**/
  510. #endif
  511. #ifndef CplusplusExtraIncludes
  512. #define CplusplusExtraIncludes /**/
  513. #endif
  514. #ifndef CplusplusDependIncludes
  515. #define CplusplusDependIncludes /**/
  516. #endif
  517. #ifndef CplusplusOptions
  518. #define CplusplusOptions /**/
  519. #endif
  520. #ifndef CplusplusSpecialOptions
  521. #define CplusplusSpecialOptions /**/
  522. #endif
  523. #if HasFortran
  524. #ifndef FortranCmd
  525. #define FortranCmd f77
  526. #endif
  527. #ifndef FortranFlags
  528. #define FortranFlags /**/
  529. #endif
  530. #ifndef FortranDebugFlags    /* for -O or -g */
  531. #define FortranDebugFlags /**/
  532. #endif
  533. #endif
  534. #ifndef AsCmd
  535. #define AsCmd as
  536. #endif
  537. #ifndef CompressCmd
  538. #define CompressCmd compress
  539. #endif
  540. #ifndef CppCmd
  541. #define CppCmd /lib/cpp
  542. #endif
  543. #ifndef PreProcessCmd
  544. #define PreProcessCmd CcCmd -E
  545. #endif
  546. #ifndef InstallCmd        /* hack should be in project */
  547. #if SystemV || SystemV4
  548. #ifdef UseInstalled        /* assume BINDIR in path */
  549. #define InstallCmd bsdinst
  550. #else
  551. #define InstallCmd $(SHELL) $(CONFIGSRC)/util/bsdinst.sh
  552. #endif
  553. #else
  554. #define InstallCmd install
  555. #endif
  556. #endif
  557. #ifndef InstallFlags
  558. #define InstallFlags -c
  559. #endif
  560. #ifndef LdCmd
  561. #define LdCmd ld
  562. #endif
  563. #ifndef LexCmd
  564. #define LexCmd lex
  565. #endif
  566. #ifndef LexLib
  567. #define LexLib -ll
  568. #endif
  569. #ifndef YaccCmd
  570. #define YaccCmd yacc
  571. #endif
  572. #ifndef CplusplusYaccCmd
  573. #define CplusplusYaccCmd YaccCmd
  574. #endif
  575. #ifndef LintCmd
  576. #define LintCmd lint
  577. #endif
  578. #ifndef LintLibFlag
  579. #if SystemV || SystemV4
  580. #define LintLibFlag -o
  581. #else
  582. #define LintLibFlag -C
  583. #endif
  584. #endif
  585. #ifndef LintOpts
  586. #if SystemV || SystemV4
  587. #define LintOpts -bh
  588. #else
  589. #define LintOpts -axz
  590. #endif
  591. #endif
  592. #ifndef CpCmd
  593. #define CpCmd cp
  594. #endif
  595. #ifndef HasSymLinks
  596. #define HasSymLinks YES
  597. #endif
  598. #ifndef LnCmd /* can use cp instead of ln if necessary */
  599. #if HasSymLinks
  600. #define LnCmd ln -s
  601. #else
  602. #define LnCmd ln
  603. #endif
  604. #endif
  605. #ifndef MakeCmd
  606. #define MakeCmd make
  607. #endif
  608. #ifndef MvCmd
  609. #define MvCmd mv
  610. #endif
  611. #ifndef RanlibCmd
  612. #define RanlibCmd ranlib
  613. #endif
  614. #ifndef RanlibInstFlags
  615. #define RanlibInstFlags /**/
  616. #endif
  617. #ifndef RmCmd
  618. #define RmCmd rm -f
  619. #endif
  620. #ifndef StandardIncludes    /* for platform-specifics */
  621. #define StandardIncludes /**/
  622. #endif
  623. #ifndef StandardDefines
  624. #if SystemV
  625. #define StandardDefines -DSYSV
  626. #else
  627. #if SystemV4
  628. #define StandardDefines -DSVR4
  629. #else
  630. #define StandardDefines /**/
  631. #endif
  632. #endif
  633. #endif
  634. #ifndef StandardCppDefines
  635. #define StandardCppDefines StandardDefines
  636. #endif
  637. #ifndef Malloc0ReturnsNull
  638. #define Malloc0ReturnsNull NO
  639. #endif
  640. #ifndef ToolkitStringsABIOptions
  641. #define ToolkitStringsABIOptions /**/
  642. #endif
  643. #ifndef NdbmDefines
  644. #if HasNdbm
  645. #define NdbmDefines -DNDBM
  646. #else
  647. #define NdbmDefines /**/
  648. #endif
  649. #endif
  650. #ifndef LdPreLib
  651. #if !defined(UseInstalled)
  652. #define LdPreLib -L$(BUILDLIBDIR)
  653. #else
  654. #if AlternateUsrLibDir
  655. #define LdPreLib -L$(USRLIBDIR)
  656. #else
  657. #define LdPreLib /**/
  658. #endif
  659. #endif
  660. #endif
  661. #ifndef LdPostLib
  662. #if !defined(UseInstalled) && AlternateUsrLibDir && !HasLdRunPath
  663. #define LdPostLib -L$(USRLIBDIR)
  664. #else
  665. #define LdPostLib /**/
  666. #endif
  667. #endif
  668. #ifndef MathLibrary
  669. #define MathLibrary -lm
  670. #endif
  671. #ifndef DBMLibrary
  672. #define DBMLibrary -ldbm
  673. #endif
  674. #ifndef ExtraLibraries
  675. #if SystemV4
  676. #if HasSockets
  677. #define ExtraLibraries -lsocket -lnsl -lw
  678. #else
  679. #define ExtraLibraries -lnsl -lw
  680. #endif
  681. #else
  682. #define ExtraLibraries /**/
  683. #endif
  684. #endif
  685. #ifndef ExtraLoadOptions
  686. #define ExtraLoadOptions /**/
  687. #endif
  688. #ifndef ExtraLoadFlags
  689. #define ExtraLoadFlags /**/
  690. #endif
  691. #ifndef LdCombineFlags
  692. #if SystemV4
  693. #define LdCombineFlags -r
  694. #else
  695. #define LdCombineFlags -X -r
  696. #endif
  697. #endif
  698. #ifndef LdStripFlags
  699. #define LdStripFlags -x
  700. #endif
  701. #ifndef TagsCmd
  702. #define TagsCmd ctags
  703. #endif
  704. #ifndef LoaderLibPrefix
  705. #define LoaderLibPrefix /**/
  706. #endif
  707. #ifndef ImakeCmd
  708. #ifdef UseInstalled        /* assume BINDIR in path */
  709. #define ImakeCmd imake
  710. #else
  711. #define ImakeCmd $(IMAKESRC)/imake
  712. #endif
  713. #endif
  714. #ifndef DependCmd
  715. #ifdef UseInstalled        /* assume BINDIR in path */
  716. #define DependCmd makedepend
  717. #else
  718. #define DependCmd $(DEPENDSRC)/makedepend
  719. #endif
  720. #endif
  721. #ifndef DependFlags
  722. #define DependFlags /**/
  723. #endif
  724. #ifndef DependFileName
  725. #define DependFileName Makefile.dep
  726. #endif
  727. #ifndef MkdirHierCmd
  728. #ifdef UseInstalled        /* assume BINDIR in path */
  729. #define MkdirHierCmd mkdirhier
  730. #else
  731. #define MkdirHierCmd $(SHELL) $(CONFIGSRC)/util/mkdirhier.sh
  732. #endif
  733. #endif
  734. #ifndef TroffCmd
  735. #define TroffCmd psroff
  736. #endif
  737. #ifndef NroffCmd
  738. #define NroffCmd nroff
  739. #endif
  740. #ifndef MsMacros
  741. #define MsMacros -ms
  742. #endif
  743. #ifndef ManMacros
  744. #define ManMacros -man
  745. #endif
  746. #ifndef TblCmd
  747. #define TblCmd tbl
  748. #endif
  749. #ifndef EqnCmd
  750. #define EqnCmd eqn
  751. #endif
  752. #ifndef NeqnCmd
  753. #define NeqnCmd neqn
  754. #endif
  755. #ifndef ColCmd
  756. #define ColCmd col
  757. #endif
  758. #ifndef DvipsCmd
  759. #define DvipsCmd dvips
  760. #endif
  761. #ifndef LatexCmd
  762. #define LatexCmd latex
  763. #endif
  764. #if HasSentinel
  765. #ifndef SentinelCmd
  766. #define SentinelCmd sentinel
  767. #endif
  768. #ifndef SentinelOptions
  769. #define SentinelOptions /**/
  770. #endif
  771. #endif
  772. #if HasPurify
  773. #ifndef PurifyCmd
  774. #define PurifyCmd purify
  775. #endif
  776. #ifndef PurifyOptions
  777. #define PurifyOptions /**/
  778. #endif
  779. #endif
  780. #if HasTestCenter
  781. #ifndef ProofCmd
  782. #define ProofCmd proof
  783. #endif
  784. #ifndef ProofOptions
  785. #define ProofOptions /**/
  786. #endif
  787. #endif
  788. #ifndef PathSeparator
  789. #define PathSeparator /
  790. #endif
  791. #ifndef Osuf
  792. #define Osuf o
  793. #endif
  794. #ifndef CCsuf
  795. #define CCsuf cxx
  796. #endif
  797. #ifndef ManSuffix
  798. #define ManSuffix    n        /* use just one tab or cpp will die */
  799. #endif
  800. #ifndef LibManSuffix
  801. #define LibManSuffix    3        /* use just one tab or cpp will die */
  802. #endif
  803. #ifndef FileManSuffix
  804. #if SystemV || SystemV4 || defined(OSF1Architecture)
  805. #define FileManSuffix    4        /* use just one tab or cpp will die */
  806. #else
  807. #define FileManSuffix    5        /* use just one tab or cpp will die */
  808. #endif
  809. #endif
  810. #ifndef ExpandManNames
  811. #if SystemV
  812. #define ExpandManNames NO
  813. #else
  814. #define ExpandManNames YES
  815. #endif
  816. #endif
  817. #ifndef TOPDIR
  818. #define TOPDIR .
  819. #endif
  820. #ifndef CURDIR
  821. #define CURDIR .
  822. #endif
  823. #ifndef SiteIConfigFiles
  824. #define SiteIConfigFiles /**/
  825. #endif
  826. #ifndef ExtraFilesToClean
  827. #define ExtraFilesToClean /**/
  828. #endif
  829. #ifndef FilesToClean
  830. #define FilesToClean *.CKP *.ln *.BAK *.bak *.Osuf core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut 
  831. #endif
  832.  
  833.           PATHSEP = PathSeparator
  834.             SHELL = BourneShell
  835.  
  836.               TOP = TOPDIR
  837.       CURRENT_DIR = CURDIR
  838.  
  839.             IMAKE = ImakeCmd
  840.            DEPEND = DependCmd
  841.         MKDIRHIER = MkdirHierCmd
  842.         CONFIGSRC = ConfigSrc
  843.          IMAKESRC = $(CONFIGSRC)/imake
  844.         DEPENDSRC = DependDir
  845.  
  846.           INCROOT = IncRoot        /* base of where to put header files */
  847.         USRLIBDIR = UsrLibDir        /* nonshared libraries */
  848.          SHLIBDIR = ShLibDir            /* shared libraries */
  849.        LINTLIBDIR = LintlibDir        /* lint libraries */
  850.           MANPATH = ManPath        /* top of manual page tree */
  851.     MANSOURCEPATH = ManSourcePath    /* prefix for man page sources */
  852.            MANDIR = ManDir        /* man pages for commands */
  853.         LIBMANDIR = LibmanDir        /* man pages for library routines */
  854.        FILEMANDIR = FileManDir        /* man pages for config files */
  855.  
  856.                AR = ArCmd
  857.   BOOTSTRAPCFLAGS = BootstrapCFlags    /* set if cpp does not have uniq sym */
  858.                CC = CcCmd
  859.                AS = AsCmd
  860. #if HasFortran
  861.                FC = FortranCmd
  862.       FDEBUGFLAGS = FortranDebugFlags
  863.           FCFLAGS = FortranFlags $(FDEBUGFLAGS)
  864. #endif
  865. #if HasCplusplus
  866.  
  867. .SUFFIXES: .CCsuf
  868.  
  869.               CXX = CplusplusCmd
  870.     CXXDEBUGFLAGS = DefaultCplusplusDebugFlags
  871.  CXXEXTRA_DEFINES = CplusplusExtraDefines
  872. CXXEXTRA_INCLUDES = CplusplusExtraIncludes
  873.    CXXSTD_DEFINES = CplusplusStandardDefines
  874.        CXXOPTIONS = CplusplusOptions
  875.       CXXINCLUDES = $(INCLUDES) $(TOP_INCLUDES) $(CXXEXTRA_INCLUDES) 
  876.        CXXDEFINES = $(CXXINCLUDES) $(CXXSTD_DEFINES) $(THREADS_CXXDEFINES) $(CXXEXTRA_DEFINES)
  877.          CXXFLAGS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(THREADS_CXXFLAGS) $(CXXDEFINES)
  878. #endif
  879.          COMPRESS = CompressCmd
  880.               CPP = CppCmd $(STD_CPP_DEFINES)        /* simple filters */
  881.     PREPROCESSCMD = PreProcessCmd $(STD_CPP_DEFINES)    /* prefered; mdep */
  882.           INSTALL = InstallCmd
  883.      INSTALLFLAGS = InstallFlags
  884.                LD = LdCmd
  885.               LEX = LexCmd
  886.            LEXLIB = LexLib
  887.              YACC = YaccCmd
  888.            CCYACC = CplusplusYaccCmd
  889.              LINT = LintCmd
  890.       LINTLIBFLAG = LintLibFlag
  891.          LINTOPTS = LintOpts
  892.                LN = LnCmd
  893.              MAKE = MakeCmd
  894.                MV = MvCmd
  895.                CP = CpCmd
  896. #if DoRanlibCmd
  897.            RANLIB = RanlibCmd
  898.   RANLIBINSTFLAGS = RanlibInstFlags
  899. #endif
  900.                RM = RmCmd
  901.         MANSUFFIX = ManSuffix        /* suffix for command man pages */
  902.      LIBMANSUFFIX = LibManSuffix    /* suffix for library man pages */
  903.     FILEMANSUFFIX = FileManSuffix    /* suffix for config file man pages */
  904.             TROFF = TroffCmd
  905.             NROFF = NroffCmd
  906.          MSMACROS = MsMacros
  907.         MANMACROS = ManMacros
  908.               TBL = TblCmd
  909.               EQN = EqnCmd
  910.              NEQN = NeqnCmd
  911.               COL = ColCmd
  912. #if HasLatex
  913.             DVIPS = DvipsCmd
  914.             LATEX = LatexCmd
  915. #endif
  916. #if HasSentinel
  917.          SENTINEL = SentinelCmd
  918.   SENTINELOPTIONS = SentinelOptions
  919. #endif
  920. #if HasPurify
  921.            PURIFY = PurifyCmd
  922.     PURIFYOPTIONS = PurifyOptions
  923. #endif
  924. #if HasTestCenter
  925.            PROOF = ProofCmd
  926.     PROOFOPTIONS = ProofOptions
  927. #endif
  928.      STD_INCLUDES = StandardIncludes
  929.   STD_CPP_DEFINES = StandardCppDefines
  930.       STD_DEFINES = StandardDefines
  931.  EXTRA_LOAD_FLAGS = ExtraLoadFlags
  932.   EXTRA_LDOPTIONS = ExtraLoadOptions
  933.   EXTRA_LIBRARIES = ExtraLibraries Krb5Libraries
  934.              TAGS = TagsCmd
  935. #if ConstructMFLAGS
  936.            MFLAGS = -$(MAKEFLAGS)
  937. #endif
  938. #if ConstructMAKEFLAGS
  939.         MAKEFLAGS = $(MFLAGS)
  940. #endif
  941. #if HasSharedLibraries
  942.     SHAREDCODEDEF = SharedCodeDef
  943.          SHLIBDEF = SharedLibraryDef
  944. #ifdef SharedLibraryLoadFlags
  945.      SHLIBLDFLAGS = SharedLibraryLoadFlags
  946. #endif
  947. /*
  948.  * Here we set up flags needed to produce position-independent code 
  949.  * when doing C and C++ compilation.  The default if you specify C
  950.  * PIC flags without also specifying C++ PIC flags is to assume that 
  951.  * the C flags work for both.  If your C++ compiler requires different
  952.  * flags, specify them explicitly in PositionIndependentCplusplusFlags.
  953.  */
  954. #ifdef PositionIndependentCFlags
  955.          PICFLAGS = PositionIndependentCFlags
  956. #endif
  957. #ifdef PositionIndependentCplusplusFlags
  958.       CXXPICFLAGS = PositionIndependentCplusplusFlags
  959. #else
  960. #ifdef PositionIndependentCFlags
  961.       CXXPICFLAGS = PositionIndependentCFlags
  962. #endif
  963. #endif
  964. #endif
  965. #if !HasVoidSignalReturn
  966.    SIGNAL_DEFINES = -DSIGNALRETURNSINT
  967. #endif
  968. /*
  969.  * The following supports forcing of function prototypes
  970.  */
  971. #if NeedFunctionPrototypes && NeedVarargsPrototypes && NeedConstPrototypes && NeedNestedPrototypes
  972. #define _funcprotodef -DFUNCPROTO=15
  973. #else
  974. #if NeedFunctionPrototypes && NeedVarargsPrototypes && NeedNestedPrototypes
  975. #define _funcprotodef -DFUNCPROTO=11
  976. #else
  977. #if NeedFunctionPrototypes && NeedNestedPrototypes
  978. #define _funcprotodef -DFUNCPROTO=9
  979. #else
  980. #if NeedFunctionPrototypes && NeedVarargsPrototypes && NeedConstPrototypes
  981. #define _funcprotodef -DFUNCPROTO=7
  982. #else
  983. #if NeedFunctionPrototypes && NeedConstPrototypes
  984. #define _funcprotodef -DFUNCPROTO=5
  985. #else
  986. #if NeedFunctionPrototypes && NeedVarargsPrototypes
  987. #define _funcprotodef -DFUNCPROTO=3
  988. #else
  989. #if NeedFunctionPrototypes
  990. #define _funcprotodef -DFUNCPROTO
  991. #else
  992. #define _funcprotodef /**/
  993. #endif
  994. #endif
  995. #endif
  996. #endif
  997. #endif
  998. #endif
  999. #endif
  1000. #if NeedWidePrototypes
  1001. #define _wideprotodef /**/
  1002. #else
  1003. #define _wideprotodef -DNARROWPROTO
  1004. #endif
  1005.     PROTO_DEFINES = _funcprotodef _wideprotodef 
  1006. #undef _funcprotodef
  1007. #undef _wideprotodef
  1008.  
  1009. #if StripInstalledPrograms
  1010.      INSTPGMFLAGS = InstPgmFlags    /* install flags for stripping */
  1011. #else
  1012.      INSTPGMFLAGS = 
  1013. #endif
  1014.      INSTBINFLAGS = InstBinFlags    /* install flags for programs */
  1015.      INSTUIDFLAGS = InstUidFlags    /* install flags for setuid programs */
  1016.      INSTLIBFLAGS = InstLibFlags    /* install flags for libraries */
  1017.      INSTINCFLAGS = InstIncFlags    /* install flags for headers */
  1018.      INSTMANFLAGS = InstManFlags    /* install flags for man pages */
  1019.      INSTDATFLAGS = InstDatFlags    /* install flags for data files */
  1020.     INSTKMEMFLAGS = InstKmemFlags    /* install flags for /dev/kmem progs */
  1021.  
  1022. #ifdef ProjectRoot
  1023.       PROJECTROOT = ProjectRoot
  1024. #endif
  1025. #ifdef UseInstalled
  1026. #if AlternateIncRoot
  1027.      TOP_INCLUDES = -I$(INCROOT)    /* def: for alternative /usr/include */
  1028. #endif
  1029. #else
  1030.      TOP_INCLUDES = -I$(TOP)        /* def: for builds within tree */
  1031. #endif
  1032.       CDEBUGFLAGS = DefaultCDebugFlags
  1033.         CCOPTIONS = DefaultCCOptions    /* to distinguish from param flags */
  1034. /*
  1035.  * STD_INCLUDES contains system-specific includes
  1036.  * TOP_INCLUDES specifies how to get to /usr/include or its build substitute
  1037.  * EXTRA_INCLUDES contains project-specific includes set in project incfiles
  1038.  * INCLUDES contains client-specific includes set in Imakefile
  1039.  * LOCAL_LDFLAGS contains client-specific ld flags flags set in Imakefile
  1040.  */
  1041.       ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(STD_INCLUDES)
  1042.        ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(THREADS_DEFINES) $(DEFINES)
  1043.            CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(THREADS_CFLAGS) $(ALLDEFINES)
  1044.         LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES) $(DEPEND_DEFINES)
  1045.          LDPRELIB = LdPreLib
  1046.         LDPOSTLIB = LdPostLib
  1047.         LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS)  $(EXTRA_LDOPTIONS) $(THREADS_LDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIB)
  1048.      CXXLDOPTIONS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_CXXLDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIB)
  1049.  
  1050.            LDLIBS = $(LDPOSTLIB) $(THREADS_LIBS) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
  1051. #if HasBrokenCCForLink
  1052.            CCLINK = LdCmd
  1053. #else
  1054. #if AlternateUsrLibDir && HasLdRunPath
  1055.        CCENVSETUP = LD_RUN_PATH=$(USRLIBDIR)
  1056.            CCLINK = $(CCENVSETUP) $(CC)
  1057. #else
  1058.            CCLINK = $(CC)
  1059. #endif
  1060. #endif
  1061. #if AlternateUsrLibDir && HasLdRunPath
  1062.       CXXENVSETUP = LD_RUN_PATH=$(USRLIBDIR)
  1063.           CXXLINK = $(CXXENVSETUP) $(CXX)
  1064. #else
  1065.           CXXLINK = $(CXX)
  1066. #endif
  1067.      LDSTRIPFLAGS = LdStripFlags
  1068.    LDCOMBINEFLAGS = LdCombineFlags
  1069.       DEPENDFLAGS = DependFlags
  1070.  
  1071.         MACROFILE = MacroFile
  1072.            RM_CMD = $(RM)
  1073.  
  1074.     IMAKE_DEFINES = /* leave blank, for command line use only */
  1075. #ifdef UseInstalled
  1076.          IRULESRC = $(CONFIGDIR)    /* used in rules file */
  1077.         IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES)
  1078. #else
  1079.          IRULESRC = $(CONFIGSRC)/cf
  1080.         IMAKE_CMD = $(IMAKE) -I$(IRULESRC) $(IMAKE_DEFINES)
  1081. #endif
  1082. #if !HasClearmake
  1083.      /* clearmake records relevant defines and flags in the build script,
  1084.     so it knows when they change and we don't need this coarser-level
  1085.     dependency.  We also don't want it, since it prevents sharing if
  1086.     even one config file, say site.def or host.def, changes. */
  1087.      ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/Project.tmpl \
  1088.             $(IRULESRC)/site.def $(IRULESRC)/$(MACROFILE) \
  1089.             SiteIConfigFiles $(EXTRA_ICONFIGFILES)
  1090. #endif
  1091.  
  1092. #ifndef LocalRulesFile
  1093. /* need this to make ANSI-style preprocessors happy */
  1094. #define LocalRulesFile <noop.rules>
  1095. #endif
  1096. #include LocalRulesFile
  1097.  
  1098. /*
  1099.  * get project-specific configuration and rules
  1100.  */
  1101. #include <Project.tmpl>
  1102. #ifndef LocalTmplFile
  1103. /* need this to make ANSI-style preprocessors happy */
  1104. #define LocalTmplFile <noop.rules>
  1105. #endif
  1106. #include LocalTmplFile
  1107.  
  1108. #ifdef FixupLibReferences
  1109. FixupLibReferences()
  1110. #endif
  1111.  
  1112. /* ConfigDir comes from Project.tmpl */
  1113.         CONFIGDIR = ConfigDir        /* build configuration information */
  1114. #if HasClearmake
  1115.            OSNAME = OSName
  1116. #endif
  1117.  
  1118. XCOMM ----------------------------------------------------------------------
  1119. XCOMM start of Imakefile
  1120. #include INCLUDE_IMAKEFILE
  1121.  
  1122. XCOMM ----------------------------------------------------------------------
  1123. XCOMM common rules for all Makefiles - do not edit
  1124.  
  1125. .c.i:
  1126.     CPPOnlyCompile($*.c,$(_NOOP_))
  1127. /*
  1128.  * These need to be here so that rules in Imakefile occur first;  the blank
  1129.  * emptyrule is to make sure that an empty Imakefile does not default to make
  1130.  * clean.
  1131.  */
  1132. emptyrule::
  1133.  
  1134. CleanTarget()
  1135.  
  1136. #ifndef IHaveSpecialMakefileTarget
  1137. MakefileTarget()
  1138. #endif
  1139.  
  1140. TagsTarget()
  1141. #ifdef MakefileAdditions
  1142. MakefileAdditions()
  1143. #endif
  1144.  
  1145. CenterLoadTarget(debug_src,$(SRCS),NullParameter,$(ALLDEFINES))
  1146.  
  1147. CenterLoadTarget(debug_obj,$(OBJS),NullParameter,$(ALLDEFINES))
  1148.  
  1149. ManKeywordsTarget($(MANPATH))
  1150.  
  1151. #ifdef IHaveSubdirs
  1152. XCOMM ----------------------------------------------------------------------
  1153. XCOMM rules for building in SUBDIRS - do not edit
  1154.  
  1155. InstallSubdirs($(SUBDIRS))
  1156. InstallManSubdirs($(SUBDIRS))
  1157. InstallLinkKitSubdirs($(SUBDIRS))
  1158. CleanSubdirs($(SUBDIRS))
  1159. TagSubdirs($(SUBDIRS))
  1160. MakefileSubdirs($(SUBDIRS))
  1161. IncludesSubdirs($(SUBDIRS))
  1162.  
  1163. #endif
  1164.  
  1165. /* must be after all install.man rules that install anything */
  1166. #if MakeManKeywords        /* typically only at top level */
  1167. install.man:: man_keywords
  1168. #endif
  1169.  
  1170. #ifndef IHaveSubdirs
  1171. XCOMM ----------------------------------------------------------------------
  1172. XCOMM empty rules for directories that do not have SUBDIRS - do not edit
  1173.  
  1174. install::
  1175.     @echo "install in $(CURRENT_DIR) done"
  1176.  
  1177. install.man::
  1178.     @echo "install.man in $(CURRENT_DIR) done"
  1179.  
  1180. install.linkkit::
  1181.     @echo "install.linkkit in $(CURRENT_DIR) done"
  1182.  
  1183. Makefiles::
  1184.  
  1185. includes::
  1186.  
  1187. depend::
  1188.  
  1189. #endif /* if subdirectory rules are needed */
  1190.  
  1191. XCOMM ----------------------------------------------------------------------
  1192. XCOMM dependencies generated by makedepend
  1193. IncludeMakefile(DependFileName)
  1194.