# $Id: Makefile.kmk 12989 2008-10-06 02:15:39Z vboxsync $ ## @file # Sub-Makefile for the VBox Disassembler. # # # Copyright (C) 2006-2007 Sun Microsystems, Inc. # # This file is part of VirtualBox Open Source Edition (OSE), as # available from http://www.virtualbox.org. This file is free software; # you can redistribute it and/or modify it under the terms of the GNU # General Public License (GPL) as published by the Free Software # Foundation, in version 2 as it comes in the "COPYING" file of the # VirtualBox OSE distribution. VirtualBox OSE is distributed in the # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind. # # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa # Clara, CA 95054 USA or visit http://www.sun.com if you need # additional information or have any questions. # SUB_DEPTH = ../../../.. include $(KBUILD_PATH)/subheader.kmk ifdef VBOX_WITH_TESTCASES PROGRAMS += tstDisasm-2 tstDisasm-2_TEMPLATE = VBOXR3TSTEXE tstDisasm-2_DEFS = IN_DIS tstDisasm-2_SOURCES = \ tstDisasm-2.cpp tstDisasm-2_LIBS = \ $(PATH_LIB)/DisasmR3$(VBOX_SUFF_LIB) \ $(LIB_RUNTIME) # Tests that will be build, disassembled and re-build from disassembly. VBOX_DISAS_TESTS_BUILD = \ tstAsmFnstsw-1.asm \ tstAsmLock-1.asm \ tstAsmMovSeg-1.asm \ tstAsmMovzx-1.asm \ tstAsmPop-1.asm \ tstAsmPush-1.asm \ tstAsmSignExtend-1.asm \ tstAsmRegs-1.asm \ # Tests that only contains invalid/undefined instructions. VBOX_DISAS_TESTS_INVALID = \ tstAsmLock-2.asm \ tstAsmLock-3.asm # Tests that will be disassembled and re-build from disassembly (list of binaries). ## @todo tstBinMovzx-1.bin: does C7 imply 32-bit reg in 16-bit mode, or what exactly does it do? VBOX_DISAS_TESTS_BINARIES := \ tstBinMovzx-1.bin \ tstBinFnstsw-1.bin ifeq ($(USER)x,bird) VBOX_DISAS_TESTS_BINARIES += \ tstBin-1.bin \ tstBin-2.bin \ tstBin-3.bin \ tstBin-4.bin \ tstBin-5.bin \ tstBin-6.bin # $(PATH_BIN)/testcase/tstDisasm-2$(SUFF_EXEC) endif # # The gory bits... # # Where we put the output files from the testcases. VBOX_DISAS_TEST_OUT_DIR := $(PATH_TARGET)/Disassembler/testcase BLDDIRS += $(VBOX_DISAS_TEST_OUT_DIR) # Generate the rules for creating the .bin files. VBOX_DISAS_TESTS_BIN = $(VBOX_DISAS_TESTS_BUILD) $(VBOX_DISAS_TESTS_INVALID) VBOX_DISAS_TEST_CLEAN += $(addprefix $(VBOX_DISAS_TEST_OUT_DIR)/,\ $(VBOX_DISAS_TESTS_BIN:.asm=-16.bin)\ $(VBOX_DISAS_TESTS_BIN:.asm=-32.bin)\ $(VBOX_DISAS_TESTS_BIN:.asm=-64.bin)) $(addprefix $(VBOX_DISAS_TEST_OUT_DIR)/, $(VBOX_DISAS_TESTS_BIN:.asm=-16.bin)): $(PATH_SUB_CURRENT)/$$(patsubst %-16.bin,%.asm,$$(notdir $$(@))) | $$(call DIRDEP,$$(@D)) @$(ECHO) "Assembling: $(