VirtualBox

source: vbox/trunk/src/recompiler_new/Makefile.kmk@ 13382

最後變更 在這個檔案從13382是 13370,由 vboxsync 提交於 16 年 前

MSVC related changes

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Id
檔案大小: 5.7 KB
 
1# $Id: Makefile.kmk 13370 2008-10-17 11:58:09Z 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.alldomusa.eu.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
22SUB_DEPTH = ../..
23include $(KBUILD_PATH)/subheader.kmk
24
25
26REM_MOD += VBoxREM
27DLLS += VBoxREM
28IMPORT_LIBS += VBoxREMImp
29
30DEFS += VBOX_WITH_NEW_RECOMPILER
31$(REM_MOD)_TEMPLATE = VBOXR3NP
32
33
34OTHER_CLEAN +=
35
36#
37# Globals
38#
39VBOX_PATH_RECOMPILER_SRC := $(PATH_SUB_CURRENT)
40
41# The VBoxREM.[dll|so|..] or VBoxREM2.rel.
42#
43$(REM_MOD)_DEFS = IN_REM_R3 REM_INCLUDE_CPU_H
44$(REM_MOD)_DEFS += REM_PHYS_ADDR_IN_TLB
45#$(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.
46$(REM_MOD)_DEFS.linux = _GNU_SOURCE
47ifdef VBOX_SOLARIS_10
48 $(REM_MOD)_DEFS.solaris = HOST_SOLARIS=10
49else
50 $(REM_MOD)_DEFS.solaris = HOST_SOLARIS=11
51endif
52$(REM_MOD)_DEFS.solaris +=
53
54$(REM_MOD)_INCS = \
55 Sun \
56 target-i386 \
57 tcg \
58 fpu \
59 $(PATH_$(REM_MOD)) \
60 $(PATH_ROOT)/src/VBox/VMM \
61 .
62
63$(REM_MOD)_SOURCES = \
64 VBoxRecompiler.c \
65 cpu-exec.c \
66 exec.c \
67 translate-all.c \
68 host-utils.c \
69 tcg/tcg.c \
70 tcg/tcg-dyngen.c \
71 tcg/tcg-runtime.c \
72 fpu/softfloat-native.c \
73 target-i386/op_helper.c \
74 target-i386/helper.c \
75 target-i386/translate.c
76
77ifeq ($(KBUILD_TARGET_ARCH),amd64)
78 $(REM_MOD)_DEFS += __x86_64__
79 $(REM_MOD)_INCS += tcg/x86_64
80else
81 $(REM_MOD)_DEFS += __i386__
82 $(REM_MOD)_INCS += tcg/i386
83endif
84
85
86$(REM_MOD)_SOURCES.debug = \
87 Sun/testmath.c
88$(REM_MOD)_SOURCES.win.x86 = $(REM_MOD).def
89ifneq ($(REM_MOD),VBoxREM2)
90 $(REM_MOD)_POST_CMDS = $(VBOX_SIGN_IMAGE_CMDS)
91endif
92
93# gcc targets
94if1of ($(KBUILD_TARGET), linux darwin solaris)
95$(REM_MOD)_CFLAGS.debug = -O0
96$(REM_MOD)_CFLAGS.release += -fomit-frame-pointer -fno-gcse
97endif
98$(REM_MOD)_CFLAGS.profile = $($(REM_MOD)_CFLAGS.release)
99$(REM_MOD)_CFLAGS.kprofile = $($(REM_MOD)_CFLAGS.release)
100
101$(REM_MOD)_DEFS += IN_RING3 $(ARCH_BITS_DEFS)
102#$(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.
103
104$(REM_MOD)_LDFLAGS.darwin = -read_only_relocs suppress -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/$(REM_MOD).dylib -multiple_defined warning
105$(REM_MOD)_LDFLAGS.l4 = -T$(L4_LIBDIR)/../main_rel.ld -nostdlib -Wl,--no-undefined
106$(REM_MOD)_LDFLAGS.linux = $(VBOX_LD_as_needed)
107$(REM_MOD)_LDFLAGS.os2 = -Zomf
108$(REM_MOD)_LDFLAGS.debug = -g
109$(REM_MOD)_LDFLAGS.solaris = -mimpure-text
110
111$(REM_MOD)_LIBS = \
112 $(LIB_VMM) \
113 $(LIB_RUNTIME)
114
115
116if1of ($(KBUILD_TARGET), linux darwin solaris)
117# Extra flags for these source modules.
118target-i386/op-helper.c_CFLAGS.x86 = -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-gcse
119cpu-exec.c_CFLAGS.x86 = -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-gcse
120cpu-exec.c_CFLAGS.solaris.amd64 = -O2 -fomit-frame-pointer -fno-strict-aliasing
121endif
122
123#
124# The math testcase as a standalone program for testing and debugging purposes.
125#
126## @todo This is a bit messy because of MINGW32.
127testmath_ASFLAGS.amd64 = -m amd64
128testmath_CFLAGS = -Wall -g
129testmath_CFLAGS.release = -O3
130testmath_LDFLAGS = -g
131testmath_DEFS = MATHTEST_STANDALONE
132testmath_SOURCES = Sun/testmath.c
133#testmath_SOURCES += $(PATH_LIB)/RuntimeR3NoCRTGCC$(VBOX_SUFF_LIB)
134
135
136#
137# The VBoxREM import library.
138#
139VBoxREMImp_TEMPLATE = VBOXR3
140ifeq ($(KBUILD_TARGET),darwin)
141VBoxREMImp_INST = $(INST_LIB)
142endif
143VBoxREMImp_SOURCES.win = VBoxREM.def
144VBoxREMImp_SOURCES.os2 = $(PATH_VBoxREMImp)/VBoxREMOS2.def
145ifeq ($(filter win os2,$(KBUILD_TARGET)),)
146VBoxREMImp_SOURCES = $(PATH_VBoxREMImp)/VBoxREMImp.c
147VBoxREMImp_CLEAN = $(PATH_VBoxREMImp)/VBoxREMImp.c
148endif
149ifneq ($(filter-out darwin os2 win,$(KBUILD_TARGET)),)
150VBoxREMImp_SONAME = VBoxREM$(SUFF_DLL)
151endif
152VBoxREMImp_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxREM.dylib
153VBoxREMImp_LDFLAGS.l4 = -T$(L4_LIBDIR)/../main_rel.ld -nostdlib
154
155$$(PATH_VBoxREMImp)/VBoxREMImp.c: $(VBOX_PATH_RECOMPILER_SRC)/VBoxREM.def $(VBOX_PATH_RECOMPILER_SRC)/Sun/deftoimp.sed $(MAKEFILE_CURRENT) | $$(dir $$@)
156 $(call MSG_GENERATE,,$@)
157 $(QUIET)$(APPEND) -t $@ '#ifdef VBOX_HAVE_VISIBILITY_HIDDEN'
158 $(QUIET)$(APPEND) $@ '# define EXPORT __attribute__((visibility("default")))'
159 $(QUIET)$(APPEND) $@ '#else'
160 $(QUIET)$(APPEND) $@ '# define EXPORT'
161 $(QUIET)$(APPEND) $@ '#endif'
162 $(QUIET)$(APPEND) $@ ''
163 $(QUIET)$(SED) -f $(VBOX_PATH_RECOMPILER_SRC)/Sun/deftoimp.sed --append $@ $<
164
165$$(PATH_VBoxREMImp)/VBoxREMOS2.def: $(VBOX_PATH_RECOMPILER_SRC)/VBoxREM.def $(MAKEFILE_CURRENT) | $$(dir $$@)
166 $(SED) \
167 -e 's/^[ \t][ \t]*REMR3/ _REMR3/' \
168 -e 's/\.[Dd][Ll][Ll]//' \
169 -e 's/^LIBRARY .*/LIBRARY VBoxREM INITINSTANCE TERMINSTANCE\nDATA MULTIPLE\n/' \
170 --output $@ \
171 $<
172
173include $(KBUILD_PATH)/subfooter.kmk
174
175importlib: $(LIB_REM)
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette