]> git.proxmox.com Git - qemu.git/blobdiff - Makefile.target
initial user mmu support
[qemu.git] / Makefile.target
index c764538503e9e842064cc28977823943c8f759cb..0efc9d1c916c054e2eb05c81abbdc5bd5a4efca8 100644 (file)
@@ -1,12 +1,13 @@
 include config.mak
 
-#Uncomment following and specify proper paths/names for FMOD support
-#USE_FMOD=1
-#FMOD_INCLUDE=/net/include/fmod
-#FMOD_LIBPATH=/net/lib
-#FMOD_VERSION=3.74
-
-TARGET_PATH=$(SRC_PATH)/target-$(TARGET_ARCH)
+TARGET_BASE_ARCH:=$(TARGET_ARCH)
+ifeq ($(TARGET_ARCH), x86_64)
+TARGET_BASE_ARCH:=i386
+endif
+ifeq ($(TARGET_ARCH), sparc64)
+TARGET_BASE_ARCH:=sparc
+endif
+TARGET_PATH=$(SRC_PATH)/target-$(TARGET_BASE_ARCH)
 VPATH=$(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw:$(SRC_PATH)/audio
 DEFINES=-I. -I$(TARGET_PATH) -I$(SRC_PATH)
 ifdef CONFIG_USER_ONLY
@@ -14,12 +15,21 @@ VPATH+=:$(SRC_PATH)/linux-user
 DEFINES+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ARCH)
 endif
 CFLAGS=-Wall -O2 -g -fno-strict-aliasing
+#CFLAGS+=-Werror
 LDFLAGS=-g
 LIBS=
 HELPER_CFLAGS=$(CFLAGS)
 DYNGEN=../dyngen$(EXESUF)
 # user emulator name
-QEMU_USER=qemu-$(TARGET_ARCH)
+ifeq ($(TARGET_ARCH),arm)
+  ifeq ($(TARGET_WORDS_BIGENDIAN),yes)
+    QEMU_USER=qemu-armeb
+  else
+    QEMU_USER=qemu-arm
+  endif
+else
+  QEMU_USER=qemu-$(TARGET_ARCH)
+endif
 # system emulator name
 ifdef CONFIG_SOFTMMU
 ifeq ($(TARGET_ARCH), i386)
@@ -50,6 +60,12 @@ endif # ARCH != i386
 
 endif # TARGET_ARCH = i386
 
+ifeq ($(TARGET_ARCH), x86_64)
+ifdef CONFIG_SOFTMMU
+PROGS+=$(QEMU_SYSTEM)
+endif
+endif # TARGET_ARCH = x86_64
+
 ifeq ($(TARGET_ARCH), ppc)
 
 ifeq ($(ARCH), ppc)
@@ -62,11 +78,11 @@ PROGS+=$(QEMU_SYSTEM)
 endif
 endif # ARCH = i386
 
-ifeq ($(ARCH), amd64)
+ifeq ($(ARCH), x86_64)
 ifdef CONFIG_SOFTMMU
 PROGS+=$(QEMU_SYSTEM)
 endif
-endif # ARCH = amd64
+endif # ARCH = x86_64
 
 endif # TARGET_ARCH = ppc
 
@@ -82,13 +98,20 @@ PROGS+=$(QEMU_SYSTEM)
 endif
 endif # ARCH = i386
 
-ifeq ($(ARCH), amd64)
+ifeq ($(ARCH), x86_64)
 ifdef CONFIG_SOFTMMU
 PROGS+=$(QEMU_SYSTEM)
 endif
-endif # ARCH = amd64
+endif # ARCH = x86_64
 
 endif # TARGET_ARCH = sparc
+
+ifeq ($(TARGET_ARCH), sparc64)
+ifdef CONFIG_SOFTMMU
+PROGS+=$(QEMU_SYSTEM)
+endif
+endif # TARGET_ARCH = sparc64
+
 endif # !CONFIG_USER_ONLY
 
 ifdef CONFIG_STATIC
@@ -120,9 +143,9 @@ LDFLAGS+=-Wl,-shared
 endif
 endif
 
-ifeq ($(ARCH),amd64)
+ifeq ($(ARCH),x86_64)
 OP_CFLAGS=$(CFLAGS) -falign-functions=0
-LDFLAGS+=-Wl,-T,$(SRC_PATH)/amd64.ld
+LDFLAGS+=-Wl,-T,$(SRC_PATH)/x86_64.ld
 endif
 
 ifeq ($(ARCH),ppc)
@@ -181,6 +204,7 @@ endif
 
 ifeq ($(CONFIG_DARWIN),yes)
 OP_CFLAGS+= -mdynamic-no-pic
+LIBS+=-lmx
 endif
 
 #########################################################
@@ -223,11 +247,15 @@ LIBOBJS+=translate-copy.o
 endif
 endif
 
+ifeq ($(TARGET_ARCH), x86_64)
+LIBOBJS+=helper.o helper2.o
+endif
+
 ifeq ($(TARGET_ARCH), ppc)
 LIBOBJS+= op_helper.o helper.o
 endif
 
-ifeq ($(TARGET_ARCH), sparc)
+ifeq ($(TARGET_BASE_ARCH), sparc)
 LIBOBJS+= op_helper.o helper.o
 endif
 
@@ -236,7 +264,7 @@ LIBOBJS+=disas.o
 ifeq ($(findstring i386, $(TARGET_ARCH) $(ARCH)),i386)
 USE_I386_DIS=y
 endif
-ifeq ($(findstring amd64, $(TARGET_ARCH) $(ARCH)),amd64)
+ifeq ($(findstring x86_64, $(TARGET_ARCH) $(ARCH)),x86_64)
 USE_I386_DIS=y
 endif
 ifdef USE_I386_DIS
@@ -248,7 +276,7 @@ endif
 ifeq ($(findstring ppc, $(TARGET_ARCH) $(ARCH)),ppc)
 LIBOBJS+=ppc-dis.o
 endif
-ifeq ($(findstring sparc, $(TARGET_ARCH) $(ARCH)),sparc)
+ifeq ($(findstring sparc, $(TARGET_BASE_ARCH) $(ARCH)),sparc)
 LIBOBJS+=sparc-dis.o
 endif
 ifeq ($(findstring arm, $(TARGET_ARCH) $(ARCH)),arm)
@@ -271,7 +299,7 @@ endif
 
 # must use static linking to avoid leaving stuff in virtual address space
 VL_OBJS=vl.o osdep.o block.o readline.o monitor.o pci.o console.o 
-VL_OBJS+=block-cow.o block-qcow.o aes.o block-vmdk.o block-cloop.o
+VL_OBJS+=block-cow.o block-qcow.o aes.o block-vmdk.o block-cloop.o block-dmg.o
 
 SOUND_HW = sb16.o
 AUDIODRV = audio.o noaudio.o wavaudio.o
@@ -288,26 +316,25 @@ ifdef CONFIG_ADLIB
 SOUND_HW += fmopl.o adlib.o
 endif
 
-ifeq ($(USE_FMOD),1)
+ifdef CONFIG_FMOD
 AUDIODRV += fmodaudio.o
-audio.o fmodaudio.o: DEFINES := -DUSE_FMOD_AUDIO -I$(FMOD_INCLUDE) $(DEFINES)
-LDFLAGS += -L$(FMOD_LIBPATH) -Wl,-rpath,$(FMOD_LIBPATH)
-LIBS += -lfmod-$(FMOD_VERSION)
+audio.o fmodaudio.o: DEFINES := -I$(CONFIG_FMOD_INC) $(DEFINES)
+LIBS += $(CONFIG_FMOD_LIB)
 endif
 
-ifeq ($(TARGET_ARCH), i386)
+ifeq ($(TARGET_BASE_ARCH), i386)
 # Hardware support
 VL_OBJS+= ide.o ne2000.o pckbd.o vga.o $(SOUND_HW) dma.o $(AUDIODRV)
 VL_OBJS+= fdc.o mc146818rtc.o serial.o i8259.o i8254.o pc.o
-VL_OBJS+= cirrus_vga.o mixeng.o
+VL_OBJS+= cirrus_vga.o mixeng.o apic.o parallel.o
 endif
 ifeq ($(TARGET_ARCH), ppc)
 VL_OBJS+= ppc.o ide.o ne2000.o pckbd.o vga.o $(SOUND_HW) dma.o $(AUDIODRV)
 VL_OBJS+= mc146818rtc.o serial.o i8259.o i8254.o fdc.o m48t59.o
 VL_OBJS+= ppc_prep.o ppc_chrp.o cuda.o adb.o openpic.o mixeng.o
 endif
-ifeq ($(TARGET_ARCH), sparc)
-VL_OBJS+= sun4m.o tcx.o lance.o iommu.o sched.o m48t08.o magic-load.o timer.o
+ifeq ($(TARGET_BASE_ARCH), sparc)
+VL_OBJS+= sun4m.o tcx.o lance.o iommu.o m48t08.o magic-load.o slavio_intctl.o slavio_timer.o slavio_serial.o fdc.o
 endif
 ifdef CONFIG_GDBSTUB
 VL_OBJS+=gdbstub.o 
@@ -340,7 +367,10 @@ endif
 $(QEMU_SYSTEM): $(VL_OBJS) libqemu.a
        $(CC) $(VL_LDFLAGS) -o $@ $^ $(LIBS) $(SDL_LIBS) $(VL_LIBS)
 
-sdl.o: sdl.c
+sdl.o: sdl.c keymaps.c sdl_keysym.h
+       $(CC) $(CFLAGS) $(DEFINES) $(SDL_CFLAGS) -c -o $@ $<
+
+sdlaudio.o: sdlaudio.c
        $(CC) $(CFLAGS) $(DEFINES) $(SDL_CFLAGS) -c -o $@ $<
 
 depend: $(SRCS)
@@ -371,15 +401,15 @@ op.o: op.c
 helper.o: helper.c
        $(CC) $(HELPER_CFLAGS) $(DEFINES) -c -o $@ $<
 
-ifeq ($(TARGET_ARCH), i386)
-op.o: op.c opreg_template.h ops_template.h ops_template_mem.h ops_mem.h
+ifeq ($(TARGET_BASE_ARCH), i386)
+op.o: op.c opreg_template.h ops_template.h ops_template_mem.h ops_mem.h ops_sse.h
 endif
 
 ifeq ($(TARGET_ARCH), arm)
 op.o: op.c op_template.h
 endif
 
-ifeq ($(TARGET_ARCH), sparc)
+ifeq ($(TARGET_BASE_ARCH), sparc)
 op.o: op.c op_template.h op_mem.h
 endif