Changeset 12249 in vbox
- Timestamp:
- Sep 9, 2008 1:26:15 AM (16 years ago)
- Location:
- trunk/src/VBox/Disassembler
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Disassembler/Makefile.kmk
r12170 r12249 20 20 # 21 21 22 ifdef VBOX_SINGLE_MAKEFILE23 22 SUB_DEPTH = ../../.. 24 else25 SUB_DEPTH = .26 DEPTH ?= ../../..27 endif28 23 include $(KBUILD_PATH)/subheader.kmk 29 30 ifndef VBOX_ONLY_SDK31 24 32 25 # include the sub-makefile first. … … 100 93 endif # VBOX_WITH_TESTCASES 101 94 102 endif #!VBOX_ONLY_SDK103 104 95 include $(KBUILD_PATH)/subfooter.kmk 105 96 -
trunk/src/VBox/Disassembler/testcase/Makefile.kmk
r12170 r12249 20 20 # 21 21 22 ifdef VBOX_SINGLE_MAKEFILE23 22 SUB_DEPTH = ../../../.. 24 else25 SUB_DEPTH = ..26 DEPTH ?= ../../../..27 endif28 23 include $(KBUILD_PATH)/subheader.kmk 29 24 ifdef VBOX_WITH_TESTCASES … … 76 71 77 72 # Where we put the output files from the testcases. 78 VBOX_DISAS_TEST_PATH := $(PATH_TARGET)/disas-testcase 79 80 $(call DIRDEP,$(VBOX_DISAS_TEST_PATH)): 81 $(MKDIR) -p $@ 73 VBOX_DISAS_TEST_OUT_DIR := $(PATH_TARGET)/Disassembler/testcase 74 BLDDIRS += $(VBOX_DISAS_TEST_OUT_DIR) 82 75 83 76 # Generate the rules for creating the .bin files. 84 77 VBOX_DISAS_TESTS_BIN = $(VBOX_DISAS_TESTS_BUILD) $(VBOX_DISAS_TESTS_INVALID) 85 VBOX_DISAS_TEST_CLEAN += $(addprefix $(VBOX_DISAS_TEST_ PATH)/,\78 VBOX_DISAS_TEST_CLEAN += $(addprefix $(VBOX_DISAS_TEST_OUT_DIR)/,\ 86 79 $(VBOX_DISAS_TESTS_BIN:.asm=-16.bin)\ 87 80 $(VBOX_DISAS_TESTS_BIN:.asm=-32.bin)\ 88 81 $(VBOX_DISAS_TESTS_BIN:.asm=-64.bin)) 89 82 90 $(addprefix $(VBOX_DISAS_TEST_ PATH)/, $(VBOX_DISAS_TESTS_BIN:.asm=-16.bin)): $(PATH_SUB_CURRENT)/$$(patsubst %-16.bin,%.asm,$$(notdir $$(@))) | $$(call DIRDEP,$$(@D))83 $(addprefix $(VBOX_DISAS_TEST_OUT_DIR)/, $(VBOX_DISAS_TESTS_BIN:.asm=-16.bin)): $(PATH_SUB_CURRENT)/$$(patsubst %-16.bin,%.asm,$$(notdir $$(@))) | $$(call DIRDEP,$$(@D)) 91 84 @$(ECHO) "Assembling: $(<F) into $(@F)" 92 85 $(TOOL_YASM_AS) -f bin -a x86 --force-strict -DTEST_BITS=16 -o $@ $< 93 86 94 $(addprefix $(VBOX_DISAS_TEST_ PATH)/, $(VBOX_DISAS_TESTS_BIN:.asm=-32.bin)): $(PATH_SUB_CURRENT)/$$(patsubst %-32.bin,%.asm,$$(notdir $$(@))) | $$(call DIRDEP,$$(@D))87 $(addprefix $(VBOX_DISAS_TEST_OUT_DIR)/, $(VBOX_DISAS_TESTS_BIN:.asm=-32.bin)): $(PATH_SUB_CURRENT)/$$(patsubst %-32.bin,%.asm,$$(notdir $$(@))) | $$(call DIRDEP,$$(@D)) 95 88 @$(ECHO) "Assembling: $(<F) into $(@F)" 96 89 $(TOOL_YASM_AS) -f bin -a x86 --force-strict -DTEST_BITS=32 -o $@ $< 97 90 98 $(addprefix $(VBOX_DISAS_TEST_ PATH)/, $(VBOX_DISAS_TESTS_BIN:.asm=-64.bin)): $(PATH_SUB_CURRENT)/$$(patsubst %-64.bin,%.asm,$$(notdir $$(@))) | $$(call DIRDEP,$$(@D))91 $(addprefix $(VBOX_DISAS_TEST_OUT_DIR)/, $(VBOX_DISAS_TESTS_BIN:.asm=-64.bin)): $(PATH_SUB_CURRENT)/$$(patsubst %-64.bin,%.asm,$$(notdir $$(@))) | $$(call DIRDEP,$$(@D)) 99 92 @$(ECHO) "Assembling: $(<F) into $(@F)" 100 93 $(TOOL_YASM_AS) -f bin -a x86 --force-strict -DTEST_BITS=64 -o $@ $< … … 102 95 103 96 # Generate the rules for the 'build' tests. 104 VBOX_DISAS_TEST_CLEAN += $(addprefix $(VBOX_DISAS_TEST_ PATH)/,\97 VBOX_DISAS_TEST_CLEAN += $(addprefix $(VBOX_DISAS_TEST_OUT_DIR)/,\ 105 98 $(VBOX_DISAS_TESTS_BUILD:.asm=-16-disas.asm)\ 106 99 $(VBOX_DISAS_TESTS_BUILD:.asm=-32-disas.asm)\ 107 100 $(VBOX_DISAS_TESTS_BUILD:.asm=-64-disas.asm)) 108 101 109 $(addprefix $(VBOX_DISAS_TEST_ PATH)/, $(VBOX_DISAS_TESTS_BUILD:.asm=-16-disas.asm)): $$(subst -disas.asm,.bin,$$@) $$(INSTARGET_tstDisasm-2) | $$(call DIRDEP,$$(@D))102 $(addprefix $(VBOX_DISAS_TEST_OUT_DIR)/, $(VBOX_DISAS_TESTS_BUILD:.asm=-16-disas.asm)): $$(subst -disas.asm,.bin,$$@) $$(INSTARGET_tstDisasm-2) | $$(call DIRDEP,$$(@D)) 110 103 @$(ECHO) "Generating: $(@F) from $(<F)" 111 104 $(REDIRECT) -E VBOX_LOG_DEST=nofile -o $@ -- $(INSTARGET_tstDisasm-2) --style=yasm --cpumode=16 $< 112 105 113 $(addprefix $(VBOX_DISAS_TEST_ PATH)/, $(VBOX_DISAS_TESTS_BUILD:.asm=-32-disas.asm)): $$(subst -disas.asm,.bin,$$@) $$(INSTARGET_tstDisasm-2) | $$(call DIRDEP,$$(@D))106 $(addprefix $(VBOX_DISAS_TEST_OUT_DIR)/, $(VBOX_DISAS_TESTS_BUILD:.asm=-32-disas.asm)): $$(subst -disas.asm,.bin,$$@) $$(INSTARGET_tstDisasm-2) | $$(call DIRDEP,$$(@D)) 114 107 @$(ECHO) "Generating: $(@F) from $(<F)" 115 108 $(REDIRECT) -E VBOX_LOG_DEST=nofile -o $@ -- $(INSTARGET_tstDisasm-2) --style=yasm --cpumode=32 $< 116 109 117 $(addprefix $(VBOX_DISAS_TEST_ PATH)/, $(VBOX_DISAS_TESTS_BUILD:.asm=-64-disas.asm)): $$(subst -disas.asm,.bin,$$@) $$(INSTARGET_tstDisasm-2) | $$(call DIRDEP,$$(@D))110 $(addprefix $(VBOX_DISAS_TEST_OUT_DIR)/, $(VBOX_DISAS_TESTS_BUILD:.asm=-64-disas.asm)): $$(subst -disas.asm,.bin,$$@) $$(INSTARGET_tstDisasm-2) | $$(call DIRDEP,$$(@D)) 118 111 @$(ECHO) "Generating: $(@F) from $(<F)" 119 112 $(REDIRECT) -E VBOX_LOG_DEST=nofile -o $@ -- $(INSTARGET_tstDisasm-2) --style=yasm --cpumode=64 $< 120 113 121 114 122 VBOX_DISAS_TEST_CLEAN += $(addprefix $(VBOX_DISAS_TEST_ PATH)/,\115 VBOX_DISAS_TEST_CLEAN += $(addprefix $(VBOX_DISAS_TEST_OUT_DIR)/,\ 123 116 $(VBOX_DISAS_TESTS_BUILD:.asm=-16-disas.bin)\ 124 117 $(VBOX_DISAS_TESTS_BUILD:.asm=-32-disas.bin)\ 125 118 $(VBOX_DISAS_TESTS_BUILD:.asm=-64-disas.bin)) 126 119 127 $(addprefix $(VBOX_DISAS_TEST_ PATH)/, $(VBOX_DISAS_TESTS_BUILD:.asm=-16-disas.bin)): $$(subst .bin,.asm,$$@) | $$(call DIRDEP,$$(@D))120 $(addprefix $(VBOX_DISAS_TEST_OUT_DIR)/, $(VBOX_DISAS_TESTS_BUILD:.asm=-16-disas.bin)): $$(subst .bin,.asm,$$@) | $$(call DIRDEP,$$(@D)) 128 121 @$(ECHO) "Re-assembling: $(<F) into $(@F)" 129 122 $(TOOL_YASM_AS) -f bin -a x86 --force-strict -DTEST_BITS=16 -o $@ $< 130 123 131 $(addprefix $(VBOX_DISAS_TEST_ PATH)/, $(VBOX_DISAS_TESTS_BUILD:.asm=-32-disas.bin)): $$(subst .bin,.asm,$$@) | $$(call DIRDEP,$$(@D))124 $(addprefix $(VBOX_DISAS_TEST_OUT_DIR)/, $(VBOX_DISAS_TESTS_BUILD:.asm=-32-disas.bin)): $$(subst .bin,.asm,$$@) | $$(call DIRDEP,$$(@D)) 132 125 @$(ECHO) "Re-assembling: $(<F) into $(@F)" 133 126 $(TOOL_YASM_AS) -f bin -a x86 --force-strict -DTEST_BITS=32 -o $@ $< 134 127 135 $(addprefix $(VBOX_DISAS_TEST_ PATH)/, $(VBOX_DISAS_TESTS_BUILD:.asm=-64-disas.bin)): $$(subst .bin,.asm,$$@) | $$(call DIRDEP,$$(@D))128 $(addprefix $(VBOX_DISAS_TEST_OUT_DIR)/, $(VBOX_DISAS_TESTS_BUILD:.asm=-64-disas.bin)): $$(subst .bin,.asm,$$@) | $$(call DIRDEP,$$(@D)) 136 129 @$(ECHO) "Re-assembling: $(<F) into $(@F)" 137 130 $(TOOL_YASM_AS) -f bin -a x86 --force-strict -DTEST_BITS=64 -o $@ $< … … 139 132 140 133 VBOX_DISAS_TESTS += $(foreach test, $(VBOX_DISAS_TESTS_BUILD:.asm=), $(test)-16.tst $(test)-32.tst $(test)-64.tst) 141 $(addprefix $(VBOX_DISAS_TEST_ PATH)/,\134 $(addprefix $(VBOX_DISAS_TEST_OUT_DIR)/,\ 142 135 $(VBOX_DISAS_TESTS_BUILD:.asm=-16.tst)\ 143 136 $(VBOX_DISAS_TESTS_BUILD:.asm=-32.tst)\ … … 154 147 VBOX_DISAS_TESTS += $(foreach test, $(VBOX_DISAS_TESTS_INVALID:.asm=), $(test)-16.tst $(test)-32.tst $(test)-64.tst) 155 148 156 $(addprefix $(VBOX_DISAS_TEST_ PATH)/, $(VBOX_DISAS_TESTS_INVALID:.asm=-16.tst)): $$(patsubst %.tst,%.bin,$$@) $$(INSTARGET_tstDisasm-2) | $$(call DIRDEP,$$(@D))149 $(addprefix $(VBOX_DISAS_TEST_OUT_DIR)/, $(VBOX_DISAS_TESTS_INVALID:.asm=-16.tst)): $$(patsubst %.tst,%.bin,$$@) $$(INSTARGET_tstDisasm-2) | $$(call DIRDEP,$$(@D)) 157 150 @$(ECHO) "TESTING: $(@F) [--undef-op=all]" 158 151 @$(RM) -f $@ … … 161 154 @$(ECHO) " PASSED: $(@F) [--undef-op=all]" 162 155 163 $(addprefix $(VBOX_DISAS_TEST_ PATH)/, $(VBOX_DISAS_TESTS_INVALID:.asm=-32.tst)): $$(patsubst %.tst,%.bin,$$@) $$(INSTARGET_tstDisasm-2) | $$(call DIRDEP,$$(@D))156 $(addprefix $(VBOX_DISAS_TEST_OUT_DIR)/, $(VBOX_DISAS_TESTS_INVALID:.asm=-32.tst)): $$(patsubst %.tst,%.bin,$$@) $$(INSTARGET_tstDisasm-2) | $$(call DIRDEP,$$(@D)) 164 157 @$(ECHO) "TESTING: $(@F) [--undef-op=all]" 165 158 @$(RM) -f $@ … … 168 161 @$(ECHO) " PASSED: $(@F) [--undef-op=all]" 169 162 170 $(addprefix $(VBOX_DISAS_TEST_ PATH)/, $(VBOX_DISAS_TESTS_INVALID:.asm=-64.tst)): $$(patsubst %.tst,%.bin,$$@) $$(INSTARGET_tstDisasm-2) | $$(call DIRDEP,$$(@D))163 $(addprefix $(VBOX_DISAS_TEST_OUT_DIR)/, $(VBOX_DISAS_TESTS_INVALID:.asm=-64.tst)): $$(patsubst %.tst,%.bin,$$@) $$(INSTARGET_tstDisasm-2) | $$(call DIRDEP,$$(@D)) 171 164 @$(ECHO) "TESTING: $(@F) [--undef-op=all]" 172 165 @$(RM) -f $@ … … 178 171 # Generate the rules for the binary tests. 179 172 define def_vbox_disas_binary_rules 180 $(outbase).asm: $(full_binary) $$$$(INSTARGET_tstDisasm-2) | $(VBOX_DISAS_TEST_ PATH)/173 $(outbase).asm: $(full_binary) $$$$(INSTARGET_tstDisasm-2) | $(VBOX_DISAS_TEST_OUT_DIR)/ 181 174 @$$(ECHO) "Generating: $$(@F) from $$(<F)" 182 175 $$(REDIRECT) -E VBOX_LOG_DEST=nofile -o $$@ -- $$(INSTARGET_tstDisasm-2) --style=yasm --cpumode=$(bits) --undef-op=db $$< … … 201 194 local name := $(notdir $(basename $(binary))) 202 195 local full_binary := $(abspathex $(binary),$(PATH_SUB_CURRENT)) 203 local outbase := $(VBOX_DISAS_TEST_ PATH)/$(name)-rebuild-$(bits)196 local outbase := $(VBOX_DISAS_TEST_OUT_DIR)/$(name)-rebuild-$(bits) 204 197 $(eval $(def_vbox_disas_binary_rules)) 205 198 endef # def_vbox_disas_binary … … 211 204 212 205 # Add the .tst to the clean up. 213 VBOX_DISAS_TEST_CLEAN += $(addprefix $(VBOX_DISAS_TEST_ PATH)/, $(VBOX_DISAS_TESTS))206 VBOX_DISAS_TEST_CLEAN += $(addprefix $(VBOX_DISAS_TEST_OUT_DIR)/, $(VBOX_DISAS_TESTS)) 214 207 OTHER_CLEAN += $(VBOX_DISAS_TEST_CLEAN) 215 208 … … 223 216 # (kBuild r1646) 224 217 # 225 TESTING += $(addprefix $(VBOX_DISAS_TEST_ PATH)/,$(VBOX_DISAS_TESTS))218 TESTING += $(addprefix $(VBOX_DISAS_TEST_OUT_DIR)/,$(VBOX_DISAS_TESTS)) 226 219 227 220 # Aliases for use till kBuild gets updated. … … 239 232 local test_base := $(basename $(test)) 240 233 local test_root := $(patsubst %-16,%,$(patsubst %-32,%,$(patsubst %-64,%,$(test_base)))) 241 $(test_base).tst:: $(VBOX_DISAS_TEST_ PATH)/$(test)234 $(test_base).tst:: $(VBOX_DISAS_TEST_OUT_DIR)/$(test) 242 235 $(test_root).tst:: $(test_base).tst 243 236 $(test_base).o:: $(test_base).tst
Note:
See TracChangeset
for help on using the changeset viewer.