VirtualBox

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

Last change on this file since 13369 was 13359, checked in by vboxsync, 16 years ago

solaris new recompiler

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 5.6 KB
Line 
1# $Id: Makefile.kmk 13359 2008-10-16 22:20:52Z 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
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
53$(REM_MOD)_INCS = \
54 Sun \
55 Sun/crt \
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)_INCS += tcg/x86_64
79else
80 $(REM_MOD)_INCS += tcg/i386
81endif
82
83
84$(REM_MOD)_SOURCES.debug = \
85 Sun/testmath.c
86$(REM_MOD)_SOURCES.win.x86 = $(REM_MOD).def
87ifneq ($(REM_MOD),VBoxREM2)
88 $(REM_MOD)_POST_CMDS = $(VBOX_SIGN_IMAGE_CMDS)
89endif
90
91$(REM_MOD)_CFLAGS.linux += -Wno-unused
92$(REM_MOD)_CFLAGS.debug = -O0
93$(REM_MOD)_CFLAGS.release += -fomit-frame-pointer -fno-gcse
94$(REM_MOD)_CFLAGS.profile = $($(REM_MOD)_CFLAGS.release)
95$(REM_MOD)_CFLAGS.kprofile = $($(REM_MOD)_CFLAGS.release)
96
97$(REM_MOD)_DEFS += IN_RING3 LOG_USE_C99 $(ARCH_BITS_DEFS)
98#$(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.
99
100$(REM_MOD)_LDFLAGS.darwin = -read_only_relocs suppress -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/$(REM_MOD).dylib -multiple_defined warning
101$(REM_MOD)_LDFLAGS.l4 = -T$(L4_LIBDIR)/../main_rel.ld -nostdlib -Wl,--no-undefined
102$(REM_MOD)_LDFLAGS.linux = $(VBOX_LD_as_needed)
103$(REM_MOD)_LDFLAGS.os2 = -Zomf
104$(REM_MOD)_LDFLAGS.debug = -g
105$(REM_MOD)_LDFLAGS.solaris = -mimpure-text
106
107$(REM_MOD)_LIBS = \
108 $(LIB_VMM) \
109 $(LIB_RUNTIME)
110
111
112# Extra flags for these source modules.
113target-i386/op-helper.c_CFLAGS.x86 = -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-gcse
114cpu-exec.c_CFLAGS.x86 = -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-gcse
115cpu-exec.c_CFLAGS.solaris.amd64 = -O2 -fomit-frame-pointer -fno-strict-aliasing
116
117
118#
119# The math testcase as a standalone program for testing and debugging purposes.
120#
121## @todo This is a bit messy because of MINGW32.
122testmath_ASFLAGS.amd64 = -m amd64
123testmath_CFLAGS = -Wall -g
124testmath_CFLAGS.release = -O3
125testmath_LDFLAGS = -g
126testmath_DEFS = MATHTEST_STANDALONE
127testmath_SOURCES = Sun/testmath.c
128#testmath_SOURCES += $(PATH_LIB)/RuntimeR3NoCRTGCC$(VBOX_SUFF_LIB)
129
130
131#
132# The VBoxREM import library.
133#
134VBoxREMImp_TEMPLATE = VBOXR3
135ifeq ($(KBUILD_TARGET),darwin)
136VBoxREMImp_INST = $(INST_LIB)
137endif
138VBoxREMImp_SOURCES.win = VBoxREM.def
139VBoxREMImp_SOURCES.os2 = $(PATH_VBoxREMImp)/VBoxREMOS2.def
140ifeq ($(filter win os2,$(KBUILD_TARGET)),)
141VBoxREMImp_SOURCES = $(PATH_VBoxREMImp)/VBoxREMImp.c
142VBoxREMImp_CLEAN = $(PATH_VBoxREMImp)/VBoxREMImp.c
143endif
144ifneq ($(filter-out darwin os2 win,$(KBUILD_TARGET)),)
145VBoxREMImp_SONAME = VBoxREM$(SUFF_DLL)
146endif
147VBoxREMImp_LDFLAGS.darwin = -install_name $(VBOX_DYLD_EXECUTABLE_PATH)/VBoxREM.dylib
148VBoxREMImp_LDFLAGS.l4 = -T$(L4_LIBDIR)/../main_rel.ld -nostdlib
149
150$$(PATH_VBoxREMImp)/VBoxREMImp.c: $(VBOX_PATH_RECOMPILER_SRC)/VBoxREM.def $(VBOX_PATH_RECOMPILER_SRC)/Sun/deftoimp.sed $(MAKEFILE_CURRENT) | $$(dir $$@)
151 $(call MSG_GENERATE,,$@)
152 $(QUIET)$(APPEND) -t $@ '#ifdef VBOX_HAVE_VISIBILITY_HIDDEN'
153 $(QUIET)$(APPEND) $@ '# define EXPORT __attribute__((visibility("default")))'
154 $(QUIET)$(APPEND) $@ '#else'
155 $(QUIET)$(APPEND) $@ '# define EXPORT'
156 $(QUIET)$(APPEND) $@ '#endif'
157 $(QUIET)$(APPEND) $@ ''
158 $(QUIET)$(SED) -f $(VBOX_PATH_RECOMPILER_SRC)/Sun/deftoimp.sed --append $@ $<
159
160$$(PATH_VBoxREMImp)/VBoxREMOS2.def: $(VBOX_PATH_RECOMPILER_SRC)/VBoxREM.def $(MAKEFILE_CURRENT) | $$(dir $$@)
161 $(SED) \
162 -e 's/^[ \t][ \t]*REMR3/ _REMR3/' \
163 -e 's/\.[Dd][Ll][Ll]//' \
164 -e 's/^LIBRARY .*/LIBRARY VBoxREM INITINSTANCE TERMINSTANCE\nDATA MULTIPLE\n/' \
165 --output $@ \
166 $<
167
168include $(KBUILD_PATH)/subfooter.kmk
169
170importlib: $(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