2
0

Imake.cf 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641
  1. XCOMM $TOG: Imake.cf /main/30 1998/04/28 13:55:25 barstow $
  2. /*
  3. * To add support for another platform:
  4. *
  5. * 1. Identify a machine-specific cpp symbol. If your preprocessor
  6. * does not have any built in, you will need to add the symbol to the
  7. * cpp_argv table in config/imake/imakemdep.h and rebuild imake with
  8. * the BOOTSTRAPCFLAGS variable set (see the macII for an example).
  9. *
  10. * 2. Add all machine-specific cpp symbols (either defined by you or by
  11. * the preprocessor or compiler) to the predefs table in
  12. * config/imake/imakemdep.h.
  13. *
  14. * 3. But a new #ifdef block below that defines MacroIncludeFile and
  15. * MacroFile for your new platform and then #undefs the machine-
  16. * specific preprocessor symbols (to avoid problems with file names).
  17. *
  18. * 4. Create a .cf file with the name given by MacroFile.
  19. */
  20. #ifdef ultrix
  21. # define MacroIncludeFile <ultrix.cf>
  22. # define MacroFile ultrix.cf
  23. # ifdef vax
  24. # undef vax
  25. # define VaxArchitecture
  26. # endif
  27. # ifdef mips
  28. # undef mips
  29. # define MipsArchitecture
  30. # endif
  31. # undef ultrix
  32. # define UltrixArchitecture
  33. #endif /* ultrix */
  34. #if defined(vax) && !defined(UltrixArchitecture)
  35. # define MacroIncludeFile <bsd.cf>
  36. # define MacroFile bsd.cf
  37. # undef vax
  38. # define VaxArchitecture
  39. #endif /* vax */
  40. #ifdef bsdi
  41. # define MacroIncludeFile <bsdi.cf>
  42. # define MacroFile bsdi.cf
  43. # undef bsdi
  44. # define BSD386Architecture
  45. # define i386BsdArchitecture
  46. # define i386Architecture
  47. # undef i386
  48. #endif /* bsdi */
  49. #ifdef __OpenBSD__
  50. # undef __OpenBSD__
  51. # undef __NetBSD__
  52. # define BSDArchitecture
  53. # define OpenBSDArchitecture
  54. # define KOpenBSDArchitecture
  55. # define MacroIncludeFile <OpenBSD.cf>
  56. # define MacroFile OpenBSD.cf
  57. # ifdef __i386__
  58. # define i386BsdArchitecture
  59. # define i386Architecture
  60. # undef i386
  61. # endif
  62. # if defined(__sparc__) || defined(sparc)
  63. # if !defined(__arch64__)
  64. # define SparcArchitecture
  65. # else
  66. # define Sparc64Architecture
  67. # endif
  68. # undef sparc
  69. # undef sparc64
  70. # endif
  71. # if defined(__mips__) || defined(mips)
  72. # define MipsArchitecture
  73. # ifdef __LP64__
  74. # define Mips64Architecture
  75. # endif
  76. # ifdef arc
  77. # define ArcArchitecture
  78. # undef arc
  79. # endif
  80. # ifdef sgi
  81. # define SGIArchitecture
  82. # undef sgi
  83. # endif
  84. # ifdef pmax
  85. # define PmaxArchitecture
  86. # undef pmax
  87. # endif
  88. # undef mips
  89. # undef __mips__
  90. # endif
  91. # if defined(__alpha__) || defined(alpha)
  92. # define AlphaArchitecture
  93. # undef __alpha__
  94. # undef alpha
  95. # endif
  96. # if defined(__amd64__) || defined(__x86_64__)
  97. # define AMD64Architecture
  98. # undef __amd64__
  99. # undef __x86_64__
  100. # undef amd64
  101. # endif
  102. # if defined(__arm__)
  103. # define Arm32Architecture
  104. # undef __arm__
  105. # if defined(zaurus)
  106. # undef zaurus
  107. # define ZaurusArchitecture
  108. # endif
  109. # endif
  110. # if defined(__mc68020__) || defined(mc68020)
  111. # define Mc68020Architecture
  112. # if defined(amiga)
  113. # define AmigaArchitecture
  114. # undef amiga
  115. # endif
  116. # if defined(hp300)
  117. # define Hp300Architecture
  118. # undef hp300
  119. # endif
  120. # if defined(mac68k)
  121. # define Mac68kArchitecture
  122. # undef mac68k
  123. # endif
  124. # if defined(mvme68k)
  125. # define Mvme68kArchitecture
  126. # undef mvme68k
  127. # endif
  128. # if defined(sun3)
  129. # define Sun3Architecture
  130. # undef sun3
  131. # endif
  132. # undef mc68000
  133. # endif
  134. # if defined(__m88k__) || defined(m88k)
  135. # define Mc88000Architecture
  136. # undef m88k
  137. # endif
  138. # ifdef __powerpc__
  139. # define PpcArchitecture
  140. # undef __powerpc__
  141. # undef __macppc__
  142. # undef macppc
  143. # endif
  144. # ifdef __sh__
  145. # undef __sh__
  146. # define SuperHArchitecture
  147. # endif
  148. # ifdef __vax__
  149. # undef vax
  150. # undef __vax__
  151. # define VaxArchitecture
  152. # endif
  153. # ifdef __hppa__
  154. # ifndef HPArchitecture
  155. # define HPArchitecture
  156. # endif
  157. # undef __hppa__
  158. # endif /* __hppa__ */
  159. #endif /* OpenBSD */
  160. /* Systems based on kernel of OpenBSD */
  161. #if defined(__OpenBSD_kernel__)
  162. #define KOpenBSDArchitecture
  163. #endif
  164. #ifdef __NetBSD__
  165. # define MacroIncludeFile <NetBSD.cf>
  166. # define MacroFile NetBSD.cf
  167. # undef __NetBSD__
  168. # define BSDArchitecture
  169. # define NetBSDArchitecture
  170. # ifdef __i386__
  171. # define i386BsdArchitecture
  172. # define i386Architecture
  173. # undef i386
  174. # endif
  175. # ifdef __amd64__
  176. # define AMD64BsdArchitecture
  177. # define AMD64Architecture
  178. # undef amd64
  179. # endif
  180. # if defined(__sparc__) || defined(sparc)
  181. # define SparcArchitecture
  182. # undef sparc
  183. # endif
  184. #endif /* NetBSD */
  185. #ifdef __FreeBSD__
  186. # define MacroIncludeFile <FreeBSD.cf>
  187. # define MacroFile FreeBSD.cf
  188. # undef __FreeBSD__
  189. # define BSDArchitecture
  190. # define FreeBSDArchitecture
  191. # ifdef __i386__
  192. # define i386BsdArchitecture
  193. # define i386Architecture
  194. # undef i386
  195. # endif
  196. # ifdef __amd64__
  197. # define AMD64BsdArchitecture
  198. # define AMD64Architecture
  199. # undef amd64
  200. # endif
  201. #endif /* __FreeBSD__ */
  202. #ifdef AMOEBA
  203. /* Should be before the 'sun' entry because we may be cross-compiling */
  204. # define MacroIncludeFile <Amoeba.cf>
  205. # define MacroFile Amoeba.cf
  206. # if defined(i80386) || defined(__i80386__)
  207. # undef i80386
  208. # define i386Architecture
  209. # else
  210. # if defined(mc68000) || defined(__mc68000__)
  211. # undef mc68000
  212. # define Sun3Architecture
  213. # define SunArchitecture
  214. # else
  215. # if defined(sparc) || defined(__sparc__)
  216. # undef sparc
  217. # define SparcArchitecture
  218. # define SunArchitecture
  219. # endif
  220. # endif
  221. # undef sun
  222. # endif
  223. #endif /* AMOEBA */
  224. #ifdef sun
  225. # define MacroIncludeFile <sun.cf>
  226. # define MacroFile sun.cf
  227. # ifdef SVR4
  228. # undef SVR4
  229. # define SVR4Architecture
  230. # endif
  231. # ifdef sparc
  232. # undef sparc
  233. # define SparcArchitecture
  234. # endif
  235. # ifdef __sparcv9
  236. # undef __sparcv9
  237. # define SparcV9Architecture
  238. # endif
  239. # ifdef mc68000
  240. # undef mc68000
  241. # define Sun3Architecture
  242. # endif
  243. # ifdef i386
  244. # undef i386
  245. # define i386Architecture
  246. # endif
  247. # if defined(__amd64__) || defined (__x86_64__)
  248. # undef __amd64__
  249. # undef __x86_64__
  250. # define AMD64Architecture
  251. # endif
  252. # undef sun
  253. # define SunArchitecture
  254. #endif /* sun */
  255. #ifdef hpux
  256. # define MacroIncludeFile <hp.cf>
  257. # define MacroFile hp.cf
  258. # undef hpux
  259. # define HPArchitecture
  260. #endif /* hpux */
  261. #ifdef sco
  262. # define MacroIncludeFile <sco.cf>
  263. # define MacroFile sco.cf
  264. # undef sco
  265. # undef USL
  266. # undef SYSV
  267. # undef i386
  268. /* # define i386Architecture */
  269. # define SCOArchitecture
  270. #endif /* sco */
  271. #ifdef USL
  272. # define MacroIncludeFile <usl.cf>
  273. # define MacroFile usl.cf
  274. # undef USL
  275. # undef SVR4
  276. # undef i386
  277. # define SVR4Architecture
  278. # define i386Architecture
  279. # define USLArchitecture
  280. #endif /* USL */
  281. #ifdef NCR
  282. # define MacroIncludeFile <ncr.cf>
  283. # define MacroFile ncr.cf
  284. # undef NCR
  285. # undef SVR4
  286. # undef i386
  287. # define SVR4Architecture
  288. # define i386Architecture
  289. # define NCRArchitecture
  290. #endif /* NCR */
  291. #ifdef apollo
  292. # define MacroIncludeFile <apollo.cf>
  293. # define MacroFile apollo.cf
  294. # undef apollo
  295. # define ApolloArchitecture
  296. #endif /* apollo */
  297. #ifdef sony
  298. # define MacroIncludeFile <sony.cf>
  299. # define MacroFile sony.cf
  300. # undef sony
  301. # undef sony_news
  302. # define SonyArchitecture
  303. # ifdef mc68020
  304. # undef mc68020
  305. # undef mc68030
  306. # define Mc68020Architecture
  307. # endif
  308. # ifdef mips
  309. # undef mips
  310. # define MipsArchitecture
  311. # endif
  312. # ifdef __svr4
  313. # define SVR4Architecture
  314. # else
  315. # if !defined(bsd43) || defined(SYSTYPE_SYSV) || defined(_SYSTYPE_SYSV)
  316. # define SonySysvArchitecture
  317. # else
  318. # define SonyBsdArchitecture
  319. # endif
  320. # endif
  321. #endif /* sony */
  322. #ifdef M4310
  323. # define MacroIncludeFile <pegasus.cf>
  324. # define MacroFile pegasus.cf
  325. # undef M4310
  326. # define PegasusArchitecture
  327. #endif /* M4310 */
  328. #ifdef M4330
  329. # define MacroIncludeFile <m4330.cf>
  330. # define MacroFile m4330.cf
  331. # undef M4330
  332. # define M4330Architecture
  333. #endif /* M4330 */
  334. #ifdef macII
  335. # define MacroIncludeFile <macII.cf>
  336. # define MacroFile macII.cf
  337. # undef macII
  338. # define MacIIArchitecture
  339. #endif /* macII */
  340. #ifdef _CRAY
  341. # define MacroIncludeFile <cray.cf>
  342. # define MacroFile cray.cf
  343. # undef cray
  344. # undef CRAY
  345. # undef CRAY1
  346. # undef CRAY2
  347. # undef YMP
  348. # define CrayArchitecture
  349. #endif /* _CRAY */
  350. #ifdef sgi
  351. # define MacroIncludeFile <sgi.cf>
  352. # define MacroFile sgi.cf
  353. # undef sgi
  354. # define SGIArchitecture
  355. # undef mips
  356. # define MipsArchitecture
  357. # ifdef _SVR4
  358. # undef _SVR4
  359. # define SVR4Architecture
  360. # endif
  361. # ifdef _SYSTYPE_SVR4
  362. # undef _SYSTYPE_SVR4
  363. # define SVR4Architecture
  364. # endif
  365. #endif /* sgi */
  366. #ifdef stellar
  367. # define MacroIncludeFile <stellar.cf>
  368. # define MacroFile stellar.cf
  369. # undef stellar
  370. # define StellarArchitecture
  371. #endif /* stellar */
  372. #if defined(ibm) || defined(_IBMR2) || defined(ibm032) || defined(aix)
  373. # define MacroIncludeFile <ibm.cf>
  374. # define MacroFile ibm.cf
  375. # ifdef ibm
  376. # undef ibm
  377. # endif
  378. # define IBMArchitecture
  379. # ifdef i386
  380. # undef i386
  381. # define PS2Architecture
  382. # endif
  383. # ifdef ibm032
  384. # undef ibm032
  385. # define RtArchitecture
  386. # endif
  387. # ifdef aix
  388. # undef aix
  389. # define AIXArchitecture
  390. # endif
  391. # ifdef _IBMR2
  392. # undef _IBMR2
  393. # define RsArchitecture
  394. # endif
  395. #endif /* ibm */
  396. #ifdef luna
  397. # undef luna
  398. # define MacroIncludeFile <luna.cf>
  399. # define MacroFile luna.cf
  400. # define LunaArchitecture
  401. # ifdef mc68000
  402. # undef mc68000
  403. # define Mc68000Architecture
  404. # else
  405. # undef mc88000
  406. # define Mc88000Architecture
  407. # endif
  408. #endif /* luna */
  409. #ifdef Mips
  410. # define MacroIncludeFile <Mips.cf>
  411. # define MacroFile Mips.cf
  412. # undef Mips
  413. # undef mips
  414. # if defined(SYSTYPE_BSD43) || defined(BSD) || defined(BSD43)
  415. # define MipsBsdArchitecture
  416. # else /* BSD */
  417. # define MipsSysvArchitecture
  418. # endif /* BSD */
  419. #endif /* Mips */
  420. #ifdef MOTOROLA
  421. # define MacroIncludeFile <moto.cf>
  422. # define MacroFile moto.cf
  423. # undef MOTOROLA
  424. # ifdef SYSV
  425. # define MotoR3Architecture
  426. # endif
  427. # ifdef SVR4
  428. # define MotoR4Architecture
  429. # endif
  430. #endif /* MOTOROLA */
  431. #ifdef SVR4
  432. # ifdef i386
  433. # define i386Architecture
  434. # undef i386
  435. # endif
  436. # define SVR4Architecture
  437. # define MacroIncludeFile <svr4.cf>
  438. # define MacroFile svr4.cf
  439. # undef SVR4
  440. #endif /* SVR4 */
  441. #ifdef SYSV
  442. # ifdef i386
  443. # define MacroIncludeFile <x386.cf>
  444. # define MacroFile x386.cf
  445. # define i386SVR3Architecture
  446. # undef i386
  447. # endif
  448. #endif /* SYSV */
  449. #ifdef SYSV386
  450. # undef i386
  451. # ifdef SVR4
  452. # define i386Architecture
  453. # define SVR4Architecture
  454. # define i386SVR4Architecture
  455. # define MacroIncludeFile <svr4.cf>
  456. # define MacroFile svr4.cf
  457. # undef SVR4
  458. # else
  459. # define MacroIncludeFile <x386.cf>
  460. # define MacroFile x386.cf
  461. # define i386SVR3Architecture
  462. # endif
  463. #endif /* SYSV386 */
  464. #ifdef DGUX
  465. # define MacroIncludeFile <DGUX.cf>
  466. # define MacroFile DGUX.cf
  467. # undef DGUX
  468. # define DguxArchitecture
  469. #endif /* DGUX */
  470. #ifdef __convex__
  471. # define MacroIncludeFile <convex.cf>
  472. # define MacroFile convex.cf
  473. # ifdef convex
  474. # undef convex
  475. # endif
  476. # define ConvexArchitecture
  477. #endif /* _convex_ */
  478. #ifdef __osf__
  479. # define MacroIncludeFile <osf1.cf>
  480. # define MacroFile osf1.cf
  481. # define OSF1Architecture
  482. # undef __osf__
  483. # ifdef __mips__
  484. # undef __mips__
  485. # define MipsArchitecture
  486. # endif
  487. # ifdef __alpha
  488. # undef __alpha
  489. # define AlphaArchitecture
  490. # endif
  491. #endif /* __osf__ */
  492. #ifdef Oki
  493. # define MacroIncludeFile <Oki.cf>
  494. # define MacroFile Oki.cf
  495. # undef Oki
  496. # define i860SVR4Architecture
  497. # define SVR4Architecture
  498. # undef SVR4
  499. #endif /* Oki */
  500. #ifdef WIN32
  501. # define MacroIncludeFile <Win32.cf>
  502. # define MacroFile Win32.cf
  503. # define Win32Architecture
  504. #endif /* WIN32 */
  505. #ifdef linux
  506. # define MacroIncludeFile <linux.cf>
  507. # define MacroFile linux.cf
  508. # undef linux
  509. # define LinuxArchitecture
  510. # ifdef i386
  511. # undef pentium
  512. # undef pentiumpro
  513. # define i386Architecture
  514. # undef i386
  515. # endif
  516. # ifdef __i386__
  517. # ifndef i386Architecture
  518. # define i386Architecture
  519. # endif
  520. # undef __i386__
  521. # endif /* i386 */
  522. # ifdef __alpha
  523. # define AlphaArchitecture
  524. # undef __alpha
  525. # endif /* __alpha */
  526. # ifdef powerpc
  527. # define PpcArchitecture
  528. # undef powerpc
  529. # endif
  530. # ifdef __powerpc__
  531. # ifndef PpcArchitecture
  532. # define PpcArchitecture
  533. # endif
  534. # undef __powerpc__
  535. # endif
  536. # if defined(__amd64__) || defined (__x86_64__)
  537. # undef __amd64__
  538. # undef __x86_64__
  539. # define AMD64Architecture
  540. # endif
  541. # if defined(amd64__) || defined (x86_64__)
  542. # undef amd64__
  543. # undef x86_64__
  544. # ifndef AMD64Architecture
  545. # define AMD64Architecture
  546. # endif
  547. # endif
  548. # if defined(__arm__)
  549. # undef __arm__
  550. # define ARMArchitecture
  551. # endif
  552. # if defined(__sparc__) || defined(sparc)
  553. # define SparcArchitecture
  554. # undef sparc
  555. # endif
  556. #endif /* linux */
  557. #ifdef __uxp__
  558. # define MacroIncludeFile <fujitsu.cf>
  559. # define MacroFile fujitsu.cf
  560. # define FujitsuArchitecture
  561. # undef __uxp__
  562. # define UXPArchitecture
  563. # define SVR4Architecture
  564. # ifdef sparc
  565. # undef sparc
  566. # define SparcArchitecture
  567. # endif
  568. #endif /* __uxp__ */
  569. #ifdef __sxg__
  570. # define MacroIncludeFile <fujitsu.cf>
  571. # define MacroFile fujitsu.cf
  572. # define FujitsuArchitecture
  573. # undef __sxg__
  574. # define mc68000Architecture
  575. #endif /* __sxg__ */
  576. #if defined(sequent) || defined(_SEQUENT_)
  577. # define MacroIncludeFile <sequent.cf>
  578. # define MacroFile sequent.cf
  579. # ifdef sequent
  580. # undef sequent
  581. # define Dynix3Architecture
  582. # endif
  583. # ifdef _SEQUENT_
  584. # undef _SEQUENT_
  585. # define DynixPtxArchitecture
  586. # endif
  587. # define SequentArchitecture
  588. #endif
  589. #if defined(_nec_ews_svr4) || defined(nec_ews_svr4) || defined(nec_ews_svr2) || defined(SX) || defined(_nec_up) || defined(_nec_ft) || defined(PC_UX)
  590. # ifdef nec
  591. # undef nec
  592. # endif
  593. # define MacroIncludeFile <nec.cf>
  594. # define MacroFile nec.cf
  595. # define NecArchitecture
  596. #endif
  597. #ifndef MacroIncludeFile
  598. XCOMM WARNING: Imake.cf not configured; guessing at definitions!!!
  599. XCOMM This might mean that BOOTSTRAPCFLAGS was not set when building imake.
  600. #define MacroIncludeFile <generic.cf>
  601. #define MacroFile generic.cf
  602. #endif