1 | # $Id: Makefile.kmk 13384 2008-10-19 23:01:08Z vboxsync $
|
---|
2 | ## @file
|
---|
3 | # The Recompiler Sub-Makefile.
|
---|
4 | #
|
---|
5 | #
|
---|
6 | # Copyright (C) 2006-2007 Sun Microsystems, Inc.
|
---|
7 | #
|
---|
8 | # This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
9 | # available from http://www.virtualbox.org. This file is free software;
|
---|
10 | # you can redistribute it and/or modify it under the terms of the GNU
|
---|
11 | # General Public License (GPL) as published by the Free Software
|
---|
12 | # Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
13 | # VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
14 | # hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
15 | #
|
---|
16 | # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
|
---|
17 | # Clara, CA 95054 USA or visit http://www.sun.com if you need
|
---|
18 | # additional information or have any questions.
|
---|
19 | #
|
---|
20 |
|
---|
21 |
|
---|
22 | SUB_DEPTH = ../..
|
---|
23 | include $(KBUILD_PATH)/subheader.kmk
|
---|
24 |
|
---|
25 |
|
---|
26 | REM_MOD += VBoxREM
|
---|
27 | DLLS += VBoxREM
|
---|
28 |
|
---|
29 | DEFS += VBOX_WITH_NEW_RECOMPILER
|
---|
30 | $(REM_MOD)_TEMPLATE = VBOXR3NP
|
---|
31 |
|
---|
32 | OTHER_CLEAN +=
|
---|
33 |
|
---|
34 | #
|
---|
35 | # Globals
|
---|
36 | #
|
---|
37 | VBOX_PATH_RECOMPILER_SRC := $(PATH_SUB_CURRENT)
|
---|
38 |
|
---|
39 | # The VBoxREM.[dll|so|..] or VBoxREM2.rel.
|
---|
40 | #
|
---|
41 | $(REM_MOD)_DEFS = IN_REM_R3 REM_INCLUDE_CPU_H
|
---|
42 | $(REM_MOD)_DEFS += REM_PHYS_ADDR_IN_TLB
|
---|
43 | #$(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.
|
---|
44 | $(REM_MOD)_DEFS.linux = _GNU_SOURCE
|
---|
45 | ifdef VBOX_SOLARIS_10
|
---|
46 | $(REM_MOD)_DEFS.solaris = HOST_SOLARIS=10
|
---|
47 | else
|
---|
48 | $(REM_MOD)_DEFS.solaris = HOST_SOLARIS=11
|
---|
49 | endif
|
---|
50 |
|
---|
51 | $(REM_MOD)_INCS = \
|
---|
52 | Sun \
|
---|
53 | target-i386 \
|
---|
54 | tcg \
|
---|
55 | fpu \
|
---|
56 | $(PATH_$(REM_MOD)) \
|
---|
57 | $(PATH_ROOT)/src/VBox/VMM \
|
---|
58 | .
|
---|
59 |
|
---|
60 | $(REM_MOD)_SOURCES = \
|
---|
61 | VBoxRecompiler.c \
|
---|
62 | cpu-exec.c \
|
---|
63 | exec.c \
|
---|
64 | translate-all.c \
|
---|
65 | host-utils.c \
|
---|
66 | tcg/tcg.c \
|
---|
67 | tcg/tcg-dyngen.c \
|
---|
68 | tcg/tcg-runtime.c \
|
---|
69 | fpu/softfloat-native.c \
|
---|
70 | target-i386/op_helper.c \
|
---|
71 | target-i386/helper.c \
|
---|
72 | target-i386/translate.c
|
---|
73 |
|
---|
74 | ifeq ($(KBUILD_TARGET_ARCH),amd64)
|
---|
75 | $(REM_MOD)_DEFS += __x86_64__
|
---|
76 | $(REM_MOD)_INCS += tcg/x86_64
|
---|
77 | else
|
---|
78 | $(REM_MOD)_DEFS += __i386__
|
---|
79 | $(REM_MOD)_INCS += tcg/i386
|
---|
80 | endif
|
---|
81 |
|
---|
82 |
|
---|
83 | $(REM_MOD)_SOURCES.debug = \
|
---|
84 | Sun/testmath.c
|
---|
85 | $(REM_MOD)_SOURCES.win.x86 = $(REM_MOD).def
|
---|
86 | ifneq ($(REM_MOD),VBoxREM2)
|
---|
87 | $(REM_MOD)_POST_CMDS = $(VBOX_SIGN_IMAGE_CMDS)
|
---|
88 | endif
|
---|
89 |
|
---|
90 | # gcc targets
|
---|
91 | if1of ($(KBUILD_TARGET), linux darwin solaris)
|
---|
92 | $(REM_MOD)_CFLAGS.debug = -O0
|
---|
93 | $(REM_MOD)_CFLAGS.release += -fomit-frame-pointer -fno-gcse
|
---|
94 | endif
|
---|
95 | $(REM_MOD)_CFLAGS.profile = $($(REM_MOD)_CFLAGS.release)
|
---|
96 | $(REM_MOD)_CFLAGS.kprofile = $($(REM_MOD)_CFLAGS.release)
|
---|
97 |
|
---|
98 | $(REM_MOD)_DEFS += IN_RING3 $(ARCH_BITS_DEFS)
|
---|
99 | #$(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.
|
---|
100 |
|
---|
101 | $(REM_MOD)_LDFLAGS.darwin = -read_only_relocs suppress -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/$(REM_MOD).dylib -multiple_defined warning
|
---|
102 | $(REM_MOD)_LDFLAGS.l4 = -T$(L4_LIBDIR)/../main_rel.ld -nostdlib -Wl,--no-undefined
|
---|
103 | $(REM_MOD)_LDFLAGS.linux = $(VBOX_LD_as_needed)
|
---|
104 | $(REM_MOD)_LDFLAGS.os2 = -Zomf
|
---|
105 | $(REM_MOD)_LDFLAGS.debug = -g
|
---|
106 | $(REM_MOD)_LDFLAGS.solaris = -mimpure-text
|
---|
107 |
|
---|
108 | $(REM_MOD)_LIBS = \
|
---|
109 | $(LIB_VMM) \
|
---|
110 | $(LIB_RUNTIME)
|
---|
111 |
|
---|
112 |
|
---|
113 | if1of ($(KBUILD_TARGET), linux darwin solaris)
|
---|
114 | $(REM_MOD)_DEFS.solaris +=
|
---|
115 | # Extra flags for these source modules.
|
---|
116 | target-i386/op-helper.c_CFLAGS.x86 = -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-gcse
|
---|
117 | cpu-exec.c_CFLAGS.x86 = -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-gcse
|
---|
118 | cpu-exec.c_CFLAGS.solaris.amd64 = -O2 -fomit-frame-pointer -fno-strict-aliasing
|
---|
119 | endif
|
---|
120 |
|
---|
121 | #
|
---|
122 | # The math testcase as a standalone program for testing and debugging purposes.
|
---|
123 | #
|
---|
124 | ## @todo This is a bit messy because of MINGW32.
|
---|
125 | testmath_ASFLAGS.amd64 = -m amd64
|
---|
126 | testmath_CFLAGS = -Wall -g
|
---|
127 | testmath_CFLAGS.release = -O3
|
---|
128 | testmath_LDFLAGS = -g
|
---|
129 | testmath_DEFS = MATHTEST_STANDALONE
|
---|
130 | testmath_SOURCES = Sun/testmath.c
|
---|
131 | #testmath_SOURCES += $(PATH_LIB)/RuntimeR3NoCRTGCC$(VBOX_SUFF_LIB)
|
---|
132 |
|
---|
133 |
|
---|
134 | include $(KBUILD_PATH)/subfooter.kmk
|
---|
135 |
|
---|
136 | importlib: $(LIB_REM)
|
---|