# $Id: Makefile.kmk 14418 2008-11-20 14:33:41Z vboxsync $ ## @file # The Recompiler Sub-Makefile. # # # 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 REM_MOD += VBoxREM #DLLS += VBoxREM IMPORT_LIBS += VBoxREM $(REM_MOD)_TEMPLATE = VBOXR3NP OTHER_CLEAN += # # Globals # VBOX_PATH_RECOMPILER_SRC := $(PATH_SUB_CURRENT) # The VBoxREM.[dll|so|..] or VBoxREM2.rel. # $(REM_MOD)_DEFS = IN_REM_R3 REM_INCLUDE_CPU_H #$(REM_MOD)_DEFS += REM_PHYS_ADDR_IN_TLB #$(REM_MOD)_DEFS += DEBUG_ALL_LOGGING DEBUG_DISAS DEBUG_PCALL DEBUG_EXEC DEBUG_FLUSH DEBUG_IOPORT DEBUG_SIGNAL DEBUG_TLB_CHECK DEBUG_TB_INVALIDATE DEBUG_TLB # Enables huge amounts of debug logging. $(REM_MOD)_DEFS.linux = _GNU_SOURCE ifdef VBOX_SOLARIS_10 $(REM_MOD)_DEFS.solaris = HOST_SOLARIS=10 else $(REM_MOD)_DEFS.solaris = HOST_SOLARIS=11 endif $(REM_MOD)_INCS = \ Sun \ target-i386 \ tcg \ fpu \ $(PATH_$(REM_MOD)) \ $(PATH_ROOT)/src/VBox/VMM \ . $(REM_MOD)_SOURCES = \ VBoxRecompiler.c \ cpu-exec.c \ exec.c \ translate-all.c \ host-utils.c \ cutils.c \ tcg/tcg.c \ tcg/tcg-dyngen.c \ tcg/tcg-runtime.c \ fpu/softfloat-native.c \ target-i386/op_helper.c \ target-i386/helper.c \ target-i386/translate.c ifeq ($(KBUILD_TARGET_ARCH),amd64) $(REM_MOD)_DEFS += __x86_64__ $(REM_MOD)_INCS += tcg/x86_64 else $(REM_MOD)_DEFS += __i386__ $(REM_MOD)_INCS += tcg/i386 endif $(REM_MOD)_SOURCES.debug = \ Sun/testmath.c $(REM_MOD)_SOURCES.win.x86 = $(REM_MOD).def ifneq ($(REM_MOD),VBoxREM2) $(REM_MOD)_POST_CMDS = $(VBOX_SIGN_IMAGE_CMDS) endif # gcc targets if1of ($(KBUILD_TARGET), linux darwin solaris) $(REM_MOD)_CFLAGS.debug = -O0 $(REM_MOD)_CFLAGS.release += -fomit-frame-pointer -fno-gcse endif $(REM_MOD)_CFLAGS.profile = $($(REM_MOD)_CFLAGS.release) $(REM_MOD)_CFLAGS.kprofile = $($(REM_MOD)_CFLAGS.release) $(REM_MOD)_DEFS += IN_RING3 $(ARCH_BITS_DEFS) #$(REM_MOD)_DEFS += DEBUG_DISAS DEBUG_PCALL DEBUG_EXEC DEBUG_FLUSH DEBUG_IOPORT DEBUG_SIGNAL DEBUG_TLB_CHECK DEBUG_TB_INVALIDATE DEBUG_TLB # Enables huge amounts of debug logging. $(REM_MOD)_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/$(REM_MOD).dylib -undefined dynamic_lookup $(REM_MOD)_LDFLAGS.l4 = -T$(L4_LIBDIR)/../main_rel.ld -nostdlib -Wl,--no-undefined $(REM_MOD)_LDFLAGS.linux = $(VBOX_LD_as_needed) $(REM_MOD)_LDFLAGS.os2 = -Zomf $(REM_MOD)_LDFLAGS.debug = -g $(REM_MOD)_LDFLAGS.solaris = -mimpure-text #$(REM_MOD)_LIBS = \ $(LIB_VMM) \ $(LIB_RUNTIME) if1of ($(KBUILD_TARGET), linux darwin solaris) # Extra flags for these source modules. target-i386/op-helper.c_CFLAGS.x86 = -O2 -fno-strict-aliasing -fno-gcse cpu-exec.c_CFLAGS.x86 = -O2 -fno-strict-aliasing -fno-gcse cpu-exec.c_CFLAGS.solaris.amd64 = -O2 -fno-strict-aliasing endif # # The math testcase as a standalone program for testing and debugging purposes. # ## @todo This is a bit messy because of MINGW32. testmath_ASFLAGS.amd64 = -m amd64 testmath_CFLAGS = -Wall -g testmath_CFLAGS.release = -O3 testmath_LDFLAGS = -g testmath_DEFS = MATHTEST_STANDALONE testmath_SOURCES = Sun/testmath.c #testmath_SOURCES += $(PATH_LIB)/RuntimeR3NoCRTGCC$(VBOX_SUFF_LIB) include $(KBUILD_PATH)/subfooter.kmk