?? makefile.target
字號:
include config.makTARGET_BASE_ARCH:=$(TARGET_ARCH)ifeq ($(TARGET_ARCH), x86_64)TARGET_BASE_ARCH:=i386endififeq ($(TARGET_ARCH), mipsn32)TARGET_BASE_ARCH:=mipsendififeq ($(TARGET_ARCH), mips64)TARGET_BASE_ARCH:=mipsendififeq ($(TARGET_ARCH), ppc64)TARGET_BASE_ARCH:=ppcendififeq ($(TARGET_ARCH), ppc64h)TARGET_BASE_ARCH:=ppcendififeq ($(TARGET_ARCH), ppcemb)TARGET_BASE_ARCH:=ppcendififeq ($(TARGET_ARCH), sparc64)TARGET_BASE_ARCH:=sparcendifTARGET_PATH=$(SRC_PATH)/target-$(TARGET_BASE_ARCH)VPATH=$(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hwCPPFLAGS=-I. -I.. -I$(TARGET_PATH) -I$(SRC_PATH) -MMD -MP -DNEED_CPU_Hifdef CONFIG_DARWIN_USERVPATH+=:$(SRC_PATH)/darwin-userCPPFLAGS+=-I$(SRC_PATH)/darwin-user -I$(SRC_PATH)/darwin-user/$(TARGET_ARCH)endififdef CONFIG_LINUX_USERVPATH+=:$(SRC_PATH)/linux-userifndef TARGET_ABI_DIR TARGET_ABI_DIR=$(TARGET_ARCH)endifCPPFLAGS+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR)endifBASE_CFLAGS=BASE_LDFLAGS=#CFLAGS+=-WerrorLIBS=HELPER_CFLAGS=$(CFLAGS)DYNGEN=../dyngen$(EXESUF)# user emulator nameifndef TARGET_ARCH2TARGET_ARCH2=$(TARGET_ARCH)endififeq ($(TARGET_ARCH),arm) ifeq ($(TARGET_WORDS_BIGENDIAN),yes) TARGET_ARCH2=armeb endifendififeq ($(TARGET_ARCH),sh4) ifeq ($(TARGET_WORDS_BIGENDIAN),yes) TARGET_ARCH2=sh4eb endifendififeq ($(TARGET_ARCH),mips) ifneq ($(TARGET_WORDS_BIGENDIAN),yes) TARGET_ARCH2=mipsel endifendififeq ($(TARGET_ARCH),mipsn32) ifneq ($(TARGET_WORDS_BIGENDIAN),yes) TARGET_ARCH2=mipsn32el endifendififeq ($(TARGET_ARCH),mips64) ifneq ($(TARGET_WORDS_BIGENDIAN),yes) TARGET_ARCH2=mips64el endifendifQEMU_USER=qemu-$(TARGET_ARCH2)# system emulator nameifdef CONFIG_SOFTMMUifeq ($(TARGET_ARCH), i386)QEMU_SYSTEM=qemu$(EXESUF)elseQEMU_SYSTEM=qemu-system-$(TARGET_ARCH2)$(EXESUF)endifelseQEMU_SYSTEM=qemu-fastendififdef CONFIG_USER_ONLYPROGS=$(QEMU_USER)elsePROGS+=$(QEMU_SYSTEM)ifndef CONFIG_SOFTMMUCONFIG_STATIC=yendifendif # !CONFIG_USER_ONLYifdef CONFIG_STATICBASE_LDFLAGS+=-staticendif# We require -O2 to avoid the stack setup prologue in EXIT_TBOP_CFLAGS := -Wall -O2 -g -fno-strict-aliasing# cc-option# Usage: OP_CFLAGS+=$(call cc-option, -falign-functions=0, -malign-functions=0)cc-option = $(shell if $(CC) $(OP_CFLAGS) $(1) -S -o /dev/null -xc /dev/null \ > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;)OP_CFLAGS+=$(call cc-option, -fno-reorder-blocks, "")OP_CFLAGS+=$(call cc-option, -fno-gcse, "")OP_CFLAGS+=$(call cc-option, -fno-tree-ch, "")OP_CFLAGS+=$(call cc-option, -fno-optimize-sibling-calls, "")OP_CFLAGS+=$(call cc-option, -fno-crossjumping, "")OP_CFLAGS+=$(call cc-option, -fno-align-labels, "")OP_CFLAGS+=$(call cc-option, -fno-align-jumps, "")OP_CFLAGS+=$(call cc-option, -fno-align-functions, $(call cc-option, -malign-functions=0, ""))OP_CFLAGS+=$(call cc-option, -fno-section-anchors, "")ifeq ($(ARCH),i386)HELPER_CFLAGS+=-fomit-frame-pointerOP_CFLAGS+=-mpreferred-stack-boundary=2 -fomit-frame-pointerifdef TARGET_GPROFUSE_I386_LD=yendififdef CONFIG_STATICUSE_I386_LD=yendififdef USE_I386_LDBASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ldelseifdef CONFIG_LINUX_USER# WARNING: this LDFLAGS is _very_ tricky : qemu is an ELF shared object# that the kernel ELF loader considers as an executable. I think this# is the simplest way to make it self virtualizable!BASE_LDFLAGS+=-Wl,-sharedendifendifendififeq ($(ARCH),x86_64) ifneq ($(CONFIG_SOLARIS),yes) BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld endifendififeq ($(ARCH),ppc)CPPFLAGS+= -D__powerpc__BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ldendififeq ($(ARCH),s390)BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ldendififeq ($(ARCH),sparc) BASE_CFLAGS+=-ffixed-g2 -ffixed-g3 OP_CFLAGS+=-fno-delayed-branch -ffixed-i0 ifeq ($(CONFIG_SOLARIS),yes) OP_CFLAGS+=-fno-omit-frame-pointer else BASE_CFLAGS+=-ffixed-g1 -ffixed-g6 HELPER_CFLAGS=$(CFLAGS) -ffixed-i0 # -static is used to avoid g1/g3 usage by the dynamic linker BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld -static endifendififeq ($(ARCH),sparc64) BASE_CFLAGS+=-ffixed-g1 -ffixed-g4 -ffixed-g5 -ffixed-g7 OP_CFLAGS+=-mcpu=ultrasparc -m64 -fno-delayed-branch -ffixed-i0 ifneq ($(CONFIG_SOLARIS),yes) BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld OP_CFLAGS+=-ffixed-g1 -ffixed-g4 -ffixed-g5 -ffixed-g7 endifendififeq ($(ARCH),alpha)# -msmall-data is not used for OP_CFLAGS because we want two-instruction# relocations for the constant constructions# Ensure there's only a single GPBASE_CFLAGS+=-msmall-dataBASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ldendififeq ($(ARCH),ia64)BASE_CFLAGS+=-mno-sdataOP_CFLAGS+=-mno-sdataBASE_LDFLAGS+=-Wl,-G0 -Wl,-T,$(SRC_PATH)/$(ARCH).ldendififeq ($(ARCH),arm)OP_CFLAGS+=-mno-sched-prolog -fno-omit-frame-pointerBASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ldendififeq ($(ARCH),m68k)OP_CFLAGS+=-fomit-frame-pointerBASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ldendififeq ($(ARCH),mips)OP_CFLAGS+=-mabi=32 -G0 -fno-PIC -mno-abicalls -fomit-frame-pointer -fno-delayed-branch -Wa,-O0ifeq ($(WORDS_BIGENDIAN),yes)BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ldelseBASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH)el.ldendifendififeq ($(ARCH),mips64)OP_CFLAGS+=-mabi=n32 -G0 -fno-PIC -mno-abicalls -fomit-frame-pointer -fno-delayed-branch -Wa,-O0ifeq ($(WORDS_BIGENDIAN),yes)BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ldelseBASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH)el.ldendifendififeq ($(CONFIG_DARWIN),yes)LIBS+=-lmxendififdef CONFIG_DARWIN_USER# Leave some space for the regular program loading zoneBASE_LDFLAGS+=-Wl,-segaddr,__STD_PROG_ZONE,0x1000 -image_base 0x0e000000endifBASE_CFLAGS+=$(OS_CFLAGS) $(ARCH_CFLAGS)BASE_LDFLAGS+=$(OS_LDFLAGS) $(ARCH_LDFLAGS)OP_CFLAGS+=$(OS_CFLAGS) $(ARCH_CFLAGS)OP_LDFLAGS+=$(OS_LDFLAGS) $(ARCH_LDFLAGS)#########################################################CPPFLAGS+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCELIBS+=-lmifndef CONFIG_USER_ONLYLIBS+=-lzendififdef CONFIG_WIN32LIBS+=-lwinmm -lws2_32 -liphlpapiendififdef CONFIG_SOLARISLIBS+=-lsocket -lnsl -lresolvifdef NEEDS_LIBSUNMATHLIBS+=-lsunmathLDFLAGS+=-L/opt/SUNWspro/prod/lib -R/opt/SUNWspro/prod/libOP_CFLAGS+=-I/opt/SUNWspro/prod/include/ccBASE_CFLAGS+=-I/opt/SUNWspro/prod/include/ccendifendif# profiling codeifdef TARGET_GPROFBASE_LDFLAGS+=-pmain.o: BASE_CFLAGS+=-pendififdef CONFIG_LINUX_USEROBJS= main.o syscall.o strace.o mmap.o signal.o path.o osdep.o thunk.o \ elfload.o linuxload.o uaccess.oLIBS+= $(AIOLIBS)ifdef TARGET_HAS_BFLTOBJS+= flatload.oendififdef TARGET_HAS_ELFLOAD32OBJS+= elfload32.oelfload32.o: elfload.cendififeq ($(TARGET_ARCH), i386)OBJS+= vm86.oendififeq ($(TARGET_ARCH), arm)OBJS+=nwfpe/fpa11.o nwfpe/fpa11_cpdo.o \nwfpe/fpa11_cpdt.o nwfpe/fpa11_cprt.o nwfpe/fpopcode.o nwfpe/single_cpdo.o \ nwfpe/double_cpdo.o nwfpe/extended_cpdo.o arm-semi.oendififeq ($(TARGET_ARCH), m68k)OBJS+= m68k-sim.o m68k-semi.oendifendif #CONFIG_LINUX_USERifdef CONFIG_DARWIN_USEROBJS= main.o commpage.o machload.o mmap.o osdep.o signal.o syscall.o thunk.oendifSRCS:= $(OBJS:.o=.c)OBJS+= libqemu.a# cpu emulator libraryLIBOBJS=exec.o kqemu.o translate-op.o translate-all.o cpu-exec.o\ translate.o op.o host-utils.oifdef CONFIG_SOFTFLOATLIBOBJS+=fpu/softfloat.oelseLIBOBJS+=fpu/softfloat-native.oendifCPPFLAGS+=-I$(SRC_PATH)/fpuifeq ($(TARGET_ARCH), i386)LIBOBJS+=helper.o helper2.oendififeq ($(TARGET_ARCH), x86_64)LIBOBJS+=helper.o helper2.oendififeq ($(TARGET_BASE_ARCH), ppc)LIBOBJS+= op_helper.o helper.oendififeq ($(TARGET_BASE_ARCH), mips)LIBOBJS+= op_helper.o helper.oendififeq ($(TARGET_BASE_ARCH), sparc)LIBOBJS+= op_helper.o helper.oendififeq ($(TARGET_BASE_ARCH), arm)LIBOBJS+= op_helper.o helper.oendififeq ($(TARGET_BASE_ARCH), sh4)LIBOBJS+= op_helper.o helper.o
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -