rules.bsp
上传用户:luoyougen
上传日期:2008-05-12
资源大小:23136k
文件大小:35k
源码类别:

VxWorks

开发平台:

C/C++

  1. # rules.bsp - makefile target rules for BSP
  2. #
  3. # Copyright 1984-2002, Wind River Systems, Inc.
  4. #
  5. # modification history
  6. # --------------------
  7. # 03q,30apr02,cym  adding HEX_FLAGS to makeMacros
  8. # 03p,27mar02,dat  Remove intermediate files to keep view small, SPR 72823,
  9. #    new targets clean_release, clean_cmdLine, clean_prj
  10. # 03o,19mar02,dat  Adding CFLAGS_PIC for bootInit.o (72825)
  11. # 03n,14feb02,jab  use LD_PARTIAL_LAST_FLAGS in last link for .out targets
  12. # 03m,31jan02,fmk  remove redirection operator to generate symTbl.c
  13. # 03l,13dec01,jab  added make variable BOOTCONFIG_FLAGS
  14. # 03k,10dec01,dat  Fixing subst commands
  15. # 03k,07dec01,tpw  Remove HEX_HIGH_FLAGS and HEX_LOW_FLAGS, and fix proj %.hex
  16. # 03j,05dec01,dat  added prj_gnu_def, prj_gnu_all, prj_diab_all, prj_diab_def,
  17. #                  prj_default_one
  18. # 03i,04dec01,dat  fix prj_gnu and prj_diab to ignore MAKEFLAGS values
  19. # 03h,04dec01,j_s  add exporting of LD_LINK_PATH back
  20. # 03g,26nov01,j_s  changed LIBS to contain reference to VX_OS_LIBS instead of 
  21. #    its snapshot value, added rule 'makeMacrosReferred'
  22. # 03f,15nov01,jtp  generate vxImage.o to provide target-server symbols for
  23. #    the vxWorks.st_rom configuration
  24. # 03e,14nov01,pch  Add "test" target
  25. # 03d,13nov01,dat  new release rule, fix to bootrom
  26. # 03c,05nov01,rbl  add project compiler and assembler flags
  27. # 03b,08nov01,tpw  Add general %.bin rule.
  28. # 03a,05nov01,dat  New targets prj_gnu and prj_diab
  29. # 02z,06nov01,tpw  Add %.old rule to facilitate conversions to old OMFs
  30. # 02y,24oct01,rbl  add extra macros to makeMacros for diab support
  31. # 02x,30oct01,tam  removed CC_LIB from cyclic linking
  32. # 02w,29oct01,jab  updated rules for ld scripts
  33. # 02v,09oct01,j_s  remove LD_LINK_LIST, just use LD_LINK_LIBS
  34. #    add support for build dependency on archives: vpath and
  35. #    expansion of '-l<ar>'
  36. # 02u,18oct01,dat  Moving tool defines to tool specific files
  37. # 02t,01oct01,dat  Added CPU TOOL args to bsp2prj, consistent use of $BSP_NAME
  38. # 02s,25sep01,dat  Gnu-Diab infrastructure, added include rules.$HOST
  39. # 02r,06aug01,mem  Update for rearragement of runtime libraries.
  40. # 02q,31oct00,scm  add post build rules...
  41. # 02p,06apr00,dra  Added HEX_LOW_FLAGS and HEX_HIGH_FLAGS to support FRV
  42. #                  (Venus) toolchain.
  43. # 02o,31mar00,rsh  final merge es.tor2_0.mcore to tor2_0_0.es.coretools
  44. # 02n,01mar00,rsh  removing remove of LIB_EXTRA since I'm nolonger using a bsp
  45. #                  archive of sio driver and the remove shouldn't be here
  46. #                  anyway
  47. # 02m,08feb00,jld  add clean rule for LIB_EXTRA.
  48. # 02l,27oct99,tpw  Add RES_LDFLAGS, like ROM_LDFLAGS but for resident images.
  49. # 02k,26oct99,tpw  Fix two bugs in the objcopy changes.
  50. # 02j,01mar99,yp   Added rules for building files with cc extentions SPR 20293
  51. # 02i,23feb99,sn   removed references to $(POST_MUNCH)
  52. # 02h,18jan99,sn   removed hack mentioned below (collect2 now fixed)
  53. # 02g,07dec98,sn   hacked bsp2prj rule so that default projects created
  54. #                  on unix work on windows too.
  55. # 02f,17nov98,sn   added LD_PARTIAL_FLAGS back to makeMacros, undid 02d
  56. # 02e,11nov98,sn   partially link using LD_PARTIAL
  57. #                  clean now removes .rpo files too
  58. # 02d,11nov98,sn   munch -> orderCtors
  59. # 02c,05Nov98,ms   -traditional -> -fdollars-in-identifiers
  60. # 02b,23Oct98,ms   make implicit rules overridable from make.CPUTOOL.
  61. # 02c,21apr99,bc   Alter BINXSYM command line for objcopy interface.
  62. # 02b,08apr99,bc   Merge in objcopy invocations from Aeolus
  63. # 02a,28aug98,jmp  added bsp2proj as part of the release rule.
  64. # 01z,29jun98,jmp  removed from makeMacros rule all macros defined in
  65. #    BSPs Makefiles.
  66. # 01y,25jun98,ms   added more macros to makeMacros rule
  67. # 01x,02apr98,pcn  Removed Objcopy changes from Tempest view
  68. # 01w,15dec97,pcn  Added Objcopy in BSP build.
  69. # 01v,04mar97,tpr  changed bootrom_res_res_high.hex by bootrom_res_high.hex
  70. #    (SPR 8095)
  71. # 01u,13dec96,map  Remove symTbl.c in target rule `clean' [SPR# 2637]
  72. # 01t,09dec96,tpr  Added rule to remove ctdt.c for the 'clean' target. 
  73. # 01s,04oct96,yp   Added rules for building files with cxx extentions
  74. # 01r,23oct96,yp   redid treatment of .s files so we don't create tmp
  75. # 01q,26sep96,dat  removed edit 01k, was harming sparc & 960 BSPs. (SPR 7238)
  76. # 01p,19sep96,tpr  merge PPC to tor1_0_1 release.
  77. # 01o,29aug96,ms   removed "-f -b 15" after $(COMPRESS).
  78. # 01n,22aug96,map  added romInit.o dependency to romInit_res* rules to fix
  79. #                  SPR# 7063
  80. # 01m,25jul96,tam  replaced mips specific rom resident targets by ppc ones. 
  81. # 01l,23jul96,kkk  fixed build rules for romInit_res*.o for.
  82. # 01k,22jul96,tam  added $(BOOT_EXTRA) where it was missing.
  83. # 01j,04apr96,srh  added munching.
  84. # 01i,08mar96,yp   added -P in implicite .s.o rule.
  85. # 01h,06mar96,dat  new rules for version.o
  86. # 01g,13nov95,jeh  restored .cpp.o implicit rule
  87. # 01f,08nov95,jeh  removed .cpp.o implicit rule
  88. # 01e,01nov95,p_m  added LIB to rom_res build command
  89. # 01d,01nov95,yp   added implicit rules for C++
  90. # 01c,30oct95,dat  added targets vxWorks.res_rom_nosym and 
  91. #    vxWorks.res_rom_nosym_mips
  92. # 01b,27jun95,kkk  added VXSIZE.
  93. # 01a,12jun95,yp   created from makeTarget2 v03d.
  94. #
  95. # DESCRIPTION
  96. # This file contains rules used in building targets.
  97. #
  98. # This file is only used for command line builds from the BSP directory.
  99. # It is not used for any project or component builds.  Changes made here
  100. # affect only command line builds. See rules.project for project build rules.
  101. #
  102. #
  103. # VARIABLES
  104. # The following variables must be defined (or not, as appropriate):
  105. #
  106. #     ROM_SIZE          number of bytes of ROM space as in config.h
  107. #     LOCAL_MEM_SIZE target RAM size as in config.h
  108. #     BINHEX binary->hex file conversion program
  109. #     HEX_FLAGS         BINHEX program options
  110. #     LD_LOW_FLAGS ld(1) options for code in low memory
  111. #     LD_HIGH_FLAGS ld options for code in high memory
  112. #     LD_PARTIAL_FLAGS  ld flags for linking partially complete objects
  113. #     LDDEPS host-specific dependencies prerequisite to linking
  114. #     LDOUT_CONV hpToBsd, coffToBsd, gswab, /bin/cat, etc.
  115. #     COMPILE_SYMTBL hide flags needed to get compiler to swallow symTbl.c
  116. #     ROM_ENTRY rom entry point (typically &romInit)
  117. #     SYS_ENTRY system entry point (typically &sysInit)
  118. #     USR_ENTRY compressed system entry point (typically &usrInit)
  119. #
  120. # The following variables are optionally defined:
  121. #
  122. #     LDFLAGS standard ld flags for vxWorks & ROMs.
  123. #     ROM_LDFLAGS ld flags specific to ROM image
  124. #     RES_LDFLAGS ld flags specific to resident ROM image
  125. #     MACH_EXTRA extra modules for all boot/vxWorks images
  126. #     BOOT_EXTRA extra modules for compressed images only
  127. #     RELEASE images made as part of WRS release step
  128. #     OBJCOPY_OLD_OMF objcopy options to convert to an old OMF
  129. #
  130. # CONSTANTS
  131. #     CPU               cpu type
  132. #*/
  133. ################################################################################
  134. #
  135. # Dependency search path of .a files
  136. #
  137. vpath %.a $(subst -L,,$(LD_LINK_PATH))
  138. ################################################################################
  139. #
  140. # meta build targets
  141. #
  142. ## make will default to "exe"
  143. exe : vxWorks
  144. release : $(RELEASE)
  145. # Use the default tool, build a project with just the one default build spec
  146. # For backward compatibility purposes.
  147. bsp2prj prj_default_one: 
  148. $(TCL) $(WIND_BASE)/host/src/hutils/bsp2prj.tcl $(CPU) $(TOOL)
  149. # Do all 4 build specs using the default TOOL
  150. prj_default:
  151. $(TCL) $(WIND_BASE)/host/src/hutils/bsp2prj.tcl $(CPU) 
  152. $(TOOL) all
  153. # prj_gnu_all - ignore the default TOOL, use gnu to build all 4 build specs
  154. #
  155. # Have to clear MAKEFLAGS so subsequent makes won't pick up any conflicting
  156. # values.
  157. prj_gnu prj_gnu_all:
  158. MAKEFLAGS= $(TCL) $(WIND_BASE)/host/src/hutils/bsp2prj.tcl $(CPU) 
  159. $(subst diab,gnu,$(TOOL)) all
  160. # prj_gnu_def - ignore the default TOOL, use gnu to build one build spec
  161. #
  162. # Have to clear MAKEFLAGS so subsequent makes won't pick up any conflicting
  163. # values.
  164. prj_gnu_def:
  165. MAKEFLAGS= $(TCL) $(WIND_BASE)/host/src/hutils/bsp2prj.tcl $(CPU) 
  166. $(subst diab,gnu,$(TOOL))
  167. # prj_diab_all - ignore the default TOOL, use diab to build all 4 build specs. 
  168. #
  169. # Have to clear MAKEFLAGS so subsequent makes won't pick up any conflicting
  170. # values.
  171. prj_diab prj_diab_all:
  172. MAKEFLAGS= $(TCL) $(WIND_BASE)/host/src/hutils/bsp2prj.tcl $(CPU) 
  173. $(subst gnu,diab,$(TOOL)) all
  174. # prj_diab_def - ignore the default TOOL, use diab to build one build spec. 
  175. #
  176. # Have to clear MAKEFLAGS so subsequent makes won't pick up any conflicting
  177. # values.
  178. prj_diab_def:
  179. MAKEFLAGS= $(TCL) $(WIND_BASE)/host/src/hutils/bsp2prj.tcl $(CPU) 
  180. $(subst gnu,diab,$(TOOL))
  181. # clean up temp files in projects
  182. clean_prj:
  183. - MAKEFLAGS= $(TCL) $(WIND_BASE)/host/src/hutils/bsp2prj.tcl $(CPU) 
  184. $(subst gnu,diab,$(TOOL)) clean
  185. - MAKEFLAGS= $(TCL) $(WIND_BASE)/host/src/hutils/bsp2prj.tcl $(CPU) 
  186. $(subst diab,gnu,$(TOOL)) clean
  187. # clean up temp files in BSP directory
  188. clean_cmdLine:
  189. - $(RM) *.o
  190. - $(RM) *.rpo 
  191. - $(RM) ctdt.c 
  192. - $(RM) symTbl.c
  193. # clean up everything in BSP for a fresh rebuild
  194. clean   : clean_cmdLine
  195. - $(RM) vxWorks* 
  196. - $(RM) bootrom* 
  197. - $(RM) depend.$(BSP_NAME)
  198. # clean up all temp files from a release view
  199. clean_release: clean_cmdLine clean_prj
  200. ifeq ($(IMPLICIT_RULE_S_O),)
  201. .s.o :
  202. @ $(RM) $@
  203. $(CC) $(CFLAGS_AS) $(OPTION_OBJECT_ONLY) -o $@ $< 
  204. endif
  205. ifeq ($(IMPLICIT_RULE_C_O),)
  206. .c.o :
  207. @ $(RM) $@
  208. $(CC) $(CFLAGS) $(OPTION_OBJECT_ONLY) $<
  209. endif
  210. ifeq ($(IMPLICIT_RULE_CXX_O),)
  211. # rule for munchless C++ compiles
  212. .cpp.o :
  213. @ $(RM) $@
  214. $(CXX) $(C++FLAGS) $(OPTION_OBJECT_ONLY) $<
  215. .cxx.o :
  216. @ $(RM) $@
  217. $(CXX) $(C++FLAGS) $(OPTION_OBJECT_ONLY) $<
  218. .cc.o :
  219. @ $(RM) $@
  220. $(CXX) $(C++FLAGS) $(OPTION_OBJECT_ONLY) $<
  221. # C++ compile and munch
  222. .cpp.out :
  223. @ $(RM) $@
  224. $(CXX) $(C++FLAGS) $(OPTION_OBJECT_ONLY) $<
  225. @ $(RM) $@ ctdt.c
  226. $(NM) $*.o | $(MUNCH) > ctdt.c
  227. $(MAKE) CC_COMPILER="$(OPTION_DOLLAR_SYMBOLS)" ctdt.o
  228. $(LD_PARTIAL) $(LD_PARTIAL_LAST_FLAGS) -o $@ $*.o ctdt.o
  229. @ $(RM) ctdt.c ctdt.o
  230. .cxx.out :
  231. @ $(RM) $@
  232. $(CXX) $(C++FLAGS) $(OPTION_OBJECT_ONLY) $<
  233. @ $(RM) $@ ctdt.c
  234. $(NM) $*.o | $(MUNCH) > ctdt.c
  235. $(MAKE) CC_COMPILER="$(OPTION_DOLLAR_SYMBOLS)" ctdt.o
  236. $(LD_PARTIAL) $(LD_PARTIAL_LAST_FLAGS) -o $@ $*.o ctdt.o
  237. @ $(RM) ctdt.c ctdt.o
  238. .cc.out :
  239. @ $(RM) $@
  240. $(CXX) $(C++FLAGS) $(OPTION_OBJECT_ONLY) $<
  241. @ $(RM) $@ ctdt.c
  242. $(NM) $*.o | $(MUNCH) > ctdt.c
  243. $(MAKE) CC_COMPILER="$(OPTION_DOLLAR_SYMBOLS)" ctdt.o
  244. $(LD_PARTIAL) $(LD_PARTIAL_LAST_FLAGS) -o $@ $*.o ctdt.o
  245. @ $(RM) ctdt.c ctdt.o
  246. endif
  247. ################################################################################
  248. #
  249. # machine dependent targets
  250. romInit_res.o: depend.$(BSP_NAME) romInit.s romInit.o
  251. - @ $(RM) $@
  252. $(CC) $(CFLAGS_AS) -DROM_RESIDENT $(OPTION_OBJECT_ONLY) -o $@ romInit.s
  253. romInit_res_low.o: depend.$(BSP_NAME) romInit.s romInit.o
  254. - @ $(RM) $@
  255. $(CC) $(CFLAGS_AS) -DROM_RESIDENT 
  256.     -DRAM_DST_ADRS=0x$(RAM_LOW_ADRS) $(OPTION_OBJECT_ONLY) -o $@ romInit.s
  257. romInit_res_high.o: depend.$(BSP_NAME) romInit.s romInit.o
  258. - @ $(RM) $@
  259. $(CC) $(CFLAGS_AS) -DROM_RESIDENT 
  260.     -DRAM_DST_ADRS=0x$(RAM_HIGH_ADRS) $(OPTION_OBJECT_ONLY) -o $@ romInit.s
  261. usrConfig.o : depend.$(BSP_NAME) $(USRCONFIG)
  262. - @ $(RM) $@
  263. $(CC) $(OPTION_OBJECT_ONLY) $(CFLAGS) $(USRCONFIG) -o $@
  264. usrConfig_st.o : depend.$(BSP_NAME) $(USRCONFIG) usrConfig.o
  265. - @ $(RM) $@
  266. $(CP) $(USRCONFIG) usrConfig_st.c
  267. $(CC) $(OPTION_OBJECT_ONLY) $(CFLAGS) -DSTANDALONE usrConfig_st.c
  268. - @ $(RM) usrConfig_st.c
  269. bootConfig.o : depend.$(BSP_NAME) $(BOOTCONFIG)
  270. - @ $(RM) $@
  271. $(CC) $(OPTION_OBJECT_ONLY) $(CFLAGS) $(BOOTCONFIG_FLAGS) $(BOOTCONFIG)
  272. # Use CFLAGS_PIC for all non-rom-resident bootInit objects
  273. bootInit.o : depend.$(BSP_NAME) $(BOOTINIT)
  274. - @ $(RM) $@
  275. $(CC) $(OPTION_OBJECT_ONLY) $(CFLAGS_PIC) $(BOOTINIT)
  276. bootInit_res.o : depend.$(BSP_NAME) $(BOOTINIT) bootInit.o
  277. - @ $(RM) $@
  278. $(CP) $(BOOTINIT) bootInit_res.c
  279. $(CC) $(OPTION_OBJECT_ONLY) $(CFLAGS) -DROM_RESIDENT bootInit_res.c
  280. - @ $(RM) bootInit_res.c
  281. bootInit_res_low.o : depend.$(BSP_NAME) $(BOOTINIT)
  282. - @ $(RM) $@
  283. $(CP) $(BOOTINIT) bootInit_res_low.c
  284. $(CC) $(OPTION_OBJECT_ONLY) $(CFLAGS) -DROM_RESIDENT 
  285.     -DRAM_DST_ADRS=0x$(RAM_LOW_ADRS) bootInit_res_low.c
  286. - @ $(RM) bootInit_res_low.c
  287. bootInit_res_high.o : depend.$(BSP_NAME) $(BOOTINIT)
  288. - @ $(RM) $@
  289. $(CP) $(BOOTINIT) bootInit_res_high.c
  290. $(CC) $(OPTION_OBJECT_ONLY) $(CFLAGS) -DROM_RESIDENT 
  291.     -DRAM_DST_ADRS=0x$(RAM_HIGH_ADRS) bootInit_res_high.c
  292. - @ $(RM) bootInit_res_high.c
  293. bootInit_uncmp.o : depend.$(BSP_NAME) $(BOOTINIT) bootInit.o
  294. - @ $(RM) $@
  295. $(CP) $(BOOTINIT) bootInit_uncmp.c
  296. $(CC) $(OPTION_OBJECT_ONLY) $(CFLAGS_PIC) -DUNCOMPRESS bootInit_uncmp.c
  297. - @ $(RM) bootInit_uncmp.c
  298. bootInit_st.o : depend.$(BSP_NAME) $(BOOTINIT) bootInit.o
  299. - @ $(RM) $@
  300. $(CP) $(BOOTINIT) bootInit_st.c
  301. $(CC) $(OPTION_OBJECT_ONLY) $(CFLAGS_PIC) -DRAM_DST_ADRS=0x$(RAM_LOW_ADRS) bootInit_st.c
  302. - @ $(RM) bootInit_st.c
  303. bootInit_uncmp_res.o : depend.$(BSP_NAME) $(BOOTINIT) bootInit.o
  304. - @ $(RM) $@
  305. $(CP) $(BOOTINIT) bootInit_uncmp_res.c
  306. $(CC) $(OPTION_OBJECT_ONLY) $(CFLAGS) -DROM_RESIDENT -DUNCOMPRESS bootInit_uncmp_res.c
  307. - @ $(RM) bootInit_uncmp_res.c
  308. dataSegPad.o: depend.$(BSP_NAME) $(DATASEGPAD) $(CONFIG_ALL_H) config.h
  309. - @ $(RM) $@
  310. $(CC) $(OPTION_OBJECT_ONLY) $(CFLAGS) $(DATASEGPAD) -o $@
  311. ################################################################################
  312. #
  313. # 3 rules for objcopy flags: START_FLAGS & HEX_FLAGS, NO_VMA_FLAGS, VMA_FLAGS
  314. # 1st rule: if NO_VMA_FLAGS==VMA_FLAGS(==0), create final output file.
  315. ifeq ($(strip $(NO_VMA_FLAGS)),$(strip $(VMA_FLAGS)))
  316.         BINHEX_OUTPUT_FILE = $@
  317. else
  318.         BINHEX_OUTPUT_FILE = out.tmp1
  319. endif
  320.  
  321. # 2nd rule: if NO_VMA_FLAGS!=0 && VMA_FLAGS==0, create final output file.
  322. # Note: NO_VMA_FLAGS!=0 will be tested each time.
  323. ifeq ($(strip $(VMA_FLAGS)),)
  324.         BINCONV_OUTPUT_FILE = $@
  325. else
  326.         BINCONV_OUTPUT_FILE = out.tmp2
  327. endif
  328.  
  329. # 3rd rule: if VMA_FLAGS!=0 && NO_VMA_FLAGS==0, use out.tmp1 else out.tmp2.
  330. # Note: VMA_FLAGS!=0 will be tested each time.
  331. ifeq ($(strip $(NO_VMA_FLAGS)),)
  332.         BINCONV_INPUT_FILE = out.tmp1
  333. else
  334.         BINCONV_INPUT_FILE = out.tmp2
  335. endif
  336. ################################## vxWorks #####################################
  337. #
  338. # vxWorks     - normal vxWorks system
  339. # vxWorks.sym - symbol table of vxWorks
  340. vxWorks vxWorks.sym : depend.$(BSP_NAME) usrConfig.o dataSegPad.o 
  341. $(MACH_DEP) $(LDDEPS) $(patsubst -l%,lib%.a,$(LIBS)) $(CC_LIB)
  342. - @ $(RM) vxWorks vxWorks.sym
  343. - @ $(RM) version.o
  344. - @ $(RM) vxWorks.tmp ctdt.c ctdt.o
  345. $(CC) $(OPTION_OBJECT_ONLY) $(CFLAGS) -o version.o $(CONFIG_ALL)/version.c
  346. $(LD_PARTIAL) 
  347.     -o vxWorks.tmp $(MACH_DEP) usrConfig.o version.o 
  348.     $(LD_PARTIAL_START_GROUP) $(LD_LINK_PATH) $(LIBS) 
  349.     $(LD_PARTIAL_END_GROUP) $(CC_LIB)
  350. $(NM) vxWorks.tmp | $(MUNCH) > ctdt.c
  351. $(MAKE) CC_COMPILER="$(OPTION_DOLLAR_SYMBOLS)" ctdt.o
  352. $(LD) $(LDFLAGS) $(LD_ENTRY_OPT) $(SYS_ENTRY) $(LD_LOW_FLAGS) 
  353.     -o vxWorks dataSegPad.o vxWorks.tmp ctdt.o $(LD_SCRIPT_RAM)
  354. - @ $(RM) vxWorks.tmp
  355. $(LDOUT_HOST) vxWorks
  356. $(LDOUT_CONV) vxWorks
  357. $(BINXSYM) vxWorks vxWorks.sym
  358. $(LDOUT_SYMS) vxWorks.sym
  359. $(VXSIZEPROG) -v $(RAM_HIGH_ADRS) $(RAM_LOW_ADRS) vxWorks
  360. # vxWorks_rom - rommable version of VxWorks (without standalone symbol table)
  361. #   This is typically used when making an application in ROM that doesn't
  362. #   include the shell and the symbol table.  Since these applications are
  363. #   usually smaller, this version doesn't use ROM compression.
  364. vxWorks_rom : depend.$(BSP_NAME) bootInit_uncmp.o romInit.o 
  365. dataSegPad.o usrConfig.o $(MACH_DEP) $(LDDEPS) 
  366. $(patsubst -l%,lib%.a,$(LIBS)) $(CC_LIB)
  367. - @ $(RM) $@ 
  368. - @ $(RM) $(IMI) 
  369. - @ $(RM) $(IBR)
  370. - @ $(RM) version.o
  371. - @ $(RM) ctmp.o ctdt.c ctdt.o
  372. $(CC) $(OPTION_OBJECT_ONLY) $(CFLAGS) -o version.o $(CONFIG_ALL)/version.c
  373. $(LD_PARTIAL) 
  374.     -o ctmp.o usrConfig.o 
  375.     $(MACH_DEP) version.o $(LD_PARTIAL_START_GROUP) $(LD_LINK_PATH) 
  376.     $(LIBS) $(LD_PARTIAL_END_GROUP) $(CC_LIB)
  377. $(NM) ctmp.o | $(MUNCH) > ctdt.c
  378. $(MAKE) CC_COMPILER="$(OPTION_DOLLAR_SYMBOLS)" ctdt.o
  379. $(LD) $(LDFLAGS) $(LD_ENTRY_OPT) $(ROM_ENTRY) $(LD_LOW_FLAGS) 
  380.     -o $@ romInit.o bootInit_uncmp.o dataSegPad.o 
  381.     ctmp.o ctdt.o $(LD_SCRIPT_RAM)
  382. - @ $(RM) ctmp.o
  383. $(LDOUT_HOST) $@
  384. $(ROMSIZEPROG) -b $(ROM_SIZE) $@
  385. $(LDOUT_CONV) $@
  386. vxWorks_rom.hex : depend.$(BSP_NAME) vxWorks_rom $(IMI)
  387. - @ $(RM) vxWorks_rom.tmp*
  388. - @ $(RM) out.tmp*
  389. $(BINHEX) $(START_FLAGS) $(HEX_FLAGS) 
  390.     $(SECT_SPEC)vxWorks_rom$(TXT_OFFSET) $(BINHEX_OUTPUT_FILE)
  391. ifneq ($(strip $(NO_VMA_FLAGS)),)
  392. $(BINCONV) $(NO_VMA_FLAGS) out.tmp1 $(BINCONV_OUTPUT_FILE)
  393. endif
  394. ifneq ($(strip $(VMA_FLAGS)),)
  395. $(BINCONV) $(VMA_FLAGS) $(BINCONV_INPUT_FILE) $@$(MAP_EXT)
  396. endif
  397. - @ $(RM) vxWorks_rom.tmp*
  398. - @ $(RM) out.tmp*
  399. - @ $(MV_BIN)
  400. # vxWorks.st - standalone VxWorks with symbol table linked in
  401. #   This builds a VxWorks image that contains the symbol table linked in,
  402. #   instead of loading it over the network.
  403. vxWorks.st : depend.$(BSP_NAME) usrConfig_st.o dataSegPad.o 
  404. $(MACH_DEP) $(LDDEPS) $(patsubst -l%,lib%.a,$(LIBS)) 
  405. $(CC_LIB)
  406. - @ $(RM) $@ 
  407. - @ $(RM) symTbl.c 
  408. - @ $(RM) symTbl.o 
  409. - @ $(RM) tmp.o 
  410. - @ $(RM) tmp.2
  411. - @ $(RM) version.o
  412. - @ $(RM) ctdt.c ctdt.o
  413. $(CC) $(OPTION_OBJECT_ONLY) $(CFLAGS) -o version.o $(CONFIG_ALL)/version.c
  414. $(LD_PARTIAL) -o tmp.o dataSegPad.o $(MACH_DEP) 
  415.     usrConfig_st.o version.o $(LD_PARTIAL_START_GROUP) $(LD_LINK_PATH) 
  416.     $(LIBS) $(LD_PARTIAL_END_GROUP) $(CC_LIB)
  417. $(NM) tmp.o | $(MUNCH) >ctdt.c
  418. $(MAKE) CC_COMPILER="$(OPTION_DOLLAR_SYMBOLS)" ctdt.o
  419. $(CP) tmp.o tmp.2
  420. $(LDOUT_SYMS) tmp.o
  421. $(MKSYMTBL) tmp.o symTbl.c
  422. $(COMPILE_SYMTBL) symTbl.c
  423. $(LD) $(LDFLAGS) $(LD_ENTRY_OPT) $(SYS_ENTRY) $(LD_LOW_FLAGS) 
  424.     -o $@ tmp.2 symTbl.o ctdt.o $(LD_SCRIPT_RAM)
  425. $(LDOUT_SYMS) $@
  426. $(LDOUT_CONV) $@
  427. $(VXSIZEPROG) -v $(RAM_HIGH_ADRS) $(RAM_LOW_ADRS) vxWorks.st
  428. - @ $(RM) tmp.?  
  429. # vxWorks.st_rom - rommable standalone version using ROM compression
  430. #   This builds a standalone VxWorks image that can be put in ROM.
  431. #   It includes a linked in symbol table so that a complete VxWorks with
  432. #   shell and symbol table can be put in ROM.  Since these systems tend to
  433. #   be larger, ROM compression is used.
  434. #   This rule also creates vxImage.o for use as a "core" file (to provide
  435. #   a symbol table) for the target server.
  436. #   Note: this uses larger EEPROMs, the user is advised to check the
  437. #   macros for ROM sizes and offsets for compatibility.
  438. vxWorks.st.Z.s : depend.$(BSP_NAME) usrConfig_st.o dataSegPad.o 
  439. $(MACH_DEP) $(LDDEPS) $(patsubst -l%,lib%.a,$(LIBS)) 
  440. $(CC_LIB)
  441. - @ $(RM) $@ 
  442. - @ $(RM) tmp.o 
  443. - @ $(RM) tmp.1 
  444. - @ $(RM) tmp.2 
  445. - @ $(RM) tmp.3 
  446. - @ $(RM) tmp.Z 
  447. - @ $(RM) symTbl.c 
  448. - @ $(RM) symTbl.o
  449. - @ $(RM) version.o
  450. - @ $(RM) ctdt.c ctdt.o
  451. $(CC) $(OPTION_OBJECT_ONLY) $(CFLAGS) -o version.o $(CONFIG_ALL)/version.c
  452. $(LD_PARTIAL) -o tmp.1 dataSegPad.o $(MACH_DEP) 
  453.     usrConfig_st.o version.o $(LD_PARTIAL_START_GROUP) $(LD_LINK_PATH) 
  454.     $(LIBS) $(LD_PARTIAL_END_GROUP) $(CC_LIB)
  455. $(NM) tmp.1 | $(MUNCH) >ctdt.c
  456. $(MAKE) CC_COMPILER="$(OPTION_DOLLAR_SYMBOLS)" ctdt.o
  457. $(CP) tmp.1 tmp.o
  458. $(LDOUT_SYMS) tmp.o
  459. $(MKSYMTBL) tmp.o symTbl.c
  460. $(COMPILE_SYMTBL) symTbl.c
  461. $(LD) -o tmp.2 $(LDFLAGS) $(ROM_LDFLAGS) $(LD_ENTRY_OPT) $(SYS_ENTRY) 
  462.     $(LD_LOW_FLAGS) tmp.1 symTbl.o ctdt.o $(LD_SCRIPT_RAM)
  463. $(CP) tmp.2 vxImage.o
  464. $(LDOUT_HOST) tmp.2
  465. $(LDOUT_CONV) tmp.2
  466. $(EXTRACT_BIN) tmp.2 tmp.3
  467. $(COMPRESS) < tmp.3 >tmp.Z
  468. $(BINTOASM) tmp.Z > $@
  469. - @ $(RM) tmp.?
  470. vxWorks.st_rom : depend.$(BSP_NAME) bootInit_st.o romInit.o 
  471. vxWorks.st.Z.o $(LDDEPS) 
  472. $(patsubst -l%,lib%.a,$(LIBS)) $(CC_LIB) $(BOOT_EXTRA)
  473. - @ $(RM) $(IMI) 
  474. - @ $(RM) $(IBR)
  475. - @ $(RM) version.o
  476. $(CC) $(OPTION_OBJECT_ONLY) $(CFLAGS) -o version.o $(CONFIG_ALL)/version.c
  477. $(LD) $(LDFLAGS) $(LD_ENTRY_OPT) $(ROM_ENTRY) $(LD_HIGH_FLAGS) 
  478.     -o $@ romInit.o bootInit_st.o version.o $(BOOT_EXTRA) 
  479. $(LD_START_GROUP) $(LD_LINK_PATH) $(LIBS) $(LD_END_GROUP) 
  480. $(CC_LIB) vxWorks.st.Z.o $(LD_SCRIPT_RAM)
  481. $(ROMSIZEPROG) -b $(ROM_SIZE) $@
  482. $(LDOUT_CONV) $@
  483. $(POST_BUILD_RULE)
  484. vxWorks.st_rom.hex : depend.$(BSP_NAME) vxWorks.st_rom $(IMI)
  485. - @ $(RM) $@
  486. - @ $(RM) vxWorks.st_rom.tmp*
  487. - @ $(RM) out.tmp*
  488. $(BINHEX)  $(START_FLAGS) $(HEX_FLAGS) 
  489.     $(SECT_SPEC)vxWorks.st_rom$(TXT_OFFSET) $(BINHEX_OUTPUT_FILE)
  490. ifneq ($(strip $(NO_VMA_FLAGS)),)
  491. $(BINCONV) $(NO_VMA_FLAGS) out.tmp1 $(BINCONV_OUTPUT_FILE)
  492. endif
  493. ifneq ($(strip $(VMA_FLAGS)),)
  494. $(BINCONV) $(VMA_FLAGS) $(BINCONV_INPUT_FILE) $@$(MAP_EXT)
  495. endif
  496. - @ $(RM) vxWorks.st_rom.tmp*
  497. - @ $(RM) out.tmp*
  498. - @ $(MV_BIN)
  499. # vxWorks.res_rom - rommable standalone version without compression
  500. #   This builds a standalone VxWorks image that can be put in ROM.
  501. #   It includes a linked in symbol table so that a complete VxWorks with
  502. #   shell and symbol table can be put in ROM. Only the data segment
  503. #   of this ROM image is copied into RAM.
  504. vxWorks.res_rom: depend.$(BSP_NAME) bootInit_res.o romInit_res.o 
  505. usrConfig_st.o $(MACH_DEP) $(LDDEPS) 
  506. $(patsubst -l%,lib%.a,$(LIBS)) $(CC_LIB)
  507. - @ $(RM) $@ tmp.o 
  508. - @ $(RM) tmp.1 
  509. - @ $(RM) symTbl.c 
  510. - @ $(RM) symTbl.o 
  511. - @ $(RM) $(IMI) 
  512. - @ $(RM) $(IBR)
  513. - @ $(RM) version.o
  514. - @ $(RM) ctdt.c ctdt.o
  515. $(CC) $(OPTION_OBJECT_ONLY) $(CFLAGS) -o version.o $(CONFIG_ALL)/version.c
  516. $(LD_PARTIAL) -o tmp.o 
  517.     $(MACH_DEP) usrConfig_st.o version.o 
  518.     $(LD_PARTIAL_START_GROUP) $(LD_LINK_PATH) $(LIBS) 
  519.     $(LD_PARTIAL_END_GROUP) $(CC_LIB)
  520. $(NM) tmp.o | $(MUNCH) > ctdt.c
  521. $(MAKE) CC_COMPILER="$(OPTION_DOLLAR_SYMBOLS)" ctdt.o
  522. $(CP) tmp.o tmp.1
  523. $(LDOUT_SYMS) tmp.1
  524. $(MKSYMTBL) tmp.1 symTbl.c
  525. $(COMPILE_SYMTBL) symTbl.c
  526. $(LD) -o $@ $(LDFLAGS) $(RES_LDFLAGS) $(ROM_LDFLAGS) $(LD_ENTRY_OPT) 
  527.     $(ROM_ENTRY) $(RES_LOW_FLAGS) romInit_res.o bootInit_res.o symTbl.o 
  528.     tmp.o $(LD_START_GROUP) $(LD_LINK_PATH) $(LIBS) $(LD_END_GROUP) 
  529.     $(CC_LIB) ctdt.o $(LD_SCRIPT_ROM)
  530. $(LDOUT_HOST) $@
  531. $(ROMSIZEPROG) -b $(ROM_SIZE) $@
  532. $(LDOUT_CONV) $@
  533. - @ $(RM) tmp.? 
  534. vxWorks.res_rom_res_low: depend.$(BSP_NAME) bootInit_res_low.o 
  535. romInit_res_low.o usrConfig_st.o $(MACH_DEP) $(LDDEPS) 
  536. $(patsubst -l%,lib%.a,$(LIBS)) $(CC_LIB)
  537. - @ $(RM) $@ 
  538. - @ $(RM) tmp.o 
  539. - @ $(RM) tmp.1 
  540. - @ $(RM) symTbl.c 
  541. - @ $(RM) symTbl.o 
  542. - @ $(RM) $(IMI) 
  543. - @ $(RM) $(IBR)
  544. - @ $(RM) version.o
  545. - @ $(RM) ctdt.c ctdt.o
  546. $(CC) $(OPTION_OBJECT_ONLY) $(CFLAGS) -o version.o $(CONFIG_ALL)/version.c
  547. $(LD_PARTIAL) -o tmp.o 
  548.     $(MACH_DEP) usrConfig_st.o version.o 
  549.     $(LD_PARTIAL_START_GROUP) $(LD_LINK_PATH) $(LIBS) 
  550.     $(LD_PARTIAL_END_GROUP) $(CC_LIB)
  551. $(NM) tmp.o | $(MUNCH) >ctdt.c
  552. $(MAKE) CC_COMPILER="$(OPTION_DOLLAR_SYMBOLS)" ctdt.o
  553. $(CP) tmp.o tmp.1
  554. $(LDOUT_SYMS) tmp.1
  555. $(MKSYMTBL) tmp.1 symTbl.c
  556. $(COMPILE_SYMTBL) symTbl.c
  557. $(LD) -o $@ $(LDFLAGS) $(RES_LDFLAGS) $(ROM_LDFLAGS) $(LD_ENTRY_OPT) 
  558.     $(ROM_ENTRY) $(RES_LOW_FLAGS) romInit_res_low.o bootInit_res_low.o 
  559.     symTbl.o tmp.o ctdt.o $(LD_SCRIPT_ROM)
  560. $(LDOUT_HOST) $@
  561. $(ROMSIZEPROG) -b $(ROM_SIZE) $@
  562. $(LDOUT_CONV) $@
  563. - @ $(RM) tmp.? 
  564. vxWorks.res_rom.hex: depend.$(BSP_NAME) vxWorks.res_rom $(IMI)
  565. - @ $(RM) $@
  566. - @ $(RM) vxWorks.res_rom.tmp*
  567. - @ $(RM) out.tmp*
  568. $(BINHEX) $(START_FLAGS) $(HEX_FLAGS) 
  569.     $(SECT_SPEC)vxWorks.res_rom$(TXT_OFFSET) $(BINHEX_OUTPUT_FILE)
  570. ifneq ($(strip $(NO_VMA_FLAGS)),)
  571. $(BINCONV) $(NO_VMA_FLAGS) out.tmp1 $(BINCONV_OUTPUT_FILE)
  572. endif
  573. ifneq ($(strip $(VMA_FLAGS)),)
  574. $(BINCONV) $(VMA_FLAGS) $(BINCONV_INPUT_FILE) $@$(MAP_EXT)
  575. endif
  576. - @ $(RM) vxWorks.res_rom.tmp*
  577. - @ $(RM) out.tmp*
  578. - @ $(MV_BIN)
  579. vxWorks.res_rom_res_low.hex: depend.$(BSP_NAME) vxWorks.res_rom_res_low $(IMI)
  580. - @ $(RM) $@
  581. - @ $(RM) vxWorks.tmp*
  582. - $(RM) out.tmp*
  583. $(BINHEX) $(START_FLAGS) $(HEX_FLAGS) 
  584.      vxWorks.res_rom_res_low$(TXT_OFFSET) $(BINHEX_OUTPUT_FILE)
  585. ifneq ($(strip $(NO_VMA_FLAGS)),)
  586. $(BINCONV) $(NO_VMA_FLAGS) out.tmp1 $(BINCONV_OUTPUT_FILE)
  587. endif
  588. ifneq ($(strip $(VMA_FLAGS)),)
  589. $(BINCONV) $(VMA_FLAGS) $(BINCONV_INPUT_FILE) $@$(MAP_EXT)
  590. endif
  591. - @ $(RM) vxWorks.tmp*
  592. - $(RM) out.tmp*
  593. - @ $(MV_BIN)
  594. # vxWorks.res_rom_nosym - rommable standalone version without symbol table
  595. #   This builds a standalone VxWorks image that can be put in ROM.
  596. #   There is no symbol table. Only the data segment
  597. #   of this ROM image is copied into RAM.
  598. vxWorks.res_rom_nosym: depend.$(BSP_NAME) bootInit_res.o romInit_res.o 
  599. usrConfig.o $(MACH_DEP) $(LDDEPS) 
  600. $(patsubst -l%,lib%.a,$(LIBS)) $(CC_LIB)
  601. - @ $(RM) $@ tmp.o 
  602. - @ $(RM) tmp.1 
  603. - @ $(RM) symTbl.c 
  604. - @ $(RM) symTbl.o 
  605. - @ $(RM) $(IMI) 
  606. - @ $(RM) $(IBR)
  607. - @ $(RM) version.o
  608. - @ $(RM) ctmp.o ctdt.c ctdt.o
  609. $(CC) $(OPTION_OBJECT_ONLY) $(CFLAGS) -o version.o $(CONFIG_ALL)/version.c
  610. $(LD_PARTIAL) -o ctmp.o $(LDFLAGS) usrConfig.o 
  611.     $(MACH_DEP) version.o $(LD_PARTIAL_START_GROUP) $(LD_LINK_PATH) 
  612.     $(LIBS) $(LD_PARTIAL_END_GROUP) $(CC_LIB)
  613. $(NM) ctmp.o | $(MUNCH) >ctdt.c
  614. $(MAKE) CC_COMPILER="$(OPTION_DOLLAR_SYMBOLS)" ctdt.o
  615. $(LD) -o $@ $(LDFLAGS) $(RES_LDFLAGS) $(ROM_LDFLAGS) $(LD_ENTRY_OPT) 
  616.     $(ROM_ENTRY) $(RES_LOW_FLAGS) romInit_res.o bootInit_res.o 
  617.     ctmp.o ctdt.o $(LD_SCRIPT_ROM)
  618. - @ $(RM) ctmp.o
  619. $(LDOUT_HOST) $@
  620. $(ROMSIZEPROG) -b $(ROM_SIZE) $@
  621. $(LDOUT_CONV) $@
  622. vxWorks.res_rom_nosym.hex: depend.$(BSP_NAME) vxWorks.res_rom_nosym $(IMI)
  623. - @ $(RM) $@
  624. - @ $(RM) vxWorks.tmp*
  625. - @ $(RM) out.tmp*
  626. $(BINHEX) $(START_FLAGS) $(HEX_FLAGS) 
  627.     vxWorks.res_rom_nosym$(TXT_OFFSET) $(BINHEX_OUTPUT_FILE)
  628. ifneq ($(strip $(NO_VMA_FLAGS)),)
  629. $(BINCONV) $(NO_VMA_FLAGS) out.tmp1 $(BINCONV_OUTPUT_FILE)
  630. endif
  631. ifneq ($(strip $(VMA_FLAGS)),)
  632. $(BINCONV) $(VMA_FLAGS) $(BINCONV_INPUT_FILE) $@$(MAP_EXT)
  633. endif
  634. - @ $(RM) vxWorks.tmp*
  635. - @ $(RM) out.tmp*
  636. - @ $(MV_BIN)
  637. vxWorks.res_rom_nosym_res_low: depend.$(BSP_NAME) bootInit_res_low.o 
  638. romInit_res_low.o usrConfig.o $(MACH_DEP) $(LDDEPS) 
  639. $(patsubst -l%,lib%.a,$(LIBS)) $(CC_LIB)
  640. - @ $(RM) $@ 
  641. - @ $(RM) tmp.o 
  642. - @ $(RM) tmp.1 
  643. - @ $(RM) symTbl.c 
  644. - @ $(RM) symTbl.o 
  645. - @ $(RM) $(IMI) 
  646. - @ $(RM) $(IBR)
  647. - @ $(RM) version.o
  648. - @ $(RM) ctmp.o ctdt.c ctdt.o
  649. $(CC) $(OPTION_OBJECT_ONLY) $(CFLAGS) -o version.o $(CONFIG_ALL)/version.c
  650. $(LD_PARTIAL) -o ctmp.o usrConfig.o 
  651.     $(MACH_DEP) version.o $(LD_PARTIAL_START_GROUP) $(LD_LINK_PATH) 
  652.     $(LIBS) $(LD_PARTIAL_END_GROUP) $(CC_LIB)
  653. $(NM) ctmp.o | $(MUNCH) >ctdt.c
  654. $(MAKE) CC_COMPILER="$(OPTION_DOLLAR_SYMBOLS)" ctdt.o
  655. $(LD) -o $@ $(LDFLAGS) $(RES_LDFLAGS) $(ROM_LDFLAGS) $(LD_ENTRY_OPT) 
  656.     $(ROM_ENTRY) $(RES_LOW_FLAGS) romInit_res_low.o bootInit_res_low.o 
  657.     ctmp.o ctdt.o $(LD_SCRIPT_ROM)
  658. - @ $(RM) ctmp.o
  659. $(ROMSIZEPROG) -b $(ROM_SIZE) $@
  660. $(LDOUT_CONV) $@
  661. - @ $(RM) tmp.? 
  662. vxWorks.res_rom_nosym_res_low.hex: depend.$(BSP_NAME) 
  663. vxWorks.res_rom_nosym_res_low $(IMI)
  664. - @ $(RM) $@
  665. - @ $(RM) vxWorks.tmp*
  666. - @ $(RM) out.tmp*
  667. $(BINHEX) $(START_FLAGS) $(HEX_FLAGS) 
  668.     vxWorks.res_rom_nosym_res_low$(TXT_OFFSET) $(BINHEX_OUTPUT_FILE)
  669. ifneq ($(strip $(NO_VMA_FLAGS)),)
  670. $(BINCONV) $(NO_VMA_FLAGS) out.tmp1 $(BINCONV_OUTPUT_FILE)
  671. endif
  672. ifneq ($(strip $(VMA_FLAGS)),)
  673. $(BINCONV) $(VMA_FLAGS) $(BINCONV_INPUT_FILE) $@$(MAP_EXT)
  674. endif
  675. - @ $(RM) vxWorks.tmp*
  676. - @ $(RM) out.tmp*
  677. - @ $(MV_BIN)
  678. ################################# bootrom ######################################
  679. #
  680. # bootrom - compressed bootrom object module
  681. # bootrom.hex - compressed bootrom hex format
  682. # bootrom_uncmp - noncompressed bootrom object module
  683. # bootrom_uncmp.hex - noncompressed bootrom hex format
  684. #
  685. # Bootroms do not normally contain static C++ objects. Therefore, the
  686. # rules below do not contain steps to munch VxWorks. If you add static
  687. # objects to your bootrom configuration, you will need to munch your
  688. # bootrom image. See the rules for the vxWorks image, above, for an example.
  689. #
  690. bootrom.Z.s : depend.$(BSP_NAME) bootConfig.o $(MACH_DEP) $(LDDEPS) 
  691. $(patsubst -l%,lib%.a,$(LIBS)) $(CC_LIB)
  692. - @ $(RM) $@ 
  693. - @ $(RM) tmp.o 
  694. - @ $(RM) tmp.out
  695. - @ $(RM) tmp.Z
  696. - @ $(RM) version.o
  697. $(CC) $(OPTION_OBJECT_ONLY) $(CFLAGS) -o version.o 
  698.     $(CONFIG_ALL)/version.c
  699. $(LD) -o tmp.o $(LDFLAGS) $(ROM_LDFLAGS) $(LD_ENTRY_OPT) $(USR_ENTRY) 
  700.     $(LD_HIGH_FLAGS) bootConfig.o version.o $(MACH_DEP) $(CC_LIB) 
  701.     $(LD_START_GROUP) $(LD_LINK_PATH) $(LIBS) $(LD_END_GROUP) 
  702.     $(CC_LIB) $(LD_SCRIPT_RAM)
  703. $(LDOUT_HOST) tmp.o
  704. $(EXTRACT_BIN) tmp.o tmp.out
  705. $(COMPRESS) < tmp.out > tmp.Z
  706. $(BINTOASM) tmp.Z >bootrom.Z.s
  707. - @ $(RM) tmp.o 
  708. - @ $(RM) tmp.out
  709. - @ $(RM) tmp.Z 
  710. bootrom : depend.$(BSP_NAME) bootInit.o romInit.o bootrom.Z.o 
  711. $(LDDEPS) $(patsubst -l%,lib%.a,$(LIBS)) $(CC_LIB) 
  712. $(BOOT_EXTRA)
  713. - @ $(RM) $@ 
  714. - @ $(RM) $(IMI) 
  715. - @ $(RM) $(IBR)
  716. - @ $(RM) version.o
  717. $(CC) $(OPTION_OBJECT_ONLY) $(CFLAGS) -o version.o 
  718. $(CONFIG_ALL)/version.c
  719. $(LD) $(LDFLAGS) $(LD_ENTRY_OPT) $(ROM_ENTRY) $(LD_LOW_FLAGS) 
  720. -o $@ romInit.o bootInit.o version.o $(BOOT_EXTRA) 
  721. bootrom.Z.o $(CC_LIB) 
  722. $(LD_START_GROUP) $(LD_LINK_PATH) $(LIBS) $(LD_END_GROUP) 
  723. $(CC_LIB) $(LD_SCRIPT_RAM)
  724. $(ROMSIZEPROG) -b $(ROM_SIZE) $@
  725. $(LDOUT_CONV) $@
  726. $(POST_BUILD_RULE)
  727. bootrom_uncmp : depend.$(BSP_NAME) bootInit_uncmp.o romInit.o 
  728. bootConfig.o $(MACH_DEP) $(LDDEPS) 
  729. $(patsubst -l%,lib%.a,$(LIBS)) $(CC_LIB)
  730. - @ $(RM) $@ 
  731. - @ $(RM) $(IMI) 
  732. - @ $(RM) $(IBR)
  733. - @ $(RM) version.o
  734. $(CC) $(OPTION_OBJECT_ONLY) $(CFLAGS) -o version.o $(CONFIG_ALL)/version.c
  735. $(LD) $(LDFLAGS) $(ROM_LDFLAGS) $(LD_ENTRY_OPT) $(ROM_ENTRY) 
  736.     $(LD_HIGH_FLAGS) -o $@ romInit.o bootInit_uncmp.o version.o 
  737.     bootConfig.o $(MACH_DEP) $(LD_START_GROUP) $(LD_LINK_PATH) 
  738.     $(LIBS) $(LD_END_GROUP) $(CC_LIB) $(LD_SCRIPT_RAM)
  739. $(ROMSIZEPROG) -b $(ROM_SIZE) $@
  740. $(LDOUT_CONV) $@
  741. bootrom_res : depend.$(BSP_NAME) bootInit_res.o romInit_res.o 
  742. bootConfig.o $(MACH_DEP) $(LDDEPS) 
  743. $(patsubst -l%,lib%.a,$(LIBS)) $(CC_LIB)
  744. - @ $(RM) $@
  745. - @ $(RM) $(IMI)
  746. - @ $(RM) $(IBR)
  747. - @ $(RM) version.o
  748. $(CC) $(OPTION_OBJECT_ONLY) $(CFLAGS) -o version.o $(CONFIG_ALL)/version.c
  749. $(LD) $(LDFLAGS) $(RES_LDFLAGS) $(ROM_LDFLAGS) $(LD_ENTRY_OPT) 
  750.     $(ROM_ENTRY) $(RES_HIGH_FLAGS) -o $@ romInit_res.o bootInit_res.o 
  751.     version.o bootConfig.o $(MACH_DEP) $(LD_START_GROUP) 
  752.     $(LD_LINK_PATH) $(LIBS) $(LD_END_GROUP) $(CC_LIB) $(LD_SCRIPT_ROM)
  753. $(ROMSIZEPROG) -b $(ROM_SIZE) $@
  754. $(LDOUT_CONV) $@
  755. bootrom_res_high : depend.$(BSP_NAME) bootInit_res_high.o 
  756. romInit_res_high.o bootConfig.o $(MACH_DEP) 
  757. $(LDDEPS) $(patsubst -l%,lib%.a,$(LIBS)) $(CC_LIB)
  758. - @ $(RM) $@ 
  759. - @ $(RM) $(IMI) 
  760. - @ $(RM) $(IBR)
  761. - @ $(RM) version.o
  762. $(CC) $(OPTION_OBJECT_ONLY) $(CFLAGS) -o version.o $(CONFIG_ALL)/version.c
  763. $(LD) $(LDFLAGS) $(RES_LDFLAGS) $(ROM_LDFLAGS) $(LD_ENTRY_OPT) 
  764.     $(ROM_ENTRY) $(RES_HIGH_FLAGS) -o $@ romInit_res_high.o 
  765.     bootInit_res_high.o version.o bootConfig.o $(MACH_DEP) 
  766.     $(LD_START_GROUP) $(LD_LINK_PATH) $(LIBS) $(LD_END_GROUP) 
  767.     $(CC_LIB) $(LD_SCRIPT_ROM)
  768. $(ROMSIZEPROG) -b $(ROM_SIZE) $@
  769. $(LDOUT_CONV) $@
  770. bootrom.hex : depend.$(BSP_NAME) bootrom $(IMI)
  771. - @ $(RM) $@
  772. - @ $(RM) bootrom.tmp*
  773. - @ $(RM) out.tmp*
  774. $(BINHEX) $(START_FLAGS) $(HEX_FLAGS) 
  775.     bootrom $(BINHEX_OUTPUT_FILE)
  776. ifneq ($(strip $(NO_VMA_FLAGS)),)
  777. $(BINCONV) $(NO_VMA_FLAGS) out.tmp1 $(BINCONV_OUTPUT_FILE)
  778. endif
  779. ifneq ($(strip $(VMA_FLAGS)),)
  780. $(BINCONV) $(VMA_FLAGS) $(BINCONV_INPUT_FILE) $@$(MAP_EXT)
  781. endif
  782. - @ $(RM) bootrom.tmp*
  783. - @ $(RM) out.tmp*
  784. - @ $(MV_BIN)
  785. imi : $(IBR)
  786. $(LD) -o $@ $(LD_IMI_ADRS) $(IBR)
  787. bootrom_uncmp.hex : depend.$(BSP_NAME) bootrom_uncmp $(IMI)
  788. - @ $(RM) $@
  789. - @ $(RM) bootrom_uncmp.tmp*
  790. - @ $(RM) out.tmp*
  791. $(BINHEX)  $(START_FLAGS) $(HEX_FLAGS) 
  792.     bootrom_uncmp$(TXT_OFFSET) $(BINHEX_OUTPUT_FILE)
  793. ifneq ($(strip $(NO_VMA_FLAGS)),)
  794. $(BINCONV) $(NO_VMA_FLAGS) out.tmp1 $(BINCONV_OUTPUT_FILE)
  795. endif
  796. ifneq ($(strip $(VMA_FLAGS)),)
  797. $(BINCONV) $(VMA_FLAGS) $(BINCONV_INPUT_FILE) $@$(MAP_EXT)
  798. endif
  799. - @ $(RM) bootrom_uncmp.tmp*
  800. - @ $(RM) out.tmp*
  801. - @ $(MV_BIN)
  802. bootrom_res.hex : depend.$(BSP_NAME) bootrom_res $(IMI)
  803. - @ $(RM) $@
  804. - @ $(RM) bootrom_res.tmp*
  805. - @ $(RM) out.tmp*
  806. $(BINHEX) $(START_FLAGS) $(HEX_FLAGS) 
  807.     $(SECT_SPEC)bootrom_res$(TXT_OFFSET) $(BINHEX_OUTPUT_FILE)
  808. ifneq ($(strip $(NO_VMA_FLAGS)),)
  809. $(BINCONV) $(NO_VMA_FLAGS) out.tmp1 $(BINCONV_OUTPUT_FILE)
  810. endif
  811. ifneq ($(strip $(VMA_FLAGS)),)
  812. $(BINCONV) $(VMA_FLAGS) $(BINCONV_INPUT_FILE) $@$(MAP_EXT)
  813. endif
  814. - @ $(RM) bootrom_res.tmp*
  815. - @ $(RM) out.tmp*
  816. - @ $(MV_BIN)
  817. bootrom_res_high.hex : depend.$(BSP_NAME) bootrom_res_high $(IMI)
  818. - @ $(RM) $@
  819. - @ $(RM) bootrom_res_high.tmp*
  820. - @ $(RM) out.tmp*
  821. $(BINHEX) $(START_FLAGS) $(HEX_FLAGS) 
  822.     $(SECT_SPEC)bootrom_res_high$(TXT_OFFSET) $(BINHEX_OUTPUT_FILE)
  823. ifneq ($(strip $(NO_VMA_FLAGS)),)
  824. $(BINCONV) $(NO_VMA_FLAGS) out.tmp1 $(BINCONV_OUTPUT_FILE)
  825. endif
  826. ifneq ($(strip $(VMA_FLAGS)),)
  827. $(BINCONV) $(VMA_FLAGS) $(BINCONV_INPUT_FILE) $@$(MAP_EXT)
  828. endif
  829. - @ $(RM) bootrom_res_high.tmp*
  830. - @ $(RM) out.tmp*
  831. - @ $(MV_BIN)
  832. ###############################################################################
  833. #
  834. # %.old - convert to old OMF's on targets that migrated to ELF
  835. #
  836. # Used by command-line users
  837. %.old: %
  838. - @ $(RM) $@
  839. $(BINCONV) $(OBJCOPY_OLD_OMF) $< $@
  840. ###############################################################################
  841. #
  842. # %.bin - convert to binary image
  843. #
  844. # Used by command-line users
  845. %.bin: %
  846. - @ $(RM) $@
  847. $(EXTRACT_BIN) $< $@
  848. ###############################################################################
  849. #
  850. # headerMacros - output the values of all header macros
  851. #
  852. # Used by the project creation scripts
  853. headerMacros:
  854. @ $(CPP_PRINT_MACROS) sysLib.c
  855. ###############################################################################
  856. #
  857. # makeMacrosReferred - output makefile-macros referred by project
  858. makeMacrosReferred:
  859. $(NOP) VX_OS_LIBS = $(VX_OS_LIBS)
  860. ###############################################################################
  861. #
  862. # makeMacros - output makefile-macros related to toolchain settings
  863. # Used by the project creation scripts
  864. makeMacros:
  865. $(NOP) CPU = $(CPU)
  866. $(NOP) TOOL = $(TOOL)
  867. $(NOP) AR = $(AR)
  868. $(NOP) CC = $(CC)
  869. $(NOP) CPP = $(CPP)
  870. $(NOP) NM = $(NM)
  871. $(NOP) SIZE = $(SIZE)
  872. $(NOP) AS = $(AS)
  873. $(NOP) LD = $(LD)
  874. $(NOP) CFLAGS_AS = $(CFLAGS_AS)
  875. $(NOP) C++FLAGS = $(C++FLAGS)
  876. $(NOP) CFLAGS_PROJECT = $(CFLAGS_PROJECT)
  877. $(NOP) CFLAGS_AS_PROJECT = $(CFLAGS_AS_PROJECT)
  878. $(NOP) LDFLAGS = $(LDFLAGS)
  879. $(NOP) LD_PARTIAL = $(LD_PARTIAL)
  880. $(NOP) LD_PARTIAL_FLAGS = $(LD_PARTIAL_FLAGS)
  881. $(NOP) EXTRA_CFLAGS = $(EXTRA_INCLUDE) $(EXTRA_DEFINE) $(ADDED_CFLAGS)
  882. $(NOP) LIBS = $(LIB_EXTRA) $$(VX_OS_LIBS)
  883. $(NOP) LD_LINK_PATH = $(LD_LINK_PATH)
  884. $(NOP) LDDEPS = $(LDDEPS)
  885. $(NOP) BOOT_EXTRA = $(BOOT_EXTRA)
  886. $(NOP) MACH_DEP = $(MACH_DEP)
  887. $(NOP) OPTION_DEPEND = $(OPTION_DEPEND)
  888. $(NOP) OPTION_LANG_C = $(OPTION_LANG_C)
  889. $(NOP) CC_ARCH_SPEC = $(CC_ARCH_SPEC)
  890. ifneq ($(DEPEND_GEN_UTIL),)
  891. $(NOP) DEPEND_GEN_UTIL = $(DEPEND_GEN_UTIL)
  892. endif
  893. $(NOP) TOOL_FAMILY = $(TOOL_FAMILY)
  894. $(NOP) HEX_FLAGS = $(HEX_FLAGS)
  895. ################################# testing ######################################
  896. #
  897. # test - Invoke a separate testing component
  898. #
  899. # If the BSP directory contains a Makefile.test, this target builds the
  900. # first (default) target defined there.
  901. #
  902. test: vxWorks
  903. @here=`pwd` ; bspName=`basename $$here` ; 
  904.  if [ -f Makefile.test ] ; 
  905.  then 
  906.    $(MAKE) -f Makefile.test BSP=$$bspName CPU=$(CPU) TOOL=$(TOOL) ; 
  907.  else 
  908.    echo '"make test" requires installation of a testing component.' 
  909. >&2 ; 
  910.    exit 1 ; 
  911.  fi
  912. # Get the host specific rules now 
  913. include $(TGT_DIR)/h/make/rules.$(WIND_HOST_TYPE)