Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

932 lines
24 KiB

  1. ##
  2. ## Copyright (c) 2000, Intel Corporation
  3. ## All rights reserved.
  4. ##
  5. ## WARRANTY DISCLAIMER
  6. ##
  7. ## THESE MATERIALS ARE PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  8. ## "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  9. ## LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  10. ## A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INTEL OR ITS
  11. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  12. ## EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  13. ## PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  14. ## PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
  15. ## OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING
  16. ## NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THESE
  17. ## MATERIALS, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  18. ##
  19. ## Intel Corporation is the author of the Materials, and requests that all
  20. ## problem reports or change requests be submitted to it directly at
  21. ## http://developer.intel.com/opensource.
  22. ##
  23. ########################################################################
  24. #
  25. # Tools common Makefile.inc
  26. #
  27. # NOTES FOR Windows/NT environment
  28. # 1. In WINNT, absolute path must BEGIN with back-slash (\) in order
  29. # to find the RCS file for an absolute file-name on the server.
  30. # 2. The substitution of /topg_drive is done only by the ToolBuster tools.
  31. # It souldn't be used for other tools, e.g. cl.exe -I/topg_drive... won't work
  32. # This variable should be substituted before the command issuing.
  33. # 3. Absolute path with leading back-slash is not recognized as expected by MS tools.
  34. # Either use absolute path with leading slash, or qoute the name with Double-Qoutes (").
  35. # Different set of variables (macros) can contain Absolute path with leading slash,
  36. # and with leading back-slash
  37. # add the server drive to VAPTH to find RCS files for absolute file-names
  38. VPATH += /topg_drive
  39. ifeq ($(HOSTTYPE), WINNT)
  40. # ???????
  41. WINNT = winnt
  42. endif # of WINNT
  43. ifndef LOCALBASEDIR
  44. ifeq ($(HOSTTYPE), PARISC)
  45. LOCALBASEDIR = $(WORK_AREA)
  46. LOCALDIR = $(LOCALBASEDIR)
  47. else # of PARISC
  48. ifeq ($(HOSTTYPE), WINNT)
  49. # For absolute path name in NT, use leading back-slash
  50. LOCALDIR = \x86sw
  51. else # of WINNT
  52. LOCALBASEDIR = $(HOME)
  53. ifndef WORK_AREA
  54. LOCALDIR = $(LOCALBASEDIR)/x86sw
  55. else # of WORK_AREA
  56. LOCALDIR = $(WORK_AREA)
  57. endif # of WORK_AREA
  58. endif # of WINNT
  59. endif # of PARISC
  60. else # of LOCALBASEDIR
  61. ifndef LOCALDIR
  62. LOCALDIR = $(LOCALBASEDIR)/x86sw
  63. endif # of LOCALDIR
  64. endif # of LOCALBASEDIR
  65. ifndef SERVER_AREA
  66. ifeq ($(HOSTTYPE), WINNT)
  67. # This variable cann't be use in dependencies, the : are the problem
  68. SERVER_AREA = j:/x86sw
  69. else # of WINNT
  70. ifeq ($(HOSTTYPE), PARISC)
  71. SERVER_AREA = /gambit/src/official
  72. else # of PARISC
  73. SERVER_AREA = /home/x86sw
  74. endif # of PARISC
  75. endif # of WINNT
  76. endif # of SERVER_AREA
  77. ifndef STT_LOCAL_BIN
  78. STT_LOCAL_BIN = /usr/local/bin
  79. endif
  80. CI = $(STT_LOCAL_BIN)/ci
  81. CO = $(STT_LOCAL_BIN)/co
  82. ifdef REMOTE
  83. INSTALLDIR = $(LOCALDIR)
  84. ifeq ($(REMOTE), SC)
  85. RELEASEDIR = /md7/arch/tools/current/tools
  86. else # of SC
  87. ifeq ($(REMOTE), OR)
  88. RELEASEDIR = /home2/tools64/current/tools
  89. else # of OR
  90. @echo check your REMOTE environment variable, should be one of
  91. @echo SC, OR
  92. @exit 1
  93. endif # of OR
  94. endif # of SC
  95. else # of REMOTE
  96. ifeq ($(HOSTTYPE), PARISC)
  97. INSTALLDIR = $(WORK_AREA)
  98. PINSTALLDIR = $(WORK_AREA)/prereleases
  99. else # of PARISC
  100. INSTALLDIR = $(SERVER_AREA)
  101. PINSTALLDIR = $(INSTALLDIR)/preleases
  102. endif
  103. RELEASEDIR = /export/iswp_02/tools64/current/tools
  104. endif # of REMOTE
  105. ifneq ($(HOSTTYPE), WINNT)
  106. DATE := $(shell date "+%d-%m-%y, %H:%M")
  107. UNAME := $(shell uname)
  108. endif # of WINNT
  109. #ifeq ($(HOSTTYPE), PARISC)
  110. # SERVER_DIR = $(WORK_AREA)
  111. #else # of PARISC
  112. # ifdef SERVER_AREA
  113. # SERVER_DIR = $(SERVER_AREA)
  114. # else # of SERVER_AREA
  115. # ifeq ($(HOSTTYPE), WINNT)
  116. # SERVER_DIR = j:/x86sw
  117. # else # of WINNT
  118. # SERVER_DIR = /home/x86sw
  119. # endif # of SERVER_AREA
  120. #endif # of PARISC
  121. ifeq ($(HOSTTYPE), i386)
  122. HOSTTYPE := UNIX386
  123. endif
  124. ifeq ($(HOSTTYPE), i486)
  125. HOSTTYPE := UNIX386
  126. endif
  127. ifeq ($(HOSTTYPE), iAPX386)
  128. ifeq ($(UNAME), SunOS)
  129. HOSTTYPE := x86Solaris
  130. else
  131. HOSTTYPE := UNIX386
  132. endif
  133. endif
  134. ifeq ($(HOSTTYPE), UNIX)
  135. HOSTTYPE := UNIX386
  136. endif
  137. ifeq ($(UNAME), OSF1)
  138. HOSTTYPE := MACH386
  139. endif
  140. ifneq ($(HOSTTYPE), PARISC)
  141. RCSDIFF = rcsdiff -q
  142. else
  143. RCSDIFF = rcsdiff
  144. endif
  145. ifeq ($(HOSTTYPE), UNIX386)
  146. ifeq ($(OSTYPE), svr5)
  147. OS_DIR = svr5
  148. SYS = -DSVR4 -DSVR5 -DUNIX
  149. GCC_BIN = /usr/ccs/bin/cc
  150. CC_BIN = /usr/ccs/bin/cc
  151. RGCC_BIN = /usr/topgun/bin/rgcc
  152. AWK_BIN = /usr/bin/nawk
  153. AS_BIN = /usr/ccs/bin/as
  154. LD_BIN = /usr/ccs/bin/ld
  155. YACC_BIN = /usr/ccs/bin/yacc
  156. GCC_WARN = -Xc
  157. GCC_FLAGS =
  158. GCC_DEBUG = -g $(GCC_WARN)
  159. GCC_OPT = -O $(GCC_WARN)
  160. CC_FLAGS = -Xc -Xt
  161. CC_DEBUG = -g $(PROF_FLAGS)
  162. CC_OPT = -O
  163. RGCC_FLAGS= -Xa -Di386
  164. RGCC_DEBUG= -g
  165. RGCC_OPT = -Knoieee -Kinline -O ### -Kpentium
  166. AS_FLAGS =
  167. LD_FLAGS = -r
  168. YC_FLAGS = -d -v
  169. AR_BIN = /usr/ccs/bin/ar
  170. CP_BIN = /usr/bin/cp
  171. LN_BIN = /usr/bin/ln
  172. MV_BIN = /usr/bin/mv
  173. RM_BIN = /usr/bin/rm
  174. CHMOD_BIN = /usr/bin/chmod
  175. STRIP_BIN = /usr/ccs/bin/strip
  176. AWK = gawk
  177. PERL = /usr/intel/bin/perl -I /usr/gnu/lib/perl5/
  178. AS_FLAGS = -n
  179. else
  180. OS_DIR = svr4
  181. SYS = -DSVR4 -DUNIX
  182. GCC_BIN = /usr/local/bin/gcc
  183. CC_BIN = /usr/bin/cc
  184. RGCC_BIN = /usr/topgun/bin/rgcc
  185. AWK_BIN = /usr/bin/nawk
  186. AS_BIN = /usr/bin/as
  187. LD_BIN = /usr/bin/ld
  188. YACC_BIN = /usr/bin/yacc
  189. GCC_WARN = -Wall -Wshadow -Wpointer-arith -Wcast-align \
  190. -Wconversion -Wmissing-prototypes -Wnested-externs
  191. GCC_FLAGS = -m486
  192. GCC_DEBUG = -g $(GCC_WARN)
  193. GCC_OPT = -O2 -DNDEBUG $(GCC_WARN)
  194. CC_FLAGS = -Xa -Di386
  195. CC_DEBUG = -g $(PROF_FLAGS)
  196. CC_OPT = -O
  197. RGCC_FLAGS= -Xa -Di386
  198. RGCC_DEBUG= -g
  199. RGCC_OPT = -Knoieee -Kinline -O ### -Kpentium
  200. AS_FLAGS =
  201. LD_FLAGS = -r
  202. YC_FLAGS = -d -v
  203. AR_BIN = /usr/bin/ar
  204. CP_BIN = /usr/bin/cp
  205. LN_BIN = /usr/bin/ln
  206. MV_BIN = /usr/bin/mv
  207. RM_BIN = /usr/bin/rm
  208. CHMOD_BIN = /usr/bin/chmod
  209. STRIP_BIN = /usr/bin/strip
  210. AWK = gawk
  211. AS_FLAGS = -n
  212. # GCC_O_WS = -Wmissing-prototypes
  213. endif
  214. else
  215. ifeq ($(HOSTTYPE), i386-linux)
  216. OS_DIR = linux
  217. SYS = -DSVR4 -DUNIX
  218. GCC_BIN = /usr/cygnus/redhat-980810/H-i386-pc-linux-gnu/bin/gcc
  219. GCC_BIN = /usr/bin/gcc
  220. CC_BIN = /usr/cygnus/redhat-980810/H-i386-pc-linux-gnu/bin/gcc
  221. CC_BIN = /usr/bin/gcc
  222. RGCC_BIN = /usr/topgun/bin/rgcc
  223. AWK_BIN = /usr/bin/nawk
  224. AS_BIN = /usr/bin/as
  225. LD_BIN = /usr/bin/ld
  226. YACC_BIN = /usr/bin/yacc
  227. GCC_WARN = -Wall -Wshadow -Wpointer-arith -Wcast-align \
  228. -Wconversion -Wmissing-prototypes -Wnested-externs
  229. GCC_FLAGS = -m486
  230. GCC_DEBUG = -g $(GCC_WARN)
  231. GCC_OPT = -O2 -DNDEBUG $(GCC_WARN)
  232. CC_FLAGS = $(GCC_FLAGS)
  233. CC_DEBUG = $(GCC_DEBUG)
  234. CC_OPT = $(GCC_OPT)
  235. RGCC_FLAGS= -Xa -Di386
  236. RGCC_DEBUG= -g
  237. RGCC_OPT = -Knoieee -Kinline -O ### -Kpentium
  238. AS_FLAGS =
  239. LD_FLAGS = -r
  240. YC_FLAGS = -d -v
  241. AR_BIN = /usr/bin/ar
  242. CP_BIN = /bin/cp
  243. LN_BIN = /bin/ln
  244. MV_BIN = /bin/mv
  245. RM_BIN = /bin/rm
  246. CHMOD_BIN = /bin/chmod
  247. STRIP_BIN = /usr/bin/strip
  248. AWK = gawk
  249. AS_FLAGS = -n
  250. CO = /usr/bin/co
  251. CI = /usr/bin/ci
  252. else
  253. ifeq ($(HOSTTYPE), i486-linux)
  254. OS_DIR = linux
  255. PERL = /usr/bin/perl
  256. SYS = -DSVR4 -DUNIX
  257. GCC_BIN = /usr/bin/gcc
  258. CC_BIN = /usr/bin/gcc
  259. RGCC_BIN = /usr/topgun/bin/rgcc
  260. AWK_BIN = /usr/bin/nawk
  261. AS_BIN = /usr/bin/as
  262. LD_BIN = /usr/bin/ld
  263. YACC_BIN = /usr/bin/yacc
  264. GCC_WARN = -Wall -Wshadow -Wpointer-arith -Wcast-align \
  265. -Wconversion -Wmissing-prototypes -Wnested-externs
  266. GCC_FLAGS = -m486
  267. GCC_DEBUG = -g $(GCC_WARN)
  268. GCC_OPT = -O2 -DNDEBUG $(GCC_WARN)
  269. CC_FLAGS = $(GCC_FLAGS)
  270. CC_DEBUG = $(GCC_DEBUG)
  271. CC_OPT = $(GCC_OPT)
  272. RGCC_FLAGS= -Xa -Di386
  273. RGCC_DEBUG= -g
  274. RGCC_OPT = -Knoieee -Kinline -O ### -Kpentium
  275. AS_FLAGS =
  276. LD_FLAGS = -r
  277. YC_FLAGS = -d -v
  278. AR_BIN = /usr/bin/ar
  279. CP_BIN = /bin/cp
  280. LN_BIN = /bin/ln
  281. MV_BIN = /bin/mv
  282. RM_BIN = /bin/rm
  283. CHMOD_BIN = /bin/chmod
  284. STRIP_BIN = /usr/bin/strip
  285. AWK = gawk
  286. AS_FLAGS = -n
  287. CO = /usr/intel/bin/co
  288. CI = /usr/intel/bin/ci
  289. else
  290. ifeq ($(HOSTTYPE), PARISC)
  291. OS_DIR = $(MACHINE)
  292. SYS = -DHPUX -DSVR4 -DUNIX -DPY -DSTRICT_ALIGN
  293. GCC_BIN = /usr/local/bin/gcc
  294. CC_BIN = /usr/bin/cc
  295. RGCC_BIN = /usr/topgun/bin/rgcc
  296. AWK_BIN = /usr/bin/nawk
  297. AS_BIN = /usr/bin/as
  298. LD_BIN = /usr/bin/ld
  299. YACC_BIN = /usr/bin/yacc
  300. GCC_FLAGS =
  301. GCC_WARN = -Wall -Wshadow -Wpointer-arith -Wcast-align \
  302. -Wconversion -Wmissing-prototypes -Wnested-externs
  303. GCC_DEBUG = -g $(GCC_WARN)
  304. GCC_OPT = -O2
  305. CC_FLAGS = -Xa -Di386
  306. CC_DEBUG = -g $(PROF_FLAGS)
  307. CC_OPT = -O
  308. RGCC_FLAGS= -Xa -Di386
  309. GCC_DEBUG = -g $(GCC_WARN)
  310. RGCC_OPT = -Knoieee -Kinline -O ### -Kpentium
  311. AS_FLAGS =
  312. LD_FLAGS = -r
  313. YC_FLAGS = -d -v
  314. #
  315. # Changed for HPUX, from /usr/bin/ar for SVR4.
  316. #
  317. AR_BIN = /bin/ar
  318. CP_BIN = /usr/bin/cp
  319. LN_BIN = /usr/bin/ln
  320. MV_BIN = /usr/bin/mv
  321. RM_BIN = /usr/bin/rm
  322. CHMOD_BIN = /usr/bin/chmod
  323. STRIP_BIN = /usr/bin/strip
  324. AWK = gawk
  325. AS_FLAGS = -n
  326. # GCC_O = -ansi -Wall -Wshadow -Wpointer-arith -Wcast-align \
  327. # -Wconversion -Wmissing-prototypes \
  328. # -Wnested-externs
  329. else
  330. ifeq ($(HOSTTYPE), UNIX386_TEST)
  331. OS_DIR = svr4
  332. SYS = -DSVR4 -DUNIX
  333. GCC_BIN = /usr/local/bin/gcc -Wa,-t386 -Wa,-Nwa
  334. CC_BIN = /usr/bin/cc
  335. RGCC_BIN = /usr/topgun/bin/rgcc
  336. AWK_BIN = /usr/bin/nawk
  337. AS_BIN = /usr/bin/as
  338. LD_BIN = /usr/bin/ld
  339. YACC_BIN = /usr/bin/yacc
  340. GCC_FLAGS = -m486
  341. GCC_DEBUG = -g $(GCC_WARN)
  342. GCC_OPT = -O2
  343. CC_FLAGS = -Xa -Di386
  344. CC_DEBUG = -g
  345. CC_OPT = -O
  346. RGCC_FLAGS= -Xa -Di386
  347. GCC_DEBUG = -g $(GCC_WARN)
  348. RGCC_OPT = -Knoieee -Kinline -O ### -Kpentium
  349. AS_FLAGS =
  350. LD_FLAGS = -r
  351. YC_FLAGS = -d -v
  352. AR_BIN = /usr/bin/ar
  353. CP_BIN = /usr/bin/cp
  354. LN_BIN = /usr/bin/ln
  355. MV_BIN = /usr/bin/mv
  356. RM_BIN = /usr/bin/rm
  357. CHMOD_BIN = /usr/bin/chmod
  358. STRIP_BIN = /usr/bin/strip
  359. else
  360. ifeq ($(HOSTTYPE), WINNT)
  361. # ToolBusterDir should be defined in the environment
  362. PERL = perl -I$(ToolBusterDir)/lib/perl
  363. EXEXT = .exe
  364. OS_DIR = win32
  365. PWD =
  366. SYS = -DWINNT
  367. GCC_BIN = cl.exe
  368. CXX = cl.exe
  369. CC_BIN = cl.exe
  370. AS_BIN = $(ToolBusterDir)/lib/gcc-lib/winnt386/2_4_5/as
  371. LD_BIN = $(ToolBusterDir)/lib/gcc-lib/winnt386/2_4_5/ld
  372. LD_BIN = lib
  373. CAT_BIN = cat.exe
  374. AR_BIN = lib.exe
  375. CP_BIN = cp.exe
  376. MV_BIN = mv.exe
  377. RM_BIN = rm.exe
  378. CHMOD_BIN = chmod.exe
  379. AWK_BIN = gawk
  380. CO = co.exe
  381. CI = ci.exe
  382. LIBMOFL = libmofl.lib
  383. ELF_H = elf.h
  384. GCC_OPT = -O2 -DNDEBUG
  385. CFLAGS_D_DEXE32 = /nologo /Za /W3 /YX /D "_X86_" /D "_DEBUG" \
  386. /D "_CONSOLE" /D "__WINNT__" /D "EX86stuff" \
  387. /FR /ML /Fd"ILD.PDB" /Fp"ILD.PCH"
  388. else
  389. ifeq ($(HOSTTYPE), x86Solaris)
  390. OS_DIR = solaris
  391. SYS = -DSVR4 -DUNIX
  392. GCC_BIN = /usr/local/bin/gcc
  393. CC_BIN = /usr/bin/cc
  394. RGCC_BIN = /usr/topgun/bin/rgcc
  395. AWK_BIN = /usr/bin/nawk
  396. AS_BIN = /usr/bin/as
  397. LD_BIN = /usr/ccs/bin/ld
  398. YACC_BIN = /usr/bin/yacc
  399. GCC_FLAGS = -m486
  400. GCC_DEBUG = -g $(GCC_WARN)
  401. GCC_OPT = -O2
  402. CC_FLAGS = -Xa -Di386
  403. CC_DEBUG = -g
  404. CC_OPT = -O
  405. RGCC_FLAGS= -Xa -Di386
  406. RGCC_DEBUG= -g
  407. RGCC_OPT = -Knoieee -Kinline -O ### -Kpentium
  408. AS_FLAGS =
  409. LD_FLAGS = -r
  410. YC_FLAGS = -d -v
  411. AR_BIN = /usr/bin/ar
  412. CP_BIN = /bin/cp
  413. LN_BIN = /usr/bin/ln
  414. MV_BIN = /usr/bin/mv
  415. RM_BIN = /usr/bin/rm
  416. CHMOD_BIN = /usr/bin/chmod
  417. STRIP_BIN = /usr/ccs/bin/strip
  418. else
  419. ifeq ($(HOSTTYPE), MACH386)
  420. OS_DIR = osf
  421. SYS = -DOSF1 -DUNIX
  422. GCC_BIN = /usr/local/bin/ngcc
  423. CC_BIN = /bin/cc
  424. AWK_BIN = /usr/local/bin/gawk
  425. AS_BIN = /bin/as
  426. LD_BIN = /bin/ld
  427. YACC_BIN = /bin/yacc
  428. GCC_FLAGS = -m486
  429. GCC_DEBUG = -g $(GCC_WARN)
  430. GCC_OPT = -O2
  431. CC_FLAGS =
  432. CC_DEBUG = -g
  433. CC_OPT = -O
  434. AS_FLAGS =
  435. LD_FLAGS = -r
  436. YC_FLAGS = -d -v
  437. AR_BIN = /bin/ar
  438. CP_BIN = /bin/cp
  439. LN_BIN = /bin/ln
  440. MV_BIN = /bin/mv
  441. RM_BIN = /bin/rm
  442. CHMOD_BIN = /bin/chmod
  443. STRIP_BIN = /bin/strip
  444. else
  445. ifeq ($(HOSTTYPE), rs6000)
  446. OS_DIR = aix
  447. SYS = -DRS6000 -DAIX -DUNIX -DBIG_ENDIAN -DSTRICT_ALIGN
  448. GCC_BIN = /usr/intel/bin/gcc
  449. CC_BIN = /bin/cc
  450. AWK_BIN = /usr/local/bin/gawk
  451. AS_BIN = /bin/as
  452. LD_BIN = /bin/ld
  453. YACC_BIN = /bin/yacc
  454. GCC_FLAGS =
  455. GCC_DEBUG = -g $(GCC_WARN)
  456. GCC_OPT = -O2
  457. CC_FLAGS =
  458. CC_DEBUG = -g
  459. CC_OPT = -O
  460. AS_FLAGS =
  461. LD_FLAGS = -r
  462. YC_FLAGS = -d -v
  463. AR_BIN = /bin/ar
  464. CP_BIN = /bin/cp
  465. LN_BIN = /bin/ln
  466. MV_BIN = /bin/mv
  467. RM_BIN = /bin/rm
  468. CHMOD_BIN = /bin/chmod
  469. STRIP_BIN = /bin/strip
  470. else
  471. ifeq ($(HOSTTYPE), sun4)
  472. OS_DIR = sparc
  473. SYS = -DSPARC -DSUNOS -DUNIX -DBIG_ENDIAN -DEWS -DSTRICT_ALIGN
  474. GCC_BIN = /usr/local/bin/gcc
  475. CC_BIN = /bin/cc
  476. AWK_BIN = /usr/local/bin/gawk
  477. AS_BIN = /bin/as
  478. LD_BIN = /bin/ld
  479. YACC_BIN = /bin/yacc
  480. GCC_FLAGS =
  481. GCC_DEBUG = -g $(GCC_WARN)
  482. GCC_OPT = -O2
  483. CC_FLAGS =
  484. CC_DEBUG = -g
  485. CC_OPT = -O
  486. AS_FLAGS =
  487. LD_FLAGS = -r
  488. YC_FLAGS = -d -v
  489. AR_BIN = /bin/ar
  490. CP_BIN = /bin/cp
  491. LN_BIN = /bin/ln
  492. MV_BIN = /bin/mv
  493. RM_BIN = /bin/rm
  494. CHMOD_BIN = /bin/chmod
  495. STRIP_BIN = /bin/strip
  496. else
  497. ifeq ($(HOSTTYPE), HP)
  498. OS_DIR = hp
  499. SYS = -DUNIX -DHPUX -DBIG_ENDIAN -DSTRICT_ALIGN
  500. GCC_BIN = /usr/local/gnu/cygnus/progressive-95q2/H-hppa1.1-hp-hpux9.05/bin/gcc
  501. CC_BIN = /bin/cc
  502. AWK_BIN = /usr/local/bin/gawk
  503. AS_BIN = /bin/as
  504. LD_BIN = /bin/ld
  505. YACC_BIN = /bin/yacc
  506. GCC_FLAGS =
  507. GCC_DEBUG = -g $(GCC_WARN)
  508. GCC_WARN = -Wall -Wshadow -Wpointer-arith -Wcast-align \
  509. -Wconversion -Wmissing-prototypes -Wnested-externs
  510. GCC_OPT = -O2
  511. CC_FLAGS =
  512. CC_DEBUG = -g
  513. CC_OPT = -O
  514. AS_FLAGS =
  515. LD_FLAGS = -r
  516. YC_FLAGS = -d -v
  517. AR_BIN = /bin/ar
  518. CP_BIN = /bin/cp
  519. LN_BIN = /bin/ln
  520. MV_BIN = /bin/mv
  521. RM_BIN = /bin/rm
  522. CHMOD_BIN = /bin/chmod
  523. STRIP_BIN = /bin/strip
  524. else
  525. ifeq ($(HOSTTYPE),hp9000s700)
  526. OS_DIR = hp
  527. SYS = -DUNIX -DHPUX -DBIG_ENDIAN -DSTRICT_ALIGN
  528. GCC_BIN = /usr/intel/bin/gcc -fPIC
  529. CC_BIN = /bin/cc
  530. AWK_BIN = /usr/local/bin/gawk
  531. AS_BIN = /bin/as
  532. LD_BIN = /bin/ld
  533. YACC_BIN = /bin/yacc
  534. GCC_FLAGS =
  535. GCC_WARN = -Wall -Wshadow -Wpointer-arith -Wcast-align \
  536. -Wconversion -Wmissing-prototypes -Wnested-externs
  537. GCC_DEBUG = -g $(GCC_WARN)
  538. GCC_OPT = -O2 -DNDEBUG
  539. CC_FLAGS =
  540. CC_DEBUG =
  541. CC_OPT = -O
  542. AS_FLAGS =
  543. LD_FLAGS = -r
  544. YC_FLAGS = -d -v
  545. AR_BIN = /bin/ar
  546. CP_BIN = /bin/cp
  547. LN_BIN = /bin/ln
  548. MV_BIN = /bin/mv
  549. RM_BIN = /bin/rm
  550. CHMOD_BIN = /bin/chmod
  551. STRIP_BIN = /bin/strip
  552. else
  553. ifeq ($(HOSTTYPE), SCO)
  554. OS_DIR = sco
  555. SYS = -DSCO -DUNIX
  556. GCC_BIN = /usr/local/bin/gcc
  557. CC_BIN = /bin/cc
  558. AWK_BIN = /usr/local/bin/gawk
  559. AS_BIN = /usr/local/bin/as
  560. LD_BIN = /bin/ld
  561. YACC_BIN = /usr/bin/yacc
  562. GCC_FLAGS = -m486
  563. GCC_DEBUG = -g $(GCC_WARN)
  564. GCC_OPT = -O2
  565. CC_FLAGS = -Xa -Di386
  566. CC_DEBUG = -g
  567. CC_OPT = -O
  568. AS_FLAGS =
  569. LD_FLAGS = -r
  570. YC_FLAGS = -d -v
  571. AR_BIN = /bin/ar
  572. CP_BIN = /bin/cp
  573. LN_BIN = /bin/ln
  574. MV_BIN = /bin/mv
  575. RM_BIN = /bin/rm
  576. CHMOD_BIN = /bin/chmod
  577. STRIP_BIN = /bin/strip
  578. else
  579. ifeq ($(HOSTTYPE), UNIX64)
  580. OS_DIR =
  581. SYS = -DSVR4 -DUNIX
  582. GCC_BIN = gcc64
  583. # CC_BIN = /bin/cc
  584. AWK_BIN = /usr/local/bin/gawk
  585. AS_BIN = ias
  586. LD_BIN = ild
  587. YACC_BIN = /usr/bin/yacc
  588. GCC_FLAGS = -milp32
  589. GCC_DEBUG = -g $(GCC_WARN)
  590. GCC_OPT = -O2
  591. # CC_FLAGS = -Xa -Di386
  592. # CC_DEBUG = -g
  593. # CC_OPT = -O
  594. AS_FLAGS =
  595. LD_FLAGS = -r
  596. YC_FLAGS = -d -v
  597. AR_BIN = iar
  598. CP_BIN = /bin/cp
  599. LN_BIN = /bin/ln
  600. MV_BIN = /bin/mv
  601. RM_BIN = /bin/rm
  602. CHMOD_BIN = /bin/chmod
  603. STRIP_BIN = /bin/strip
  604. else
  605. ifeq ($(HOSTTYPE), UNIX64E) #Electron, 32 bit, EM
  606. OS_DIR = eas
  607. SYS = -DSVR4 -DUNIX
  608. GCC_BIN = ecc.eas -32 -noannotate -D__PTR32__
  609. # CC_BIN = /bin/cc
  610. AWK_BIN = /usr/local/bin/gawk
  611. AS_BIN = ias.eas
  612. LD_BIN = ild.eas
  613. YACC_BIN = /usr/bin/yacc
  614. GCC_FLAGS =
  615. GCC_DEBUG = $(GCC_WARN)
  616. GCC_OPT =
  617. # CC_FLAGS = -Xa -Di386
  618. # CC_DEBUG = -g
  619. # CC_OPT = -O
  620. AS_FLAGS =
  621. LD_FLAGS = -r
  622. YC_FLAGS = -d -v
  623. AR_BIN = iar
  624. CP_BIN = /bin/cp
  625. LN_BIN = /bin/ln
  626. MV_BIN = /bin/mv
  627. RM_BIN = /bin/rm
  628. CHMOD_BIN = /bin/chmod
  629. STRIP_BIN = /bin/strip
  630. else
  631. ifeq ($(HOSTTYPE), WINNT64E) #Electron, 32 bit, EM
  632. # ToolBusterDir should be defined in the environment
  633. PERL = perl -I$(ToolBusterDir)/lib/perl
  634. EXEXT = .exe
  635. OS_DIR = win32em
  636. PWD =
  637. SYS = -DWINNT
  638. GCC_BIN = icl.exe
  639. CXX = icl.exe
  640. CC_BIN = icl.exe
  641. AS_BIN = ias.exe
  642. LD_BIN = ilib ### ??
  643. CAT_BIN = cat.exe
  644. AR_BIN = ilib.exe
  645. CP_BIN = cp.exe
  646. MV_BIN = mv.exe
  647. RM_BIN = rm.exe
  648. CHMOD_BIN = chmod.exe
  649. AWK_BIN = gawk
  650. CO = co.exe
  651. CI = ci.exe
  652. LIBMOFL = libmofl.lib
  653. ELF_H = elf.h
  654. GCC_OPT = -DNDEBUG
  655. CFLAGS_D_DEXE32 = /nologo /Za /W3 /YX /D "_X86_" /D "_DEBUG" \
  656. /D "_CONSOLE" /D "__WINNT__" /D "EX86stuff" \
  657. /FR /ML /Fd"ILD.PDB" /Fp"ILD.PCH" ### ??
  658. else
  659. GCC_BIN = @echo HOSTTYPE undefined
  660. CC_BIN = $(GCC_BIN)
  661. hosttype_error:
  662. @echo check your HOSTTYPE environment variable, should be one of
  663. @echo i386, i486 iAPX386, UNIX386, UNIX, MACH386, rs6000, sun4, HP
  664. @exit 1
  665. endif
  666. endif
  667. endif
  668. endif
  669. endif
  670. endif
  671. endif
  672. endif
  673. endif
  674. endif
  675. endif
  676. endif
  677. endif
  678. endif
  679. endif
  680. endif
  681. ifeq ($(HOSTTYPE), WINNT)
  682. AR_OPT = /out:
  683. OEXT = obj
  684. LEXT = lib
  685. LDEXT = dll
  686. EEXT = .exe
  687. DOPT = /D
  688. IOPT = /I
  689. ifdef STAT_LIB
  690. COPT = /c
  691. else
  692. COPT = /c /MD
  693. endif
  694. FOPT =
  695. TC_FLAG = /Tc
  696. FE_FLAG = /Fe
  697. FO_FLAG = /Fo
  698. R_FLAG =
  699. O_FLAG =
  700. OUT_FLAG = /out:
  701. DEBUG_FLAG = /Zi
  702. NT_O_FLAG = /Fo
  703. DLL_LINK_FLAG = /link /DLL
  704. NAME_FLAG = /name:
  705. DLL = dll
  706. ECHO = $(ToolBusterDir)/bin/echo
  707. DELPARA = $(PERL) $(ToolBusterDir)/perlScripts/delpara
  708. SEPR = &
  709. LINK_CC = link /SUBSYSTEM:console /MACHINE:i386
  710. LINK_DEBUG_FLAG = /DEBUG /FORCE:MULTIPLE
  711. else
  712. AR_OPT = cr
  713. OEXT = o
  714. LEXT = a
  715. LDEXT = so
  716. EEXT =
  717. DOPT = -D
  718. IOPT = -I
  719. COPT = -c
  720. FOPT = -f
  721. TC_FLAG =
  722. FE_FLAG =
  723. FO_FLAG =
  724. R_FLAG = -r
  725. O_FLAG = -o
  726. OUT_FLAG =
  727. DEBUG_FLAG = -g
  728. NAME_FLAG =
  729. DLL_LINK_FLAG = -G
  730. DLL = so
  731. LIB = a
  732. ECHO = echo
  733. DELPARA = $(PERL) $(SERVER_AREA)/scripts/delpara
  734. SEPR = ;
  735. LINK_CC = $(CC)
  736. LINK_DEBUG_FLAG = $(DEBUG_FLAG)
  737. endif
  738. ifdef USE_LPROF
  739. PROF_FLAGS = -ql
  740. USECC = 1
  741. CC_OPT =
  742. endif
  743. # ToolBusterDir should be defined in the environment
  744. # $$$ Default should be supplied
  745. ifeq ($(HOSTTYPE), WINNT)
  746. MHDR = $(PERL) $(ToolBusterDir)/perlScripts/mhdr -c
  747. else
  748. MHDR = $(PERL) $(SERVER_AREA)/scripts/mhdr -c
  749. endif
  750. LOCALBIN = $(LOCALDIR)/bin.$(OS_DIR)
  751. LOCALLIB = $(LOCALDIR)/lib.$(OS_DIR)
  752. INSTALLBIN = $(INSTALLDIR)/bin.$(OS_DIR)
  753. INSTALLLIB = $(INSTALLDIR)/lib.$(OS_DIR)
  754. PINSTALLBIN = $(PINSTALLDIR)/bin.$(OS_DIR)
  755. PINSTALLLIB = $(PINSTALLDIR)/lib.$(OS_DIR)
  756. ifndef INSTALLINC
  757. ifeq ($(HOSTTYPE), WINNT)
  758. INSTALLINC = /topg_drive/x86sw/include
  759. else
  760. INSTALLINC = $(INSTALLDIR)/include
  761. endif
  762. endif
  763. RELEASEBIN = $(RELEASEDIR)/bin.$(OS_DIR)
  764. RELEASELIB = $(RELEASEDIR)/lib.$(OS_DIR)
  765. RELEASEINC = $(RELEASEDIR)/include
  766. RELEASEMAN = $(RELEASEDIR)/man/man1
  767. RELEASEDEMO = $(RELEASEDIR)/demo
  768. EAS_EXT = .eas
  769. ifneq ($(HOSTTYPE), WINNT)
  770. CUR_DIR = $(shell pwd)
  771. MAKE_DIR = $(PWD)
  772. endif
  773. BINDIR = $(LOCALBIN)
  774. SRCDIR = $(LOCALDIR)/src
  775. INCDIR = $(INSTALLINC)
  776. CTLDIR = $(SRCDIR)/CTL64
  777. DECDIR = $(SRCDIR)/idecoder
  778. DISDIR = $(SRCDIR)/idasm
  779. EMDBDIR = $(SRCDIR)/emdb
  780. DEC_TST_DIR = $(LOCALDIR)/tst/idecoder
  781. DIS_TST_DIR = $(LOCALDIR)/tst/idasm
  782. SIGNON = $(INCDIR)/signon.h
  783. USER_CFLAGS =
  784. CFLAGS = $(COPT) $(TOOL_FLAG) $(VFLAG) $(SYS) $(USER_CFLAGS)
  785. CXXFLAGS = $(CFLAGS)
  786. # additional suffixes
  787. .SUFFIXES: .spec .dir .s .c .o .l .a
  788. ifdef OPTIMIZE # default is using debug info
  789. CC_COM = $(CC_BIN) $(CC_FLAGS) $(CC_OPT)
  790. GCC_COM = $(GCC_BIN) $(GCC_FLAGS) $(GCC_OPT)
  791. RGCC_COM = $(RGCC_BIN) $(RGCC_FLAGS) $(RGCC_OPT)
  792. else
  793. CC_COM = $(CC_BIN) $(CC_FLAGS) $(CC_DEBUG)
  794. GCC_COM = $(GCC_BIN) $(GCC_FLAGS) $(GCC_DEBUG)
  795. RGCC_COM = $(RGCC_BIN) $(RGCC_FLAGS) $(RGCC_DEBUG)
  796. endif
  797. ifdef USECC
  798. CC = $(CC_COM)
  799. else
  800. ifdef USERGCC
  801. CC = $(RGCC_COM)
  802. else # default is using gcc !
  803. USEGCC = 1 # allow user to condition his flags upon this one
  804. CC = $(GCC_COM)
  805. endif
  806. endif
  807. AWK = $(AWK_BIN)
  808. AS = $(AS_BIN) $(AS_FLAGS)
  809. LD = $(LD_BIN) $(LD_FLAGS)
  810. LD2 = $(CC)
  811. AR = $(AR_BIN)
  812. CP = $(CP_BIN)
  813. LN = $(LN_BIN)
  814. MV = $(MV_BIN) $(FOPT)
  815. RM = $(RM_BIN) $(FOPT)
  816. CHMOD = $(CHMOD_BIN)
  817. STRIP = $(STRIP_BIN)
  818. YACC = $(YACC_BIN) $(YC_FLAGS)
  819. ifdef RCS_NO_UPDATE # default is update RCS
  820. ifneq ($(HOSTTYPE),WINNT)
  821. %:: RCS/%,v
  822. @test ! -f $@ || $(RCSDIFF) $@ > /dev/null || echo $@ need to be checked out 1>&2
  823. @test -f $@ || $(CO) $(COFLAGS) $< $@
  824. else # of WINNT
  825. %:: RCS/%,v
  826. @test ! -f "$@" || $(RCSDIFF) "$@" > NUL: || echo $@ need to be checked out 1>&2
  827. @test -f "$@" || $(CO) $(COFLAGS) "$@"
  828. endif # of WINNT
  829. else # of RCS_NO_UPDATE
  830. ifneq ($(HOSTTYPE),WINNT)
  831. %:: RCS/%,v
  832. @echo updating $@ 1>&2
  833. $(CO) $(COFLAGS) $@
  834. else # of WINNT
  835. %:: RCS/%,v
  836. @echo updating "$@" 1>&2
  837. $(CO) $(COFLAGS) "$@"
  838. endif # of WINNT
  839. endif # of RCS_NO_UPDATE
  840. ifeq ($(HOSTTYPE),WINNT)
  841. %.obj: %.c
  842. $(CC) $(CFLAGS) /Fo$@ /Tc$<
  843. endif
  844. .c.o:
  845. ifneq ($(HOSTTYPE),WINNT)
  846. ifdef USECC
  847. $(CC) $(CFLAGS) ${CUR_DIR}/$<
  848. # Do the move only if not in place
  849. $(patsubst $@-noexist,$(MV) $(@F) $@, $(filter-out $(filter $(@F), $@),$(firstword $(filter $(@F), $@) $@-noexist)))
  850. else
  851. $(CC) $(CFLAGS) -o ${CUR_DIR}/$@ ${CUR_DIR}/$<
  852. endif
  853. else
  854. $(CC) $(CFLAGS) /Fo$@ /Tc$<
  855. endif
  856. .PHONY: force
  857. include $(INCDIR)/Make_Arch.inc
  858. ifeq ($(HOSTTYPE), WINNT)
  859. CUTPERL = $(PERL) cut.perl
  860. else
  861. CUTPERL = cut.perl
  862. endif
  863. # Hook for Makefile debug purpose
  864. echo_%:
  865. +@echo variable $* is "$($*)" its origin is "$(origin $*)"
  866. # Every file of this type is not erased if it was an intermediate target
  867. .PRECIOUS: %.c %.s %.h
  868. # to avoid infinite loop, don't retry if.
  869. # in case no other rule apply, try to build the target in that directory
  870. ifndef TRIED_THIS_TRICK
  871. .DEFAULT: %
  872. @echo !!!! Trying last resort default
  873. $(MAKE) -C $(@D) TRIED_THIS_TRICK=1 $(@F)
  874. endif