VirtualBox

source: vbox/trunk/src/recompiler/Makefile.kmk@ 2456

Last change on this file since 2456 was 2456, checked in by vboxsync, 18 years ago

Some build message adjustments. (depends on new kBuild)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 15.9 KB
Line 
1# $Id: Makefile.kmk 2456 2007-05-03 00:57:07Z vboxsync $
2## @file
3# The Recompiler Makefile.
4#
5# There are a few of complicating factors here, esp. on AMD64 systems:
6#
7# * op.c doesn't compile work correctly with gcc 4. For this we've
8# checked in op.S, which is the reason why we don't compile op.c
9# directly but always compile via the assembly file.s
10# * On 64-bit Windows we lack a compiler and have to resort to a
11# linux cross compiler building an ELF relocatable module which
12# we then load using a wrapper module. Thus the REM_MOD mess.
13# * On platforms using the 64-bit GCC ABI, we're not allowed to
14# generate non-PIC shared objects, and op.c requires the code
15# to be non-PIC. We apply the same trick as we developed for
16# 64-bit windows.
17#
18
19#
20# Copyright (C) 2006 InnoTek Systemberatung GmbH
21#
22# This file is part of VirtualBox Open Source Edition (OSE), as
23# available from http://www.virtualbox.org. This file is free software;
24# you can redistribute it and/or modify it under the terms of the GNU
25# General Public License as published by the Free Software Foundation,
26# in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
27# distribution. VirtualBox OSE is distributed in the hope that it will
28# be useful, but WITHOUT ANY WARRANTY of any kind.
29#
30# If you received this file as part of a commercial VirtualBox
31# distribution, then only the terms of your commercial VirtualBox
32# license agreement apply instead of the previous paragraph.
33#
34
35
36DEPTH = ../..
37include $(PATH_KBUILD)/header.kmk
38
39
40# todo this is a BUILD_PLATFORM binary, to a target binary!
41BLDPROGS = dyngen
42ifeq ($(BUILD_TARGET_ARCH),amd64)
43 SYSMODS = VBoxREM2
44 REM_MOD = VBoxREM2
45else
46 REM_MOD = VBoxREM
47endif
48DLLS = VBoxREM
49IMPORT_LIBS = VBoxREMImp
50
51OTHER_CLEAN = \
52 $(PATH_$(REM_MOD))/op.h \
53 $(PATH_$(REM_MOD))/opc.h \
54 $(PATH_$(REM_MOD))/gen-op.h \
55 $(PATH_$(REM_MOD))/opc.h
56
57DEFS.amd64 += REM_PHYS_ADDR_IN_TLB
58
59#
60# L4 must use the no-crt path because it's lacking math stuff it seems...
61# Darwin must use the non-crt path because it can't compile op.c nativly.
62# All the AMD64 target must use the no-crt path because ELF doesn't like op.c
63# when stuffed into a shared library and windows doesn't have 64-bit gcc (yet).
64#
65ifeq ($(filter-out l4 darwin freebsd,$(BUILD_TARGET)),)
66 REM_USE_NOCRT := 1
67endif
68ifeq ($(BUILD_TARGET_ARCH),amd64)
69 REM_USE_NOCRT := 1
70endif
71
72
73#
74# The dyngen build tool.
75#
76ifeq ($(BUILD_PLATFORM),win)
77 dyngen_TOOL = MINGW32
78 dyngen_SDKS = W32API
79 # On 64-bit Windows we pretend to be 32-bit.
80 dyngen_BLD_TRG_ARCH = x86
81 dyngen_BLD_TRG_CPU = i386
82 dyngen_CFLAGS = -Wall -g -fno-strict-aliasing
83 ifeq ($(BUILD_TARGET_ARCH),amd64)
84 dyngen_DEFS += HOST_X86_64=1
85 endif
86else
87 dyngen_TEMPLATE = VBOXBLDPROG
88endif
89dyngen_CFLAGS += -Wno-missing-prototypes -Wno-missing-declarations
90dyngen_INCS = \
91 InnoTek \
92 target-i386 \
93 fpu
94dyngen_SOURCES = dyngen.c
95
96
97#
98# The VBoxREM.[dll|so|..] or VBoxREM2.rel.
99#
100$(REM_MOD)_DEFS = IN_REM_R3 REM_INCLUDE_CPU_H
101#$(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.
102
103$(REM_MOD)_INCS = \
104 InnoTek \
105 InnoTek/crt\
106 target-i386 \
107 fpu \
108 $(PATH_$(REM_MOD)) \
109 $(PATH_ROOT)/src/VBox/VMM
110
111$(REM_MOD)_SOURCES = \
112 VBoxRecompiler.c \
113 cpu-exec.c \
114 exec.c \
115 translate-all.c \
116 translate-op.c \
117 fpu/softfloat-native.c \
118 target-i386/helper.c \
119 target-i386/helper2.c \
120 target-i386/translate.c \
121 InnoTek/testmath.c
122ifeq ($(filter-out win os2,$(BUILD_TARGET)),)
123 $(REM_MOD)_SOURCES += target-i386/op.c
124 FILE_OP_OBJ = $(PATH_$(REM_MOD)_target-i386/op.c)/op.o
125else # The remaining targets can be using gcc-4 and needs checking.
126 $(REM_MOD)_SOURCES += $(PATH_$(REM_MOD))/op.S
127 FILE_OP_OBJ = $(PATH_$(REM_MOD)_$(PATH_$(REM_MOD))/op.S)/op.o
128 $(REM_MOD)_CLEAN = $(FILE_OP_OBJ) $(PATH_$(REM_MOD))/op.S.dep
129endif
130#$(REM_MOD)_SOURCES.os2 = $(PATH_TARGET)/$(REM_MOD).def
131$(REM_MOD)_SOURCES.win.x86 = $(REM_MOD).def
132
133
134ifdef REM_USE_NOCRT
135 $(REM_MOD)_TEMPLATE = VBOXNOCRTGAS
136 $(REM_MOD)_DEFS += LOG_USE_C99
137 $(REM_MOD)_CFLAGS.amd64 = -O2
138 $(REM_MOD)_CFLAGS.debug = -O0
139 $(REM_MOD)_CFLAGS.darwin = -fno-common -mdynamic-no-pic
140 ifdef ($(BUILD_TARGET_ARCH),x86)
141 $(REM_MOD)_CFLAGS.release+= -fomit-frame-pointer -fno-gcse
142 endif
143
144 # This doesn't fit in IPRT because it requires GAS and is LGPL.
145 $(REM_MOD)_SOURCES += \
146 InnoTek/e_powl-$(BUILD_TARGET_ARCH).S
147
148 ifeq ($(REM_MOD),VBoxREM)
149 $(REM_MOD)_LIBS = \
150 $(PATH_LIB)/RuntimeR3NoCRTGCC$(VBOX_SUFF_LIB) \
151 $(LIB_VMM) \
152 $(LIB_RUNTIME)
153 $(REM_MOD)_LIBS.darwin = \
154 $(TARGET_VBoxREMImp)
155# $(PATH_BIN)/VBoxREMImp.dylib
156 $(REM_MOD)_LDFLAGS.darwin = -read_only_relocs suppress -multiply_defined warning #-install_name @executable_path/$(REM_MOD).dylib#
157 else
158 $(REM_MOD)_LIBS = \
159 $(PATH_LIB)/RuntimeR3NoCRTGCC$(VBOX_SUFF_LIB)
160 $(REM_MOD)_SYSSUFF = .rel
161 endif
162
163else # !REM_USE_NOCRT
164
165 $(REM_MOD)_TOOL = GCC3
166 $(REM_MOD)_TOOL.win.x86 = MINGW32
167 $(REM_MOD)_TOOL.win.amd64 = XGCCAMD64LINUX
168 $(REM_MOD)_SDKS.win.x86 = W32API ## @todo do we really need this now?
169 $(REM_MOD)_ASFLAGS = -x assembler-with-cpp ## @todo didn't I make this default already?
170 $(REM_MOD)_CFLAGS = -Wall -g
171 $(REM_MOD)_CFLAGS.debug = -O0
172 $(REM_MOD)_CFLAGS.release += -fomit-frame-pointer -fno-gcse
173 $(REM_MOD)_CFLAGS.profile = $($(REM_MOD)_CFLAGS.release)
174 $(REM_MOD)_CFLAGS.kprofile = $($(REM_MOD)_CFLAGS.release)
175 $(REM_MOD)_CFLAGS.l4 = -nostdinc
176 ifeq ($(BUILD_TARGET),l4)
177 $(REM_MOD)_INCS += $(VBOX_L4_GCC3_INCS) $(L4_INCDIR)
178 endif
179
180 $(REM_MOD)_DEFS += IN_RING3 LOG_USE_C99
181 #$(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.
182 # these defines are probably all irrelevant now:
183 $(REM_MOD)_DEFS += _GNU_SOURCE _FILE_OFFSET_BITS=64 _LARGEFILE_SOURCE _REENTRANT
184
185 $(REM_MOD)_LDFLAGS.darwin = -read_only_relocs suppress -install_name @executable_path/$(REM_MOD).dylib -multiple_defined warning
186 $(REM_MOD)_LDFLAGS.l4 = -T$(L4_LIBDIR)/../main_rel.ld -nostdlib -Wl,--no-undefined
187 $(REM_MOD)_LDFLAGS.os2 = -Zomf
188 $(REM_MOD)_LDFLAGS.debug = -g
189 ifeq ($(BUILD_TARGET_ARCH),amd64)
190 $(REM_MOD)_LIBS = $(FILE_TOOL_GCC3_LIBGCC)
191 else # x86
192 $(REM_MOD)_LIBS = \
193 $(LIB_VMM) \
194 $(LIB_RUNTIME)
195 $(REM_MOD)_LIBS.win.x86 = \
196 mingw32 \
197 user32 gdi32 winmm ws2_32 iphlpapi dxguid
198 $(REM_MOD)_LIBS.linux = \
199 $(LIB_UUID) \
200 m \
201 util \
202 rt \
203 $(LIB_PTHREAD)
204 $(REM_MOD)_LIBS.l4 = \
205 gcc \
206 $(L4_LIBDIR)/libvboxserver.s.so \
207 $(L4_LIBDIR)/libdl.s.so \
208 $(L4_LIBDIR)/libuc.0.s.so
209 endif # x86
210
211endif # !REM_USE_NOCRT
212
213# Extra flags for these source modules.
214target-i386/op.c_CFLAGS = -O2 -fno-strict-aliasing -fomit-frame-pointer -falign-functions=0 -fno-reorder-blocks -fno-optimize-sibling-calls
215target-i386/op.c_CFLAGS.x86 = -fno-gcse -fno-instrument-functions -mpreferred-stack-boundary=2
216target-i386/op.c_CFLAGS.darwin.x86 = -m128bit-long-double -mpreferred-stack-boundary=4
217target-i386/helper.c_CFLAGS.x86 = -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-gcse
218cpu-exec.c_CFLAGS.x86 = -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-gcse
219
220
221#
222# The math testcase as a standalone program for testing and debugging purposes.
223#
224## @todo This is a bit messy because of MINGW32.
225#BLDPROGS += testmath
226testmath_TOOL = GCC3
227testmath_TOOL.win.x86 = MINGW32
228testmath_SDKS.win.x86 = W32API
229ifeq ($(BUILD_PLATFORM).$(BUILD_PLATFORM_ARCH),win.amd64)
230 # 64-bit windows: Pretend to be 32-bit.
231 testmath_BLD_TRG = win32
232 testmath_BLD_TRG_ARCH = x86
233 testmath_BLD_TRG_CPU = i386
234endif
235testmath_ASTOOL = $(VBOX_ASTOOL)
236ifeq ($(filter-out win32 win64,$(BUILD_PLATFORM)),)
237 testmath_ASFLAGS = -f win32 -DNASM_FORMAT_PE $(VBOX_ASFLAGS) -w+orphan-labels
238else
239 testmath_ASFLAGS = -f elf -DNASM_FORMAT_ELF $(VBOX_ASFLAGS) -w+orphan-labels
240endif
241testmath_ASFLAGS.amd64 = -m amd64
242testmath_CFLAGS = -Wall -g
243testmath_CFLAGS.release = -O3
244testmath_LDFLAGS = -g
245testmath_DEFS = MATHTEST_STANDALONE
246testmath_SOURCES = InnoTek/testmath.c
247#testmath_SOURCES += $(PATH_LIB)/RuntimeR3NoCRTGCC$(VBOX_SUFF_LIB)
248
249
250ifeq ($(BUILD_TARGET_ARCH),amd64)
251#
252# The VBoxREM2 wrapper.
253#
254VBoxREM_TEMPLATE = VBOXR3
255VBoxREM_DEFS = IN_REM_R3
256VBoxREM_SOURCES = \
257 VBoxREMWrapper.cpp \
258 VBoxREMWrapperA.asm
259VBoxREM_LDFLAGS.darwin = -install_name @executable_path/VBoxREM.dylib
260VBoxREM_LIBS = \
261 $(LIB_VMM) \
262 $(LIB_RUNTIME)
263endif
264
265
266#
267# The VBoxREM import library.
268#
269VBoxREMImp_TEMPLATE = VBOXR3
270ifeq ($(BUILD_TARGET),darwin)
271VBoxREMImp_INST = $(INST_LIB)
272endif
273VBoxREMImp_SOURCES.win = VBoxREM.def
274VBoxREMImp_SOURCES.os2 = $(PATH_TARGET)/VBoxREMOS2.def
275ifeq ($(filter win os2,$(BUILD_TARGET)),)
276VBoxREMImp_SOURCES = $(PATH_TARGET)/VBoxREMImp.c
277VBoxREMImp_CLEAN = $(PATH_TARGET)/VBoxREMImp.c
278endif
279VBoxREMImp_SONAME.linux = VBoxREM.so
280VBoxREMImp_SONAME.l4 = VBoxREM.s.so
281VBoxREMImp_LDFLAGS.darwin = -install_name @executable_path/VBoxREM.dylib
282#VBoxREMImp_LDFLAGS.darwin = -install_name VBoxREM.dylib
283VBoxREMImp_LDFLAGS.l4 = -T$(L4_LIBDIR)/../main_rel.ld -nostdlib
284
285$(PATH_TARGET)/VBoxREMImp.c: VBoxREM.def InnoTek/deftoimp.sed Makefile.kmk | $(call DIRDEP,$(PATH_TARGET))
286 $(MKDIR) -p $(PATH_TARGET)
287 $(APPEND) [email protected] '#ifdef VBOX_HAVE_VISIBILITY_HIDDEN'
288 $(APPEND) [email protected] '# define EXPORT __attribute__((visibility("default")))'
289 $(APPEND) [email protected] '#else'
290 $(APPEND) [email protected] '# define EXPORT'
291 $(APPEND) [email protected] '#endif'
292 $(APPEND) [email protected] ''
293 $(SED) -f InnoTek/deftoimp.sed VBoxREM.def >> [email protected]
294 $(MV) -f [email protected] $@
295
296$(VBoxREMImp_SOURCES.os2): VBoxREM.def $(MAKEFILE) | $(call DIRDEP,$(PATH_TARGET))
297 $(SED) \
298 -e 's/^[ \t][ \t]*REMR3/ _REMR3/' \
299 -e 's/\.[Dd][Ll][Ll]//' \
300 -e 's/^LIBRARY .*/LIBRARY VBoxREM INITINSTANCE TERMINSTANCE\nDATA MULTIPLE\n/' \
301 VBoxREM.def > [email protected]
302 $(MV) -f [email protected] $@
303
304
305
306include $(PATH_KBUILD)/footer.kmk
307
308
309#
310# Generate the op.S file somehow...
311#
312# Gathering the flags, defines and include dirs for the command is a lot
313# of work. Unfortunately, there is only a highly specialized kBuild function
314# for doing this, so we're currently left to our own devices here.
315#
316# Add something like VBOX_RECOMPILER_OP_GCC = gcc-3.4.6 to LocalConfig.kmk
317# to be 100% sure that you get a working op.S. My gcc 4.1.1 seems to work
318# fine, so feel free to try VBOX_RECOMPILER_OP_GCC = gcc.
319#
320# The op-undefined.lst is generated by finding all the undefined symbols
321# in one (or more) ELF op.o files using nm.
322#
323ifndef VBOX_RECOMPILER_OP_GCC
324 ifeq ($(BUILD_TARGET).$(BUILD_TARGET_ARCH),darwin.x86)
325 VBOX_RECOMPILER_OP_GCC ?= i386-elf-gcc-3.4.3 # (port install i386-gcc-elf)
326 VBOX_RECOMPILER_OP_GCC_OK := yes
327 VBOX_RECOMPILER_OP_GCC_INCS ?= $(abspath $(dir $(shell LC_ALL=C $(VBOX_RECOMPILER_OP_GCC) -print-libgcc-file-name)))/include
328 endif
329 ifndef VBOX_RECOMPILER_OP_GCC
330 VBOX_RECOMPILER_OP_GCC := $(TOOL_$(VBOX_GCC_TOOL)_CC)
331 VBOX_RECOMPILER_OP_GCC_OK := dunno
332 endif
333else
334 # If set, assume it's an OK compiler.
335 VBOX_RECOMPILER_OP_GCC_OK := yes
336endif
337
338
339# The command sans -o op.S.tmp.
340COMPILE_OP_CMDS = $(VBOX_RECOMPILER_OP_GCC) \
341 -S -s \
342 $(filter-out -g -O0, \
343 $($(REM_MOD)_CFLAGS) $($(REM_MOD)_CFLAGS.$(BUILD_TYPE)) $($(REM_MOD)_CFLAGS.$(BUILD_TARGET)) $($(REM_MOD)_CFLAGS.$(BUILD_TARGET_ARCH)) $($(REM_MOD)_CFLAGS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)) \
344 $(target-i386/op.c_CFLAGS) $(target-i386/op.c_CFLAGS.$(BUILD_TARGET)) $(target-i386/op.c_CFLAGS.$(BUILD_TARGET_ARCH)) $(target-i386/op.c_CFLAGS.$(BUILD_TARGET).$(BUILD_TARGET_ARCH)) \
345 ) \
346 $(addprefix -I, \
347 $($(REM_MOD)_CINCS.$(BUILD_TARGET_ARCH)) $($(REM_MOD)_CINCS.$(BUILD_TARGET)) $($(REM_MOD)_CINCS) $(CINCS) \
348 $($(REM_MOD)_INCS.$(BUILD_TARGET_ARCH)) $($(REM_MOD)_INCS.$(BUILD_TARGET)) $($(REM_MOD)_INCS) $(INCS) \
349 ) \
350 $(addprefix -D, \
351 $($(REM_MOD)_CDEFS.$(BUILD_TARGET_ARCH)) $($(REM_MOD)_CDEFS.$(BUILD_TARGET)) $($(REM_MOD)_CDEFS) $(CDEFS.$(BUILD_TARGET)) $(CDEFS.$(BUILD_TARGET_ARCH)) $(CDEFS.$(BUILD_TYPE)) $(CDEFS) \
352 $($(REM_MOD)_DEFS.$(BUILD_TARGET_ARCH)) $($(REM_MOD)_DEFS.$(BUILD_TARGET)) $($(REM_MOD)_DEFS) $(DEFS.$(BUILD_TARGET)) $(DEFS.$(BUILD_TARGET_ARCH)) $(DEFS.$(BUILD_TYPE)) $(DEFS) \
353 ) \
354 -Wp,-MD,$(PATH_$(REM_MOD))/op.S.dep \
355 -Wp,-MT,$(PATH_$(REM_MOD))/op.S \
356 -Wp,-MP \
357 target-i386/op.c
358
359# Use the right GCC includes.
360ifdef VBOX_RECOMPILER_OP_GCC_INCS
361COMPILE_OP_CMDS := $(subst $(VBOX_PATH_GCC_INCS),$(VBOX_RECOMPILER_OP_GCC_INCS),$(COMPILE_OP_CMDS))
362endif
363
364# Drop incompatible options when using the cross-compiler on darwin.
365ifeq ($(BUILD_TARGET),darwin)
366 ifeq ($(filter-out i386-elf-gcc%, $(VBOX_RECOMPILER_OP_GCC)),)
367 COMPILE_OP_CMDS := $(filter-out -mdynamic-no-pic, $(COMPILE_OP_CMDS))
368 endif
369endif
370
371# include the dependencies
372-include $(PATH_$(REM_MOD))/op.S.dep
373
374# The rule.
375$(PATH_$(REM_MOD))/op.S: \
376 target-i386/op.c \
377 InnoTek/staged-op-elf-$(BUILD_TARGET_ARCH).S \
378 InnoTek/op-validate.sed \
379 InnoTek/op-darwin.sed \
380 InnoTek/op-undefined.lst \
381 Makefile.kmk \
382 $(comp-cmds COMPILE_OP_CMDS,COMPILE_OP_CMDS_PREV,FORCE) \
383 | $(call DIRDEP,$(PATH_$(REM_MOD)))
384 $(RM) -f $@ [email protected] [email protected] [email protected]
385ifeq ($(VBOX_RECOMPILER_OP_GCC_OK),yes)
386 $(call MSG_COMPILE,VBoxREM,$<,$@,AS)
387 $(addsuffix $(SP)\$(NL)$(TAB) ,$(COMPILE_OP_CMDS)) -o [email protected]
388else ifeq ($(VBOX_RECOMPILER_OP_GCC_OK),dunno) # (permit 3.x.x and 4.1.x+ for now)
389 major_ver=`$(VBOX_RECOMPILER_OP_GCC) -dumpversion | $(SED) -e 's/^\([2-9]\)\..*$$/\1/'`; \
390 minor_ver=`$(VBOX_RECOMPILER_OP_GCC) -dumpversion | $(SED) -e 's/^[2-9]\.\([0-9]\)\..*$$/\1/'`; \
391 bugfix_ver=`$(VBOX_RECOMPILER_OP_GCC) -dumpversion | $(SED) -e 's/^[2-9]\.[0-9]\.\([0-9]\).*$$/\1/'`; \
392 if test "$$major_ver" = "3" -o "(" "$$major_ver" = "4" -a "$$minor_ver" != "0" ")"; then \
393 $(ECHO_EXT) "Compiling $< => $@ [gcc v$${major_ver}.$${minor_ver}.$${bugfix_ver}]" && \
394 $(addsuffix $(SP)\$(NL)$(TAB)$(TAB) ,$(COMPILE_OP_CMDS)) -o [email protected]; \
395 else \
396 $(ECHO_EXT) "Using staged op.S [gcc v$${major_ver}.$${minor_ver}.$${bugfix_ver}]" && \
397 $(CP_EXT) -f InnoTek/staged-op-elf-$(BUILD_TARGET_ARCH).S [email protected]; \
398 fi
399else
400 $(CP) InnoTek/staged-op-elf-$(BUILD_TARGET_ARCH).S [email protected]
401endif
402 $(SED) -f InnoTek/op-validate.sed [email protected]
403ifeq ($(BUILD_TARGET),darwin)
404 $(SED) -f InnoTek/op-darwin.sed [email protected] > [email protected]
405 $(SED) -e 's/^\(.*\)$$/#define \1 _\1/' InnoTek/op-undefined.lst > [email protected]
406 $(CAT_EXT) [email protected] >> [email protected]
407endif
408 $(MV) -f [email protected] $@
409 $(QUIET2)$(APPEND) "[email protected]"
410 $(QUIET2)$(APPEND) "[email protected]" 'define COMPILE_OP_CMDS_PREV'
411 $(QUIET2)$(APPEND) "[email protected]" '$(subst $(NL),'$(NL)$(TAB)@$(APPEND) "[email protected]" ',$(COMPILE_OP_CMDS))'
412 $(QUIET2)$(APPEND) "[email protected]" 'endef'
413
414
415# Hack for crosscompiling.
416DYNGEN = $(PATH_dyngen)/dyngen$(HOSTSUFF_EXE)
417DYNGEN_EXEC = $(DYNGEN)
418ifneq ($(BUILD_PLATFORM),$(BUILD_TARGET)) # hack for crosscompiling.
419 ifeq ($(BUILD_TARGET),win)
420 DYNGEN = $(PATH_dyngen)/dyngen.exe
421 DYNGEN_EXEC := $(EXEC_X86_WIN32) $(DYNGEN_EXEC)
422 endif
423endif
424
425# The dyngen rules.
426$(PATH_$(REM_MOD))/op.h: $(FILE_OP_OBJ) $(DYNGEN)
427 $(call MSG_TOOL,dyngen,VBoxREM,$<,$@)
428 $(QUIET)$(DYNGEN_EXEC) -o $@ $<
429
430$(PATH_$(REM_MOD))/opc.h: $(FILE_OP_OBJ) $(DYNGEN)
431 $(call MSG_TOOL,dyngen,VBoxREM,$<,$@)
432 $(QUIET)$(DYNGEN_EXEC) -c -o $@ $<
433
434$(PATH_$(REM_MOD))/gen-op.h: $(FILE_OP_OBJ) $(DYNGEN)
435 $(call MSG_TOOL,dyngen,VBoxREM,$<,$@)
436 $(QUIET)$(DYNGEN_EXEC) -g -o $@ $<
437
438# Dyngen dependants (sp?).
439translate-all.c \
440translate-op.c \
441target-i386/translate.c \
442 : $(PATH_$(REM_MOD))/op.h $(PATH_$(REM_MOD))/opc.h $(PATH_$(REM_MOD))/gen-op.h
443
444
445# Some aliases
446do_dyngen: $(PATH_$(REM_MOD))/gen-op.h $(PATH_$(REM_MOD))/opc.h $(PATH_$(REM_MOD))/op.h
447importlib: $(LIB_REM)
448op.S: $(PATH_$(REM_MOD))/op.S
449
450
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