Annotation of qemu/Makefile.target, revision 1.1.1.5

1.1       root        1: include config.mak
                      2: 
                      3: TARGET_BASE_ARCH:=$(TARGET_ARCH)
                      4: ifeq ($(TARGET_ARCH), x86_64)
                      5: TARGET_BASE_ARCH:=i386
                      6: endif
                      7: ifeq ($(TARGET_ARCH), ppc64)
                      8: TARGET_BASE_ARCH:=ppc
                      9: endif
                     10: ifeq ($(TARGET_ARCH), sparc64)
                     11: TARGET_BASE_ARCH:=sparc
                     12: endif
                     13: TARGET_PATH=$(SRC_PATH)/target-$(TARGET_BASE_ARCH)
                     14: VPATH=$(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw:$(SRC_PATH)/audio
1.1.1.5 ! root       15: CPPFLAGS=-I. -I.. -I$(TARGET_PATH) -I$(SRC_PATH)
        !            16: ifdef CONFIG_DARWIN_USER
        !            17: VPATH+=:$(SRC_PATH)/darwin-user
        !            18: CPPFLAGS+=-I$(SRC_PATH)/darwin-user -I$(SRC_PATH)/darwin-user/$(TARGET_ARCH)
        !            19: endif
        !            20: ifdef CONFIG_LINUX_USER
1.1       root       21: VPATH+=:$(SRC_PATH)/linux-user
1.1.1.5 ! root       22: CPPFLAGS+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ARCH)
1.1       root       23: endif
1.1.1.5 ! root       24: BASE_CFLAGS=
        !            25: BASE_LDFLAGS=
1.1       root       26: #CFLAGS+=-Werror
                     27: LIBS=
                     28: HELPER_CFLAGS=$(CFLAGS)
                     29: DYNGEN=../dyngen$(EXESUF)
                     30: # user emulator name
1.1.1.3   root       31: TARGET_ARCH2=$(TARGET_ARCH)
1.1       root       32: ifeq ($(TARGET_ARCH),arm)
                     33:   ifeq ($(TARGET_WORDS_BIGENDIAN),yes)
1.1.1.3   root       34:     TARGET_ARCH2=armeb
1.1       root       35:   endif
1.1.1.3   root       36: endif
1.1.1.4   root       37: ifeq ($(TARGET_ARCH),sh4)
                     38:   ifeq ($(TARGET_WORDS_BIGENDIAN),yes)
                     39:     TARGET_ARCH2=sh4eb
                     40:   endif
                     41: endif
1.1.1.2   root       42: ifeq ($(TARGET_ARCH),mips)
1.1.1.3   root       43:   ifneq ($(TARGET_WORDS_BIGENDIAN),yes)
                     44:     TARGET_ARCH2=mipsel
1.1.1.2   root       45:   endif
                     46: endif
1.1.1.3   root       47: QEMU_USER=qemu-$(TARGET_ARCH2)
1.1       root       48: # system emulator name
                     49: ifdef CONFIG_SOFTMMU
                     50: ifeq ($(TARGET_ARCH), i386)
                     51: QEMU_SYSTEM=qemu$(EXESUF)
                     52: else
1.1.1.3   root       53: QEMU_SYSTEM=qemu-system-$(TARGET_ARCH2)$(EXESUF)
1.1       root       54: endif
                     55: else
                     56: QEMU_SYSTEM=qemu-fast
                     57: endif
                     58: 
                     59: ifdef CONFIG_USER_ONLY
                     60: PROGS=$(QEMU_USER)
                     61: else
                     62: PROGS+=$(QEMU_SYSTEM)
                     63: ifndef CONFIG_SOFTMMU
                     64: CONFIG_STATIC=y
                     65: endif
                     66: endif # !CONFIG_USER_ONLY
                     67: 
                     68: ifdef CONFIG_STATIC
1.1.1.5 ! root       69: BASE_LDFLAGS+=-static
1.1       root       70: endif
                     71: 
1.1.1.5 ! root       72: # We require -O2 to avoid the stack setup prologue in EXIT_TB
        !            73: OP_CFLAGS = -Wall -O2 -g -fno-strict-aliasing
        !            74: 
1.1       root       75: ifeq ($(ARCH),i386)
1.1.1.5 ! root       76: HELPER_CFLAGS+=-fomit-frame-pointer
        !            77: OP_CFLAGS+=-mpreferred-stack-boundary=2 -fomit-frame-pointer
1.1       root       78: ifeq ($(HAVE_GCC3_OPTIONS),yes)
                     79: OP_CFLAGS+= -falign-functions=0 -fno-gcse
                     80: else
                     81: OP_CFLAGS+= -malign-functions=0
                     82: endif
                     83: ifdef TARGET_GPROF
                     84: USE_I386_LD=y
                     85: endif
                     86: ifdef CONFIG_STATIC
                     87: USE_I386_LD=y
                     88: endif
                     89: ifdef USE_I386_LD
1.1.1.5 ! root       90: BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
1.1       root       91: else
1.1.1.5 ! root       92: ifdef CONFIG_LINUX_USER
1.1       root       93: # WARNING: this LDFLAGS is _very_ tricky : qemu is an ELF shared object
                     94: # that the kernel ELF loader considers as an executable. I think this
                     95: # is the simplest way to make it self virtualizable!
1.1.1.5 ! root       96: BASE_LDFLAGS+=-Wl,-shared
        !            97: endif
1.1       root       98: endif
                     99: endif
                    100: 
                    101: ifeq ($(ARCH),x86_64)
1.1.1.5 ! root      102: BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
1.1       root      103: endif
                    104: 
                    105: ifeq ($(ARCH),ppc)
1.1.1.5 ! root      106: CPPFLAGS+= -D__powerpc__
        !           107: ifdef CONFIG_LINUX_USER
        !           108: BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
        !           109: endif
1.1       root      110: endif
                    111: 
                    112: ifeq ($(ARCH),s390)
1.1.1.5 ! root      113: BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
1.1       root      114: endif
                    115: 
                    116: ifeq ($(ARCH),sparc)
1.1.1.4   root      117: ifeq ($(CONFIG_SOLARIS),yes)
1.1.1.5 ! root      118: BASE_CFLAGS+=-mcpu=ultrasparc -m32 -ffixed-g2 -ffixed-g3
        !           119: BASE_LDFLAGS+=-m32
        !           120: OP_CFLAGS+=-fno-delayed-branch -fno-omit-frame-pointer -ffixed-i0
1.1.1.4   root      121: else
1.1.1.5 ! root      122: BASE_CFLAGS+=-mcpu=ultrasparc -m32 -ffixed-g1 -ffixed-g2 -ffixed-g3 -ffixed-g6
        !           123: BASE_LDFLAGS+=-m32
        !           124: OP_CFLAGS+=-fno-delayed-branch -ffixed-i0
1.1       root      125: HELPER_CFLAGS=$(CFLAGS) -ffixed-i0 -mflat
                    126: # -static is used to avoid g1/g3 usage by the dynamic linker
1.1.1.5 ! root      127: BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld -static
1.1       root      128: endif
1.1.1.4   root      129: endif
1.1       root      130: 
                    131: ifeq ($(ARCH),sparc64)
1.1.1.5 ! root      132: BASE_CFLAGS+=-mcpu=ultrasparc -m64 -ffixed-g1 -ffixed-g4 -ffixed-g5 -ffixed-g7
        !           133: BASE_LDFLAGS+=-m64
        !           134: BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
        !           135: OP_CFLAGS+=-mcpu=ultrasparc -m64 -ffixed-g1 -ffixed-g4 -ffixed-g5 -ffixed-g7 -fno-delayed-branch -ffixed-i0
1.1       root      136: endif
                    137: 
                    138: ifeq ($(ARCH),alpha)
1.1.1.5 ! root      139: # -msmall-data is not used for OP_CFLAGS because we want two-instruction
        !           140: # relocations for the constant constructions
1.1       root      141: # Ensure there's only a single GP
1.1.1.5 ! root      142: BASE_CFLAGS+=-msmall-data
        !           143: BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
1.1       root      144: endif
                    145: 
                    146: ifeq ($(ARCH),ia64)
1.1.1.5 ! root      147: BASE_CFLAGS+=-mno-sdata
        !           148: OP_CFLAGS+=-mno-sdata
        !           149: BASE_LDFLAGS+=-Wl,-G0 -Wl,-T,$(SRC_PATH)/$(ARCH).ld
1.1       root      150: endif
                    151: 
                    152: ifeq ($(ARCH),arm)
1.1.1.5 ! root      153: OP_CFLAGS+=-mno-sched-prolog -fno-omit-frame-pointer
        !           154: BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
1.1       root      155: endif
                    156: 
                    157: ifeq ($(ARCH),m68k)
1.1.1.5 ! root      158: OP_CFLAGS+=-fomit-frame-pointer
        !           159: BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
        !           160: endif
        !           161: 
        !           162: ifeq ($(ARCH),mips)
        !           163: BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld
1.1       root      164: endif
                    165: 
                    166: ifeq ($(HAVE_GCC3_OPTIONS),yes)
                    167: # very important to generate a return at the end of every operation
                    168: OP_CFLAGS+=-fno-reorder-blocks -fno-optimize-sibling-calls
                    169: endif
                    170: 
                    171: ifeq ($(CONFIG_DARWIN),yes)
                    172: LIBS+=-lmx
                    173: endif
                    174: 
1.1.1.5 ! root      175: ifdef CONFIG_DARWIN_USER
        !           176: # Leave some space for the regular program loading zone
        !           177: BASE_LDFLAGS+=-Wl,-segaddr,__STD_PROG_ZONE,0x1000 -image_base 0x0e000000
        !           178: endif
        !           179: 
        !           180: OP_CFLAGS+=$(OS_CFLAGS)
        !           181: 
1.1       root      182: #########################################################
                    183: 
1.1.1.5 ! root      184: CPPFLAGS+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
1.1       root      185: LIBS+=-lm
                    186: ifndef CONFIG_USER_ONLY
                    187: LIBS+=-lz
                    188: endif
                    189: ifdef CONFIG_WIN32
                    190: LIBS+=-lwinmm -lws2_32 -liphlpapi
                    191: endif
1.1.1.3   root      192: ifdef CONFIG_SOLARIS
                    193: LIBS+=-lsocket -lnsl -lresolv
                    194: endif
1.1       root      195: 
                    196: # profiling code
                    197: ifdef TARGET_GPROF
1.1.1.5 ! root      198: BASE_LDFLAGS+=-p
        !           199: main.o: BASE_CFLAGS+=-p
1.1       root      200: endif
                    201: 
1.1.1.5 ! root      202: ifdef CONFIG_LINUX_USER
1.1.1.4   root      203: OBJS= main.o syscall.o mmap.o signal.o path.o osdep.o thunk.o \
                    204:       elfload.o linuxload.o
                    205: ifdef TARGET_HAS_BFLT
                    206: OBJS+= flatload.o
                    207: endif
                    208: 
1.1       root      209: ifeq ($(TARGET_ARCH), i386)
                    210: OBJS+= vm86.o
                    211: endif
                    212: ifeq ($(TARGET_ARCH), arm)
                    213: OBJS+=nwfpe/fpa11.o nwfpe/fpa11_cpdo.o \
                    214: nwfpe/fpa11_cpdt.o nwfpe/fpa11_cprt.o nwfpe/fpopcode.o nwfpe/single_cpdo.o \
                    215:  nwfpe/double_cpdo.o nwfpe/extended_cpdo.o arm-semi.o
                    216: endif
1.1.1.5 ! root      217: ifeq ($(TARGET_ARCH), m68k)
        !           218: OBJS+= m68k-sim.o m68k-semi.o
        !           219: endif
        !           220: endif #CONFIG_LINUX_USER
        !           221: 
        !           222: ifdef CONFIG_DARWIN_USER
        !           223: OBJS= main.o commpage.o machload.o mmap.o osdep.o signal.o syscall.o thunk.o
        !           224: endif
        !           225: 
1.1       root      226: SRCS:= $(OBJS:.o=.c)
                    227: OBJS+= libqemu.a
                    228: 
                    229: # cpu emulator library
                    230: LIBOBJS=exec.o kqemu.o translate-op.o translate-all.o cpu-exec.o\
                    231:         translate.o op.o 
                    232: ifdef CONFIG_SOFTFLOAT
                    233: LIBOBJS+=fpu/softfloat.o
                    234: else
                    235: LIBOBJS+=fpu/softfloat-native.o
                    236: endif
1.1.1.5 ! root      237: CPPFLAGS+=-I$(SRC_PATH)/fpu
1.1       root      238: 
                    239: ifeq ($(TARGET_ARCH), i386)
                    240: LIBOBJS+=helper.o helper2.o
                    241: ifeq ($(ARCH), i386)
                    242: LIBOBJS+=translate-copy.o
                    243: endif
                    244: endif
                    245: 
                    246: ifeq ($(TARGET_ARCH), x86_64)
                    247: LIBOBJS+=helper.o helper2.o
                    248: endif
                    249: 
                    250: ifeq ($(TARGET_BASE_ARCH), ppc)
                    251: LIBOBJS+= op_helper.o helper.o
                    252: endif
                    253: 
                    254: ifeq ($(TARGET_ARCH), mips)
                    255: LIBOBJS+= op_helper.o helper.o
                    256: endif
                    257: 
                    258: ifeq ($(TARGET_BASE_ARCH), sparc)
                    259: LIBOBJS+= op_helper.o helper.o
                    260: endif
                    261: 
                    262: ifeq ($(TARGET_BASE_ARCH), arm)
1.1.1.2   root      263: LIBOBJS+= op_helper.o helper.o
1.1       root      264: endif
                    265: 
1.1.1.3   root      266: ifeq ($(TARGET_BASE_ARCH), sh4)
                    267: LIBOBJS+= op_helper.o helper.o
                    268: endif
                    269: 
1.1.1.5 ! root      270: ifeq ($(TARGET_BASE_ARCH), m68k)
        !           271: LIBOBJS+= helper.o
        !           272: endif
        !           273: 
1.1       root      274: # NOTE: the disassembler code is only needed for debugging
                    275: LIBOBJS+=disas.o 
                    276: ifeq ($(findstring i386, $(TARGET_ARCH) $(ARCH)),i386)
                    277: USE_I386_DIS=y
                    278: endif
                    279: ifeq ($(findstring x86_64, $(TARGET_ARCH) $(ARCH)),x86_64)
                    280: USE_I386_DIS=y
                    281: endif
                    282: ifdef USE_I386_DIS
                    283: LIBOBJS+=i386-dis.o
                    284: endif
                    285: ifeq ($(findstring alpha, $(TARGET_ARCH) $(ARCH)),alpha)
                    286: LIBOBJS+=alpha-dis.o
                    287: endif
                    288: ifeq ($(findstring ppc, $(TARGET_BASE_ARCH) $(ARCH)),ppc)
                    289: LIBOBJS+=ppc-dis.o
                    290: endif
                    291: ifeq ($(findstring mips, $(TARGET_ARCH) $(ARCH)),mips)
                    292: LIBOBJS+=mips-dis.o
                    293: endif
                    294: ifeq ($(findstring sparc, $(TARGET_BASE_ARCH) $(ARCH)),sparc)
                    295: LIBOBJS+=sparc-dis.o
                    296: endif
                    297: ifeq ($(findstring arm, $(TARGET_ARCH) $(ARCH)),arm)
                    298: LIBOBJS+=arm-dis.o
                    299: endif
1.1.1.2   root      300: ifeq ($(findstring m68k, $(TARGET_ARCH) $(ARCH)),m68k)
                    301: LIBOBJS+=m68k-dis.o
                    302: endif
1.1.1.3   root      303: ifeq ($(findstring sh4, $(TARGET_ARCH) $(ARCH)),sh4)
                    304: LIBOBJS+=sh4-dis.o
1.1       root      305: endif
1.1.1.3   root      306: 
1.1       root      307: ifdef CONFIG_GDBSTUB
                    308: OBJS+=gdbstub.o
                    309: endif
                    310: 
                    311: all: $(PROGS)
                    312: 
                    313: $(QEMU_USER): $(OBJS)
1.1.1.5 ! root      314:        $(CC) $(LDFLAGS) $(BASE_LDFLAGS) -o $@ $^  $(LIBS)
1.1       root      315: ifeq ($(ARCH),alpha)
                    316: # Mark as 32 bit binary, i. e. it will be mapped into the low 31 bit of
                    317: # the address space (31 bit so sign extending doesn't matter)
                    318:        echo -ne '\001\000\000\000' | dd of=qemu bs=1 seek=48 count=4 conv=notrunc
                    319: endif
                    320: 
                    321: # must use static linking to avoid leaving stuff in virtual address space
1.1.1.5 ! root      322: VL_OBJS=vl.o osdep.o readline.o monitor.o pci.o console.o loader.o isa_mmio.o
        !           323: VL_OBJS+=cutils.o
        !           324: VL_OBJS+=block.o block-raw.o
        !           325: VL_OBJS+=block-cow.o block-qcow.o aes.o block-vmdk.o block-cloop.o block-dmg.o block-bochs.o block-vpc.o block-vvfat.o block-qcow2.o
1.1.1.3   root      326: ifdef CONFIG_WIN32
                    327: VL_OBJS+=tap-win32.o
                    328: endif
1.1       root      329: 
1.1.1.2   root      330: SOUND_HW = sb16.o es1370.o
1.1       root      331: AUDIODRV = audio.o noaudio.o wavaudio.o
                    332: ifdef CONFIG_SDL
                    333: AUDIODRV += sdlaudio.o
                    334: endif
                    335: ifdef CONFIG_OSS
                    336: AUDIODRV += ossaudio.o
                    337: endif
1.1.1.2   root      338: ifdef CONFIG_COREAUDIO
                    339: AUDIODRV += coreaudio.o
                    340: endif
                    341: ifdef CONFIG_ALSA
                    342: AUDIODRV += alsaaudio.o
                    343: LIBS += -lasound
                    344: endif
                    345: ifdef CONFIG_DSOUND
                    346: AUDIODRV += dsoundaudio.o
                    347: LIBS += -lole32 -ldxguid
1.1       root      348: endif
                    349: ifdef CONFIG_FMOD
                    350: AUDIODRV += fmodaudio.o
1.1.1.5 ! root      351: audio.o fmodaudio.o: CPPFLAGS := -I$(CONFIG_FMOD_INC) $(CPPFLAGS)
1.1       root      352: LIBS += $(CONFIG_FMOD_LIB)
                    353: endif
1.1.1.2   root      354: ifdef CONFIG_ADLIB
                    355: SOUND_HW += fmopl.o adlib.o
                    356: endif
1.1.1.4   root      357: AUDIODRV+= wavcapture.o
                    358: 
                    359: # SCSI layer
                    360: VL_OBJS+= scsi-disk.o cdrom.o lsi53c895a.o
1.1.1.2   root      361: 
                    362: # USB layer
1.1.1.4   root      363: VL_OBJS+= usb.o usb-hub.o usb-linux.o usb-hid.o usb-ohci.o usb-msd.o
1.1.1.3   root      364: 
                    365: # PCI network cards
1.1.1.4   root      366: VL_OBJS+= ne2000.o rtl8139.o pcnet.o
1.1       root      367: 
                    368: ifeq ($(TARGET_BASE_ARCH), i386)
                    369: # Hardware support
1.1.1.3   root      370: VL_OBJS+= ide.o pckbd.o ps2.o vga.o $(SOUND_HW) dma.o $(AUDIODRV)
                    371: VL_OBJS+= fdc.o mc146818rtc.o serial.o i8259.o i8254.o pcspk.o pc.o
1.1.1.4   root      372: VL_OBJS+= cirrus_vga.o mixeng.o apic.o parallel.o acpi.o piix_pci.o
1.1.1.5 ! root      373: VL_OBJS+= usb-uhci.o smbus_eeprom.o
        !           374: CPPFLAGS += -DHAS_AUDIO
1.1       root      375: endif
                    376: ifeq ($(TARGET_BASE_ARCH), ppc)
1.1.1.3   root      377: VL_OBJS+= ppc.o ide.o pckbd.o ps2.o vga.o $(SOUND_HW) dma.o $(AUDIODRV)
1.1       root      378: VL_OBJS+= mc146818rtc.o serial.o i8259.o i8254.o fdc.o m48t59.o
                    379: VL_OBJS+= ppc_prep.o ppc_chrp.o cuda.o adb.o openpic.o heathrow_pic.o mixeng.o
1.1.1.4   root      380: VL_OBJS+= grackle_pci.o prep_pci.o unin_pci.o
1.1.1.5 ! root      381: CPPFLAGS += -DHAS_AUDIO
1.1       root      382: endif
                    383: ifeq ($(TARGET_ARCH), mips)
1.1.1.5 ! root      384: VL_OBJS+= mips_r4k.o mips_malta.o mips_timer.o mips_int.o dma.o vga.o serial.o i8254.o i8259.o
        !           385: VL_OBJS+= ide.o gt64xxx.o pckbd.o ps2.o fdc.o mc146818rtc.o usb-uhci.o acpi.o
        !           386: VL_OBJS+= piix_pci.o parallel.o mixeng.o cirrus_vga.o $(SOUND_HW) $(AUDIODRV)
        !           387: DEFINES += -DHAS_AUDIO
1.1       root      388: endif
                    389: ifeq ($(TARGET_BASE_ARCH), sparc)
                    390: ifeq ($(TARGET_ARCH), sparc64)
1.1.1.4   root      391: VL_OBJS+= sun4u.o ide.o pckbd.o ps2.o vga.o apb_pci.o
1.1       root      392: VL_OBJS+= fdc.o mc146818rtc.o serial.o m48t59.o
                    393: VL_OBJS+= cirrus_vga.o parallel.o
                    394: else
1.1.1.5 ! root      395: VL_OBJS+= sun4m.o tcx.o pcnet.o iommu.o m48t59.o slavio_intctl.o
        !           396: VL_OBJS+= slavio_timer.o slavio_serial.o slavio_misc.o fdc.o esp.o sparc32_dma.o
        !           397: VL_OBJS+= cs4231.o
1.1.1.2   root      398: endif
1.1       root      399: endif
1.1.1.2   root      400: ifeq ($(TARGET_BASE_ARCH), arm)
1.1.1.3   root      401: VL_OBJS+= integratorcp.o versatilepb.o ps2.o smc91c111.o arm_pic.o arm_timer.o
                    402: VL_OBJS+= arm_boot.o pl011.o pl050.o pl080.o pl110.o pl190.o
1.1.1.4   root      403: VL_OBJS+= versatile_pci.o
1.1.1.5 ! root      404: VL_OBJS+= arm_gic.o realview.o arm_sysctl.o
        !           405: VL_OBJS+= arm-semi.o
1.1.1.3   root      406: endif
                    407: ifeq ($(TARGET_BASE_ARCH), sh4)
                    408: VL_OBJS+= shix.o sh7750.o sh7750_regnames.o tc58128.o
1.1       root      409: endif
                    410: ifdef CONFIG_GDBSTUB
                    411: VL_OBJS+=gdbstub.o 
                    412: endif
                    413: ifdef CONFIG_SDL
1.1.1.5 ! root      414: VL_OBJS+=sdl.o x_keymap.o
1.1       root      415: endif
1.1.1.3   root      416: VL_OBJS+=vnc.o
1.1       root      417: ifdef CONFIG_COCOA
                    418: VL_OBJS+=cocoa.o
1.1.1.2   root      419: COCOA_LIBS=-F/System/Library/Frameworks -framework Cocoa -framework IOKit
                    420: ifdef CONFIG_COREAUDIO
                    421: COCOA_LIBS+=-framework CoreAudio
                    422: endif
1.1       root      423: endif
                    424: ifdef CONFIG_SLIRP
1.1.1.5 ! root      425: CPPFLAGS+=-I$(SRC_PATH)/slirp
1.1       root      426: SLIRP_OBJS=cksum.o if.o ip_icmp.o ip_input.o ip_output.o \
                    427: slirp.o mbuf.o misc.o sbuf.o socket.o tcp_input.o tcp_output.o \
                    428: tcp_subr.o tcp_timer.o udp.o bootp.o debug.o tftp.o
                    429: VL_OBJS+=$(addprefix slirp/, $(SLIRP_OBJS))
                    430: endif
                    431: 
                    432: VL_LDFLAGS=
                    433: # specific flags are needed for non soft mmu emulator
                    434: ifdef CONFIG_STATIC
                    435: VL_LDFLAGS+=-static
                    436: endif
                    437: ifndef CONFIG_SOFTMMU
                    438: VL_LDFLAGS+=-Wl,-T,$(SRC_PATH)/i386-vl.ld 
                    439: endif
                    440: ifndef CONFIG_DARWIN
                    441: ifndef CONFIG_WIN32
1.1.1.3   root      442: ifndef CONFIG_SOLARIS
1.1.1.4   root      443: VL_LIBS=-lutil -lrt
1.1       root      444: endif
                    445: endif
1.1.1.3   root      446: endif
1.1       root      447: ifdef TARGET_GPROF
1.1.1.5 ! root      448: vl.o: BASE_CFLAGS+=-p
1.1       root      449: VL_LDFLAGS+=-p
                    450: endif
                    451: 
                    452: ifeq ($(ARCH),ia64)
                    453: VL_LDFLAGS+=-Wl,-G0 -Wl,-T,$(SRC_PATH)/ia64.ld
                    454: endif
                    455: 
1.1.1.4   root      456: ifeq ($(ARCH),sparc64)
                    457: VL_LDFLAGS+=-m64
                    458: VL_LDFLAGS+=-Wl,-T,$(SRC_PATH)/sparc64.ld
                    459: endif
                    460: 
1.1.1.2   root      461: ifdef CONFIG_WIN32
                    462: SDL_LIBS := $(filter-out -mwindows, $(SDL_LIBS)) -mconsole
                    463: endif
                    464: 
1.1       root      465: $(QEMU_SYSTEM): $(VL_OBJS) libqemu.a
                    466:        $(CC) $(VL_LDFLAGS) -o $@ $^ $(LIBS) $(SDL_LIBS) $(COCOA_LIBS) $(VL_LIBS)
                    467: 
                    468: cocoa.o: cocoa.m
1.1.1.5 ! root      469:        $(CC) $(CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) -c -o $@ $<
1.1       root      470: 
                    471: sdl.o: sdl.c keymaps.c sdl_keysym.h
1.1.1.5 ! root      472:        $(CC) $(CFLAGS) $(CPPFLAGS) $(SDL_CFLAGS) $(BASE_CFLAGS) -c -o $@ $<
1.1       root      473: 
1.1.1.3   root      474: vnc.o: vnc.c keymaps.c sdl_keysym.h vnchextile.h
1.1.1.5 ! root      475:        $(CC) $(CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) -c -o $@ $<
1.1.1.3   root      476: 
1.1       root      477: sdlaudio.o: sdlaudio.c
1.1.1.5 ! root      478:        $(CC) $(CFLAGS) $(CPPFLAGS) $(SDL_CFLAGS) $(BASE_CFLAGS) -c -o $@ $<
1.1       root      479: 
                    480: depend: $(SRCS)
1.1.1.5 ! root      481:        $(CC) -MM $(CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) $^ 1>.depend
1.1       root      482: 
1.1.1.2   root      483: vldepend: $(VL_OBJS:.o=.c)
1.1.1.5 ! root      484:        $(CC) -MM $(CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) $^ 1>.depend
1.1.1.2   root      485: 
1.1       root      486: # libqemu 
                    487: 
                    488: libqemu.a: $(LIBOBJS)
                    489:        rm -f $@
                    490:        $(AR) rcs $@ $(LIBOBJS)
                    491: 
                    492: translate.o: translate.c gen-op.h opc.h cpu.h
                    493: 
                    494: translate-all.o: translate-all.c opc.h cpu.h
                    495: 
                    496: translate-op.o: translate-all.c op.h opc.h cpu.h
                    497: 
                    498: op.h: op.o $(DYNGEN)
                    499:        $(DYNGEN) -o $@ $<
                    500: 
                    501: opc.h: op.o $(DYNGEN)
                    502:        $(DYNGEN) -c -o $@ $<
                    503: 
                    504: gen-op.h: op.o $(DYNGEN)
                    505:        $(DYNGEN) -g -o $@ $<
                    506: 
                    507: op.o: op.c
1.1.1.5 ! root      508:        $(CC) $(OP_CFLAGS) $(CPPFLAGS) -c -o $@ $<
1.1       root      509: 
1.1.1.5 ! root      510: # HELPER_CFLAGS is used for all the code compiled with static register
        !           511: # variables
        !           512: ifeq ($(TARGET_BASE_ARCH), i386)
        !           513: # XXX: rename helper.c to op_helper.c
1.1       root      514: helper.o: helper.c
1.1.1.5 ! root      515:        $(CC) $(HELPER_CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) -c -o $@ $<
        !           516: else
        !           517: op_helper.o: op_helper.c
        !           518:        $(CC) $(HELPER_CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) -c -o $@ $<
        !           519: endif
        !           520: 
        !           521: cpu-exec.o: cpu-exec.c
        !           522:        $(CC) $(HELPER_CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) -c -o $@ $<
        !           523: 
        !           524: # Note: this is a workaround. The real fix is to avoid compiling
        !           525: # cpu_signal_handler() in cpu-exec.c.
        !           526: signal.o: signal.c
        !           527:        $(CC) $(HELPER_CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) -c -o $@ $<
1.1       root      528: 
                    529: ifeq ($(TARGET_BASE_ARCH), i386)
                    530: op.o: op.c opreg_template.h ops_template.h ops_template_mem.h ops_mem.h ops_sse.h
                    531: endif
                    532: 
                    533: ifeq ($(TARGET_ARCH), arm)
                    534: op.o: op.c op_template.h
1.1.1.3   root      535: pl110.o: pl110_template.h
1.1       root      536: endif
                    537: 
                    538: ifeq ($(TARGET_BASE_ARCH), sparc)
                    539: op.o: op.c op_template.h op_mem.h fop_template.h fbranch_template.h
                    540: magic_load.o: elf_op.h
                    541: endif
                    542: 
                    543: ifeq ($(TARGET_BASE_ARCH), ppc)
                    544: op.o: op.c op_template.h op_mem.h
                    545: op_helper.o: op_helper_mem.h
                    546: translate.o: translate.c translate_init.c
                    547: endif
                    548: 
                    549: ifeq ($(TARGET_ARCH), mips)
1.1.1.5 ! root      550: op.o: op.c op_template.c fop_template.c op_mem.c
1.1       root      551: op_helper.o: op_helper_mem.c
                    552: endif
                    553: 
1.1.1.3   root      554: loader.o: loader.c elf_ops.h
                    555: 
                    556: ifeq ($(TARGET_ARCH), sh4)
                    557: op.o: op.c op_mem.c cpu.h
                    558: op_helper.o: op_helper.c exec.h cpu.h
                    559: helper.o: helper.c exec.h cpu.h
                    560: sh7750.o: sh7750.c sh7750_regs.h sh7750_regnames.h cpu.h
                    561: shix.o: shix.c sh7750_regs.h sh7750_regnames.h
                    562: sh7750_regnames.o: sh7750_regnames.c sh7750_regnames.h sh7750_regs.h
                    563: tc58128.o: tc58128.c
                    564: endif
                    565: 
1.1.1.4   root      566: $(OBJS) $(LIBOBJS) $(VL_OBJS): config.h ../config-host.h
                    567: 
1.1       root      568: %.o: %.c
1.1.1.5 ! root      569:        $(CC) $(CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) -c -o $@ $<
1.1       root      570: 
                    571: %.o: %.S
1.1.1.5 ! root      572:        $(CC) $(CPPFLAGS) -c -o $@ $<
1.1       root      573: 
                    574: clean:
                    575:        rm -f *.o  *.a *~ $(PROGS) gen-op.h opc.h op.h nwfpe/*.o slirp/*.o fpu/*.o
                    576: 
                    577: install: all 
                    578: ifneq ($(PROGS),)
1.1.1.3   root      579:        $(INSTALL) -m 755 -s $(PROGS) "$(DESTDIR)$(bindir)"
1.1       root      580: endif
                    581: 
                    582: ifneq ($(wildcard .depend),)
                    583: include .depend
                    584: endif
1.1.1.2   root      585: 
                    586: ifeq (1, 0)
                    587: audio.o sdlaudio.o dsoundaudio.o ossaudio.o wavaudio.o noaudio.o \
                    588: fmodaudio.o alsaaudio.o mixeng.o sb16.o es1370.o gus.o adlib.o: \
                    589: CFLAGS := $(CFLAGS) -Wall -Werror -W -Wsign-compare
                    590: endif

unix.superglobalmegacorp.com