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.

145 lines
5.3 KiB

  1. !include ..\makefile.inc
  2. COMMON_HEADERS = emdb_types.h EM.h EM_tools.h iel.h EM_hints.h inst_ids.h
  3. EMDB_SOURCES = $(EMDBDIR)\emdb.txt $(EMDBDIR)\emdb_cut.pl \
  4. $(EMDBDIR)\dec_private.perl $(EMDBDIR)\emdb_formats.txt \
  5. $(IA64_DIS_INC)\EM_perl.h
  6. EM_BUILDIR = .\build
  7. PERL_INCLIST = $(PERL_INCLIST) -I $(EM_BUILDIR) -I $O
  8. INCLUDES = $(INCLUDES);$(EM_BUILDIR)
  9. $(IA64_DIS_INC)\decem.h : decoder.h
  10. copy decoder.h $(IA64_DIS_INC)\decem.h
  11. $O\frmt_func.c : $(EM_BUILDIR)/func_build_1.pl \
  12. $(EM_BUILDIR)/func_build_2.pl $(EMDB_SOURCES) \
  13. $O\deccpu_emdb.h $O\inst_ids.h
  14. $(PERL) $(PERL_INCLIST) $(EM_BUILDIR)\func_build_1.pl $O $(EMDBDIR)
  15. $(PERL) $(PERL_INCLIST) $(EM_BUILDIR)\func_build_2.pl $O $(EMDBDIR)
  16. $O\deccpu_emdb.c $O\deccpu_emdb.h : $(EMDB_SOURCES) $O\decoder.txt
  17. $(PERL) $(EMDBDIR)\emdb_cut.pl -emdb_path $(EMDBDIR) -dir $O \
  18. -columns $O\decoder.txt \
  19. -fields inst_id,extensions,format,template_role,ops,flags,mem_size,dec_flags,impls \
  20. -include $(EM_BUILDIR)\dec_priv_col.h -prefix deccpu
  21. $O\dec_emdb.tab: $(EMDBDIR)\emdb.txt $(EMDBDIR)\emdb_cut.pl \
  22. $(EM_BUILDIR)\dec_priv_col.h
  23. echo "building dec_emdb.tab"
  24. $(PERL) $(EMDBDIR)\emdb_cut.pl -table -emdb_path $(EMDBDIR) -dir $O \
  25. -fields inst_id,format,major_opcode,template_role -prefix dec
  26. ###ign_inst.txt must be the last in '-row' sequence
  27. $O\dec_ign_emdb.tab: $(EMDBDIR)\emdb.txt $(EMDBDIR)\emdb_cut.pl \
  28. $O\ign_inst.txt $(EM_BUILDIR)\dec_priv_col.h
  29. echo "building dec_ign_emdb.tab"
  30. $(PERL) $(EMDBDIR)\emdb_cut.pl -rows $O\ign_inst.txt \
  31. -table -emdb_path $(EMDBDIR) -dir $O \
  32. -fields inst_id,format,major_opcode,template_role \
  33. -prefix dec_ign
  34. $O\inst_ign_ids.h $O\ign_inst.txt: $(EMDBDIR)\emdb.txt \
  35. $(EMDBDIR)\emdb_formats.txt $(EM_BUILDIR)\build_ignored_flds.pl
  36. $(PERL) $(PERL_INCLIST) \
  37. $(EM_BUILDIR)\build_ignored_flds.pl $O $(EMDBDIR)
  38. $O\inst_emdb.tab: $(EMDBDIR)\emdb.txt $(EMDBDIR)\emdb_cut.pl \
  39. $(EM_BUILDIR)\dec_priv_col.h
  40. $(PERL) $(EMDBDIR)\emdb_cut.pl -table -emdb_path $(EMDBDIR) \
  41. -dir $O -fields inst_id -prefix inst
  42. $O\builder_info.c $O\builder_info.h: $(EMDBDIR)\emdb_formats.txt \
  43. $(EM_BUILDIR)\tree_builder.perl $O\dec_ign_emdb.tab \
  44. $(IA64_DIS_INC)\EM_perl.h
  45. echo "building builder_info.c"
  46. $(PERL) $(PERL_INCLIST) $(EM_BUILDIR)\tree_builder.perl $O $(EMDBDIR)
  47. $O\decfn_emdb.c: $O\deccpu_emdb.c $O\deccpu_emdb.h \
  48. $(EM_BUILDIR)\func_build_1.pl \
  49. $(EM_BUILDIR)\hard_coded_fields_h.perl
  50. $(PERL) $(PERL_INCLIST) $(EM_BUILDIR)\func_build_1.pl $O $(EMDBDIR)
  51. $O\dec_static.c: $O\dec1_emdb.c $O\dec1_emdb.h \
  52. $(EM_BUILDIR)\build_static_info.pl $(IA64_DIS_INC)\EM_perl.h
  53. $(PERL) $(PERL_INCLIST) $(EM_BUILDIR)\build_static_info.pl $O $(EMDBDIR)
  54. ###ign_inst.txt must be the last in '-row' sequence
  55. $O\dec_ign_emdb.c $O\dec_ign_emdb.h : $O\ign_inst.txt \
  56. $(EMDB_SOURCES)
  57. $(PERL) $(EMDBDIR)\emdb_cut.pl -emdb_path $(EMDBDIR) -dir $O \
  58. -rows $O\ign_inst.txt \
  59. -fields inst_id,extensions,format,template_role,ops,flags \
  60. -include $(EM_BUILDIR)\dec_priv_col.h -prefix dec_ign
  61. $(PERL) -p -i.bak -e "s/_IGN\d+// if ( /\s*\{EM_\S*\_IGN\d+,/)" \
  62. $O\dec_ign_emdb.c
  63. $O\dec1_emdb.c $O\dec1_emdb.h : $(EMDBDIR)\emdb.txt $(EMDBDIR)\emdb_cut.pl \
  64. $O\decoder.txt $(EMDBDIR)\dec_stat.txt
  65. $(PERL) $(EMDBDIR)\emdb_cut.pl -emdb_path $(EMDBDIR) -dir $O -columns \
  66. $O\decoder.txt,$(EMDBDIR)\dec_stat.txt -fields\
  67. mnemonic,dec_flags,template_role,ops,modifiers,flags,specul_flag,false_pred_flag,imp_dsts,imp_srcs,br_hint_flag,br_flag,adv_load_flag,control_transfer_flag \
  68. -prefix dec1
  69. $(IA64_DIS_INC)\EM_hints.h: $O\EM_hints.h
  70. copy $O\EM_hints.h $(IA64_DIS_INC)\EM_hints.h
  71. $(IA64_DIS_INC)\inst_ids.h: $O\inst_ids.h
  72. copy $O\inst_ids.h $(IA64_DIS_INC)\inst_ids.h
  73. $O\inst_ids.h: $O\inst_emdb.tab $(EM_BUILDIR)\inst_id.perl \
  74. ..\copyright\external\c_file
  75. $(PERL) $(EM_BUILDIR)\inst_id.perl $O $(EMDBDIR)
  76. $O\all_emdb.tab: $(EMDBDIR)\emdb.txt
  77. $(PERL) $(EMDBDIR)\emdb_cut.pl -table -emdb_path $(EMDBDIR) -dir $O \
  78. -fields inst_id,mnemonic -prefix all
  79. $O\decoder.txt $O\EM_hints.h: $O\all_emdb.tab $(EMDBDIR)\emdb_cut.pl
  80. $(PERL) $(EMDBDIR)\dec_private.perl $O $(EMDBDIR)
  81. !if "$(GENERATE_DECISION_TREE)" == ""
  82. $O\decision_tree.c: decision_tree.c
  83. copy decision_tree.c $O
  84. !else
  85. $O\tree_builder.h : $(EM_BUILDIR)\tree_builder.c
  86. echo "building tree_builder.h"
  87. $(MHDR) $O\tree_builder.h $(EM_BUILDIR)\tree_builder.c
  88. $O\decision_tree.c: $O\tree_builder$(EEXT)
  89. "$O\tree_builder$(EEXT)" $O\decision_tree.c
  90. $O\builder_info.obj: $O\builder_info.c
  91. $O\dec_ign_emdb.obj: $O\dec_ign_emdb.c
  92. $O\tree_builder.c: $(EM_BUILDIR)\tree_builder.c
  93. copy $(EM_BUILDIR)\tree_builder.c $O
  94. $O\tree_builder.obj: $O\tree_builder.c
  95. $O\tree_builder$(EEXT): $(EM_BUILDIR)\tree.h $O\tree_builder.h \
  96. $O\inst_ids.h $O\inst_ign_ids.h \
  97. $O\builder_info.obj $O\dec_ign_emdb.obj $O\tree_builder.obj
  98. $(LINKER) @<<
  99. $(LINKER_FLAGS: =
  100. )
  101. -subsystem:console
  102. $O\builder_info.obj
  103. $O\dec_ign_emdb.obj
  104. $O\tree_builder.obj
  105. ..\iel\$O\iel.lib
  106. $(CRTLIBS)
  107. $(UMLIBS)
  108. $(LINKLIBS)
  109. <<NOKEEP
  110. !endif