VirtualBox

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

Last change on this file since 13406 was 13384, checked in by vboxsync, 16 years ago

more MSC stuff

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.2 KB
Line 
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
22SUB_DEPTH = ../..
23include $(KBUILD_PATH)/subheader.kmk
24
25
26REM_MOD += VBoxREM
27DLLS += VBoxREM
28
29DEFS += VBOX_WITH_NEW_RECOMPILER
30$(REM_MOD)_TEMPLATE = VBOXR3NP
31
32OTHER_CLEAN +=
33
34#
35# Globals
36#
37VBOX_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
45ifdef VBOX_SOLARIS_10
46 $(REM_MOD)_DEFS.solaris = HOST_SOLARIS=10
47else
48 $(REM_MOD)_DEFS.solaris = HOST_SOLARIS=11
49endif
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
74ifeq ($(KBUILD_TARGET_ARCH),amd64)
75 $(REM_MOD)_DEFS += __x86_64__
76 $(REM_MOD)_INCS += tcg/x86_64
77else
78 $(REM_MOD)_DEFS += __i386__
79 $(REM_MOD)_INCS += tcg/i386
80endif
81
82
83$(REM_MOD)_SOURCES.debug = \
84 Sun/testmath.c
85$(REM_MOD)_SOURCES.win.x86 = $(REM_MOD).def
86ifneq ($(REM_MOD),VBoxREM2)
87 $(REM_MOD)_POST_CMDS = $(VBOX_SIGN_IMAGE_CMDS)
88endif
89
90# gcc targets
91if1of ($(KBUILD_TARGET), linux darwin solaris)
92$(REM_MOD)_CFLAGS.debug = -O0
93$(REM_MOD)_CFLAGS.release += -fomit-frame-pointer -fno-gcse
94endif
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
113if1of ($(KBUILD_TARGET), linux darwin solaris)
114$(REM_MOD)_DEFS.solaris +=
115# Extra flags for these source modules.
116target-i386/op-helper.c_CFLAGS.x86 = -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-gcse
117cpu-exec.c_CFLAGS.x86 = -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-gcse
118cpu-exec.c_CFLAGS.solaris.amd64 = -O2 -fomit-frame-pointer -fno-strict-aliasing
119endif
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.
125testmath_ASFLAGS.amd64 = -m amd64
126testmath_CFLAGS = -Wall -g
127testmath_CFLAGS.release = -O3
128testmath_LDFLAGS = -g
129testmath_DEFS = MATHTEST_STANDALONE
130testmath_SOURCES = Sun/testmath.c
131#testmath_SOURCES += $(PATH_LIB)/RuntimeR3NoCRTGCC$(VBOX_SUFF_LIB)
132
133
134include $(KBUILD_PATH)/subfooter.kmk
135
136importlib: $(LIB_REM)
Note: See TracBrowser for help on using the repository browser.

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