bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 1 | include config.mak |
| 2 | |
bellard | 0b0babc | 2005-01-03 23:38:40 +0000 | [diff] [blame] | 3 | TARGET_BASE_ARCH:=$(TARGET_ARCH) |
| 4 | ifeq ($(TARGET_ARCH), x86_64) |
| 5 | TARGET_BASE_ARCH:=i386 |
| 6 | endif |
bellard | a245862 | 2005-07-23 22:39:53 +0000 | [diff] [blame] | 7 | ifeq ($(TARGET_ARCH), ppc64) |
| 8 | TARGET_BASE_ARCH:=ppc |
| 9 | endif |
bellard | 64b3ab2 | 2005-01-30 22:43:42 +0000 | [diff] [blame] | 10 | ifeq ($(TARGET_ARCH), sparc64) |
| 11 | TARGET_BASE_ARCH:=sparc |
| 12 | endif |
bellard | 0b0babc | 2005-01-03 23:38:40 +0000 | [diff] [blame] | 13 | TARGET_PATH=$(SRC_PATH)/target-$(TARGET_BASE_ARCH) |
bellard | 85571bc | 2004-11-07 18:04:02 +0000 | [diff] [blame] | 14 | VPATH=$(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw:$(SRC_PATH)/audio |
pbrook | ad06484 | 2006-04-16 12:41:07 +0000 | [diff] [blame] | 15 | DEFINES=-I. -I.. -I$(TARGET_PATH) -I$(SRC_PATH) |
bellard | 3035f7f | 2004-03-21 17:02:00 +0000 | [diff] [blame] | 16 | ifdef CONFIG_USER_ONLY |
| 17 | VPATH+=:$(SRC_PATH)/linux-user |
| 18 | DEFINES+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ARCH) |
| 19 | endif |
bellard | ab2572d | 2004-06-03 19:07:57 +0000 | [diff] [blame] | 20 | CFLAGS=-Wall -O2 -g -fno-strict-aliasing |
bellard | 0b0babc | 2005-01-03 23:38:40 +0000 | [diff] [blame] | 21 | #CFLAGS+=-Werror |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 22 | LDFLAGS=-g |
| 23 | LIBS= |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 24 | HELPER_CFLAGS=$(CFLAGS) |
bellard | 67b915a | 2004-03-31 23:37:16 +0000 | [diff] [blame] | 25 | DYNGEN=../dyngen$(EXESUF) |
bellard | 1e43adf | 2003-09-30 20:54:24 +0000 | [diff] [blame] | 26 | # user emulator name |
bellard | c91fde6 | 2006-05-02 22:52:36 +0000 | [diff] [blame] | 27 | TARGET_ARCH2=$(TARGET_ARCH) |
bellard | 808c495 | 2004-12-19 23:33:47 +0000 | [diff] [blame] | 28 | ifeq ($(TARGET_ARCH),arm) |
| 29 | ifeq ($(TARGET_WORDS_BIGENDIAN),yes) |
bellard | c91fde6 | 2006-05-02 22:52:36 +0000 | [diff] [blame] | 30 | TARGET_ARCH2=armeb |
bellard | 808c495 | 2004-12-19 23:33:47 +0000 | [diff] [blame] | 31 | endif |
bellard | c91fde6 | 2006-05-02 22:52:36 +0000 | [diff] [blame] | 32 | endif |
bellard | 01f5e59 | 2005-12-06 21:42:17 +0000 | [diff] [blame] | 33 | ifeq ($(TARGET_ARCH),mips) |
bellard | c91fde6 | 2006-05-02 22:52:36 +0000 | [diff] [blame] | 34 | ifneq ($(TARGET_WORDS_BIGENDIAN),yes) |
| 35 | TARGET_ARCH2=mipsel |
bellard | 01f5e59 | 2005-12-06 21:42:17 +0000 | [diff] [blame] | 36 | endif |
bellard | 808c495 | 2004-12-19 23:33:47 +0000 | [diff] [blame] | 37 | endif |
bellard | c91fde6 | 2006-05-02 22:52:36 +0000 | [diff] [blame] | 38 | QEMU_USER=qemu-$(TARGET_ARCH2) |
bellard | 1e43adf | 2003-09-30 20:54:24 +0000 | [diff] [blame] | 39 | # system emulator name |
| 40 | ifdef CONFIG_SOFTMMU |
bellard | a541f29 | 2004-04-12 20:39:29 +0000 | [diff] [blame] | 41 | ifeq ($(TARGET_ARCH), i386) |
bellard | 67b915a | 2004-03-31 23:37:16 +0000 | [diff] [blame] | 42 | QEMU_SYSTEM=qemu$(EXESUF) |
bellard | 0db6347 | 2003-10-27 21:37:46 +0000 | [diff] [blame] | 43 | else |
bellard | c91fde6 | 2006-05-02 22:52:36 +0000 | [diff] [blame] | 44 | QEMU_SYSTEM=qemu-system-$(TARGET_ARCH2)$(EXESUF) |
bellard | a541f29 | 2004-04-12 20:39:29 +0000 | [diff] [blame] | 45 | endif |
| 46 | else |
bellard | 0db6347 | 2003-10-27 21:37:46 +0000 | [diff] [blame] | 47 | QEMU_SYSTEM=qemu-fast |
bellard | 1e43adf | 2003-09-30 20:54:24 +0000 | [diff] [blame] | 48 | endif |
| 49 | |
bellard | 16e9b7d | 2003-10-27 21:09:52 +0000 | [diff] [blame] | 50 | ifdef CONFIG_USER_ONLY |
bellard | 1e43adf | 2003-09-30 20:54:24 +0000 | [diff] [blame] | 51 | PROGS=$(QEMU_USER) |
bellard | 16e9b7d | 2003-10-27 21:09:52 +0000 | [diff] [blame] | 52 | else |
bellard | 16e9b7d | 2003-10-27 21:09:52 +0000 | [diff] [blame] | 53 | PROGS+=$(QEMU_SYSTEM) |
bellard | de5eaa6 | 2003-11-16 23:18:17 +0000 | [diff] [blame] | 54 | ifndef CONFIG_SOFTMMU |
| 55 | CONFIG_STATIC=y |
| 56 | endif |
bellard | 728c9fd | 2004-01-05 00:08:14 +0000 | [diff] [blame] | 57 | endif # !CONFIG_USER_ONLY |
| 58 | |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 59 | ifdef CONFIG_STATIC |
| 60 | LDFLAGS+=-static |
| 61 | endif |
| 62 | |
| 63 | ifeq ($(ARCH),i386) |
| 64 | CFLAGS+=-fomit-frame-pointer |
| 65 | OP_CFLAGS=$(CFLAGS) -mpreferred-stack-boundary=2 |
| 66 | ifeq ($(HAVE_GCC3_OPTIONS),yes) |
bellard | 3611a29 | 2004-08-03 21:42:45 +0000 | [diff] [blame] | 67 | OP_CFLAGS+= -falign-functions=0 -fno-gcse |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 68 | else |
| 69 | OP_CFLAGS+= -malign-functions=0 |
| 70 | endif |
bellard | 3a4739d | 2003-10-28 00:48:22 +0000 | [diff] [blame] | 71 | |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 72 | ifdef TARGET_GPROF |
bellard | 3a4739d | 2003-10-28 00:48:22 +0000 | [diff] [blame] | 73 | USE_I386_LD=y |
| 74 | endif |
| 75 | ifdef CONFIG_STATIC |
| 76 | USE_I386_LD=y |
| 77 | endif |
| 78 | ifdef USE_I386_LD |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 79 | LDFLAGS+=-Wl,-T,$(SRC_PATH)/i386.ld |
| 80 | else |
| 81 | # WARNING: this LDFLAGS is _very_ tricky : qemu is an ELF shared object |
| 82 | # that the kernel ELF loader considers as an executable. I think this |
| 83 | # is the simplest way to make it self virtualizable! |
| 84 | LDFLAGS+=-Wl,-shared |
| 85 | endif |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 86 | endif |
| 87 | |
bellard | 0b0babc | 2005-01-03 23:38:40 +0000 | [diff] [blame] | 88 | ifeq ($(ARCH),x86_64) |
bellard | bc51c5c | 2004-03-17 23:46:04 +0000 | [diff] [blame] | 89 | OP_CFLAGS=$(CFLAGS) -falign-functions=0 |
bellard | 0b0babc | 2005-01-03 23:38:40 +0000 | [diff] [blame] | 90 | LDFLAGS+=-Wl,-T,$(SRC_PATH)/x86_64.ld |
bellard | bc51c5c | 2004-03-17 23:46:04 +0000 | [diff] [blame] | 91 | endif |
| 92 | |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 93 | ifeq ($(ARCH),ppc) |
bellard | 83fb7ad | 2004-07-05 21:25:26 +0000 | [diff] [blame] | 94 | CFLAGS+= -D__powerpc__ |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 95 | OP_CFLAGS=$(CFLAGS) |
| 96 | LDFLAGS+=-Wl,-T,$(SRC_PATH)/ppc.ld |
| 97 | endif |
| 98 | |
| 99 | ifeq ($(ARCH),s390) |
| 100 | OP_CFLAGS=$(CFLAGS) |
| 101 | LDFLAGS+=-Wl,-T,$(SRC_PATH)/s390.ld |
| 102 | endif |
| 103 | |
| 104 | ifeq ($(ARCH),sparc) |
bellard | fdbb469 | 2006-06-14 17:32:25 +0000 | [diff] [blame^] | 105 | ifeq ($(CONFIG_SOLARIS),yes) |
| 106 | CFLAGS+=-mcpu=ultrasparc -m32 -ffixed-g2 -ffixed-g3 |
| 107 | LDFLAGS+=-m32 |
| 108 | OP_CFLAGS=$(CFLAGS) -fno-delayed-branch -fno-omit-frame-pointer -ffixed-i0 |
| 109 | else |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 110 | CFLAGS+=-m32 -ffixed-g1 -ffixed-g2 -ffixed-g3 -ffixed-g6 |
| 111 | LDFLAGS+=-m32 |
| 112 | OP_CFLAGS=$(CFLAGS) -fno-delayed-branch -ffixed-i0 |
| 113 | HELPER_CFLAGS=$(CFLAGS) -ffixed-i0 -mflat |
| 114 | # -static is used to avoid g1/g3 usage by the dynamic linker |
| 115 | LDFLAGS+=-Wl,-T,$(SRC_PATH)/sparc.ld -static |
| 116 | endif |
bellard | fdbb469 | 2006-06-14 17:32:25 +0000 | [diff] [blame^] | 117 | endif |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 118 | |
| 119 | ifeq ($(ARCH),sparc64) |
| 120 | CFLAGS+=-m64 -ffixed-g1 -ffixed-g2 -ffixed-g3 -ffixed-g6 |
| 121 | LDFLAGS+=-m64 |
| 122 | OP_CFLAGS=$(CFLAGS) -fno-delayed-branch -ffixed-i0 |
| 123 | endif |
| 124 | |
| 125 | ifeq ($(ARCH),alpha) |
| 126 | # -msmall-data is not used because we want two-instruction relocations |
| 127 | # for the constant constructions |
| 128 | OP_CFLAGS=-Wall -O2 -g |
| 129 | # Ensure there's only a single GP |
| 130 | CFLAGS += -msmall-data |
| 131 | LDFLAGS+=-Wl,-T,$(SRC_PATH)/alpha.ld |
| 132 | endif |
| 133 | |
| 134 | ifeq ($(ARCH),ia64) |
bellard | b8076a7 | 2005-04-07 22:20:31 +0000 | [diff] [blame] | 135 | CFLAGS += -mno-sdata |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 136 | OP_CFLAGS=$(CFLAGS) |
bellard | b8076a7 | 2005-04-07 22:20:31 +0000 | [diff] [blame] | 137 | LDFLAGS+=-Wl,-G0 -Wl,-T,$(SRC_PATH)/ia64.ld |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 138 | endif |
| 139 | |
| 140 | ifeq ($(ARCH),arm) |
bellard | ba68055 | 2005-03-13 09:49:52 +0000 | [diff] [blame] | 141 | OP_CFLAGS=$(CFLAGS) -mno-sched-prolog -fno-omit-frame-pointer |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 142 | LDFLAGS+=-Wl,-T,$(SRC_PATH)/arm.ld |
| 143 | endif |
| 144 | |
bellard | 38e584a | 2003-08-10 22:14:22 +0000 | [diff] [blame] | 145 | ifeq ($(ARCH),m68k) |
| 146 | OP_CFLAGS=$(CFLAGS) -fomit-frame-pointer |
| 147 | LDFLAGS+=-Wl,-T,m68k.ld |
| 148 | endif |
| 149 | |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 150 | ifeq ($(HAVE_GCC3_OPTIONS),yes) |
| 151 | # very important to generate a return at the end of every operation |
| 152 | OP_CFLAGS+=-fno-reorder-blocks -fno-optimize-sibling-calls |
| 153 | endif |
| 154 | |
bellard | 83fb7ad | 2004-07-05 21:25:26 +0000 | [diff] [blame] | 155 | ifeq ($(CONFIG_DARWIN),yes) |
| 156 | OP_CFLAGS+= -mdynamic-no-pic |
bellard | e80cfcf | 2004-12-19 23:18:01 +0000 | [diff] [blame] | 157 | LIBS+=-lmx |
bellard | 83fb7ad | 2004-07-05 21:25:26 +0000 | [diff] [blame] | 158 | endif |
| 159 | |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 160 | ######################################################### |
| 161 | |
bellard | d524939 | 2004-08-03 21:14:23 +0000 | [diff] [blame] | 162 | DEFINES+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 163 | LIBS+=-lm |
bellard | b932cab | 2004-08-01 21:46:49 +0000 | [diff] [blame] | 164 | ifndef CONFIG_USER_ONLY |
| 165 | LIBS+=-lz |
| 166 | endif |
bellard | 67b915a | 2004-03-31 23:37:16 +0000 | [diff] [blame] | 167 | ifdef CONFIG_WIN32 |
bellard | 3db38e8 | 2004-07-14 17:19:55 +0000 | [diff] [blame] | 168 | LIBS+=-lwinmm -lws2_32 -liphlpapi |
bellard | 67b915a | 2004-03-31 23:37:16 +0000 | [diff] [blame] | 169 | endif |
bellard | ec530c8 | 2006-04-25 22:36:06 +0000 | [diff] [blame] | 170 | ifdef CONFIG_SOLARIS |
| 171 | LIBS+=-lsocket -lnsl -lresolv |
| 172 | endif |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 173 | |
| 174 | # profiling code |
| 175 | ifdef TARGET_GPROF |
| 176 | LDFLAGS+=-p |
| 177 | main.o: CFLAGS+=-p |
| 178 | endif |
| 179 | |
pbrook | e5fe0c5 | 2006-06-11 13:32:59 +0000 | [diff] [blame] | 180 | OBJS= main.o syscall.o mmap.o signal.o path.o osdep.o thunk.o \ |
| 181 | elfload.o linuxload.o |
| 182 | ifdef TARGET_HAS_BFLT |
| 183 | OBJS+= flatload.o |
| 184 | endif |
| 185 | |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 186 | ifeq ($(TARGET_ARCH), i386) |
| 187 | OBJS+= vm86.o |
| 188 | endif |
bellard | f72b519 | 2004-02-16 21:55:35 +0000 | [diff] [blame] | 189 | ifeq ($(TARGET_ARCH), arm) |
bellard | 158142c | 2005-03-13 16:54:06 +0000 | [diff] [blame] | 190 | OBJS+=nwfpe/fpa11.o nwfpe/fpa11_cpdo.o \ |
bellard | f72b519 | 2004-02-16 21:55:35 +0000 | [diff] [blame] | 191 | nwfpe/fpa11_cpdt.o nwfpe/fpa11_cprt.o nwfpe/fpopcode.o nwfpe/single_cpdo.o \ |
bellard | a4f8197 | 2005-04-23 18:25:41 +0000 | [diff] [blame] | 192 | nwfpe/double_cpdo.o nwfpe/extended_cpdo.o arm-semi.o |
bellard | f72b519 | 2004-02-16 21:55:35 +0000 | [diff] [blame] | 193 | endif |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 194 | SRCS:= $(OBJS:.o=.c) |
| 195 | OBJS+= libqemu.a |
| 196 | |
| 197 | # cpu emulator library |
bellard | 158142c | 2005-03-13 16:54:06 +0000 | [diff] [blame] | 198 | LIBOBJS=exec.o kqemu.o translate-op.o translate-all.o cpu-exec.o\ |
bellard | e3086fb | 2005-02-10 21:48:51 +0000 | [diff] [blame] | 199 | translate.o op.o |
bellard | 158142c | 2005-03-13 16:54:06 +0000 | [diff] [blame] | 200 | ifdef CONFIG_SOFTFLOAT |
| 201 | LIBOBJS+=fpu/softfloat.o |
| 202 | else |
| 203 | LIBOBJS+=fpu/softfloat-native.o |
| 204 | endif |
| 205 | DEFINES+=-I$(SRC_PATH)/fpu |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 206 | |
| 207 | ifeq ($(TARGET_ARCH), i386) |
bellard | 1e43adf | 2003-09-30 20:54:24 +0000 | [diff] [blame] | 208 | LIBOBJS+=helper.o helper2.o |
bellard | f72b519 | 2004-02-16 21:55:35 +0000 | [diff] [blame] | 209 | ifeq ($(ARCH), i386) |
| 210 | LIBOBJS+=translate-copy.o |
| 211 | endif |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 212 | endif |
| 213 | |
bellard | 0b0babc | 2005-01-03 23:38:40 +0000 | [diff] [blame] | 214 | ifeq ($(TARGET_ARCH), x86_64) |
| 215 | LIBOBJS+=helper.o helper2.o |
| 216 | endif |
| 217 | |
bellard | a245862 | 2005-07-23 22:39:53 +0000 | [diff] [blame] | 218 | ifeq ($(TARGET_BASE_ARCH), ppc) |
bellard | 728c9fd | 2004-01-05 00:08:14 +0000 | [diff] [blame] | 219 | LIBOBJS+= op_helper.o helper.o |
bellard | 6786730 | 2003-11-23 17:05:30 +0000 | [diff] [blame] | 220 | endif |
| 221 | |
bellard | 6af0bf9 | 2005-07-02 14:58:51 +0000 | [diff] [blame] | 222 | ifeq ($(TARGET_ARCH), mips) |
| 223 | LIBOBJS+= op_helper.o helper.o |
| 224 | endif |
| 225 | |
bellard | 64b3ab2 | 2005-01-30 22:43:42 +0000 | [diff] [blame] | 226 | ifeq ($(TARGET_BASE_ARCH), sparc) |
bellard | e95c8d5 | 2004-09-30 22:22:08 +0000 | [diff] [blame] | 227 | LIBOBJS+= op_helper.o helper.o |
| 228 | endif |
| 229 | |
bellard | b7bcbe9 | 2005-02-22 19:27:29 +0000 | [diff] [blame] | 230 | ifeq ($(TARGET_BASE_ARCH), arm) |
bellard | b5ff1b3 | 2005-11-26 10:38:39 +0000 | [diff] [blame] | 231 | LIBOBJS+= op_helper.o helper.o |
bellard | b7bcbe9 | 2005-02-22 19:27:29 +0000 | [diff] [blame] | 232 | endif |
| 233 | |
bellard | fdf9b3e | 2006-04-27 21:07:38 +0000 | [diff] [blame] | 234 | ifeq ($(TARGET_BASE_ARCH), sh4) |
| 235 | LIBOBJS+= op_helper.o helper.o |
| 236 | endif |
| 237 | |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 238 | # NOTE: the disassembler code is only needed for debugging |
| 239 | LIBOBJS+=disas.o |
| 240 | ifeq ($(findstring i386, $(TARGET_ARCH) $(ARCH)),i386) |
bellard | bc51c5c | 2004-03-17 23:46:04 +0000 | [diff] [blame] | 241 | USE_I386_DIS=y |
| 242 | endif |
bellard | 0b0babc | 2005-01-03 23:38:40 +0000 | [diff] [blame] | 243 | ifeq ($(findstring x86_64, $(TARGET_ARCH) $(ARCH)),x86_64) |
bellard | bc51c5c | 2004-03-17 23:46:04 +0000 | [diff] [blame] | 244 | USE_I386_DIS=y |
| 245 | endif |
| 246 | ifdef USE_I386_DIS |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 247 | LIBOBJS+=i386-dis.o |
| 248 | endif |
| 249 | ifeq ($(findstring alpha, $(TARGET_ARCH) $(ARCH)),alpha) |
| 250 | LIBOBJS+=alpha-dis.o |
| 251 | endif |
bellard | a245862 | 2005-07-23 22:39:53 +0000 | [diff] [blame] | 252 | ifeq ($(findstring ppc, $(TARGET_BASE_ARCH) $(ARCH)),ppc) |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 253 | LIBOBJS+=ppc-dis.o |
| 254 | endif |
bellard | 6af0bf9 | 2005-07-02 14:58:51 +0000 | [diff] [blame] | 255 | ifeq ($(findstring mips, $(TARGET_ARCH) $(ARCH)),mips) |
| 256 | LIBOBJS+=mips-dis.o |
| 257 | endif |
bellard | 64b3ab2 | 2005-01-30 22:43:42 +0000 | [diff] [blame] | 258 | ifeq ($(findstring sparc, $(TARGET_BASE_ARCH) $(ARCH)),sparc) |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 259 | LIBOBJS+=sparc-dis.o |
| 260 | endif |
| 261 | ifeq ($(findstring arm, $(TARGET_ARCH) $(ARCH)),arm) |
| 262 | LIBOBJS+=arm-dis.o |
| 263 | endif |
bellard | 48024e4 | 2005-11-06 16:52:11 +0000 | [diff] [blame] | 264 | ifeq ($(findstring m68k, $(TARGET_ARCH) $(ARCH)),m68k) |
| 265 | LIBOBJS+=m68k-dis.o |
| 266 | endif |
bellard | fdf9b3e | 2006-04-27 21:07:38 +0000 | [diff] [blame] | 267 | ifeq ($(findstring sh4, $(TARGET_ARCH) $(ARCH)),sh4) |
| 268 | LIBOBJS+=sh4-dis.o |
| 269 | endif |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 270 | |
bellard | 1fddef4 | 2005-04-17 19:16:13 +0000 | [diff] [blame] | 271 | ifdef CONFIG_GDBSTUB |
| 272 | OBJS+=gdbstub.o |
| 273 | endif |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 274 | |
bellard | 1e43adf | 2003-09-30 20:54:24 +0000 | [diff] [blame] | 275 | all: $(PROGS) |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 276 | |
bellard | 1e43adf | 2003-09-30 20:54:24 +0000 | [diff] [blame] | 277 | $(QEMU_USER): $(OBJS) |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 278 | $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) |
| 279 | ifeq ($(ARCH),alpha) |
| 280 | # Mark as 32 bit binary, i. e. it will be mapped into the low 31 bit of |
| 281 | # the address space (31 bit so sign extending doesn't matter) |
| 282 | echo -ne '\001\000\000\000' | dd of=qemu bs=1 seek=48 count=4 conv=notrunc |
| 283 | endif |
| 284 | |
| 285 | # must use static linking to avoid leaving stuff in virtual address space |
bellard | 5fe141f | 2006-04-23 17:12:42 +0000 | [diff] [blame] | 286 | VL_OBJS=vl.o osdep.o block.o readline.o monitor.o pci.o console.o loader.o |
bellard | de167e4 | 2005-04-28 21:15:08 +0000 | [diff] [blame] | 287 | 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 |
bellard | 7fb843f | 2006-02-01 23:06:55 +0000 | [diff] [blame] | 288 | ifdef CONFIG_WIN32 |
| 289 | VL_OBJS+=tap-win32.o |
| 290 | endif |
bellard | a541f29 | 2004-04-12 20:39:29 +0000 | [diff] [blame] | 291 | |
bellard | 1d14ffa | 2005-10-30 18:58:22 +0000 | [diff] [blame] | 292 | SOUND_HW = sb16.o es1370.o |
bellard | 7372f88 | 2004-11-11 16:55:09 +0000 | [diff] [blame] | 293 | AUDIODRV = audio.o noaudio.o wavaudio.o |
bellard | fb06518 | 2004-11-09 23:09:44 +0000 | [diff] [blame] | 294 | ifdef CONFIG_SDL |
| 295 | AUDIODRV += sdlaudio.o |
| 296 | endif |
| 297 | ifdef CONFIG_OSS |
| 298 | AUDIODRV += ossaudio.o |
| 299 | endif |
bellard | 1d14ffa | 2005-10-30 18:58:22 +0000 | [diff] [blame] | 300 | ifdef CONFIG_COREAUDIO |
| 301 | AUDIODRV += coreaudio.o |
bellard | 85571bc | 2004-11-07 18:04:02 +0000 | [diff] [blame] | 302 | endif |
bellard | 1d14ffa | 2005-10-30 18:58:22 +0000 | [diff] [blame] | 303 | ifdef CONFIG_ALSA |
| 304 | AUDIODRV += alsaaudio.o |
| 305 | LIBS += -lasound |
| 306 | endif |
| 307 | ifdef CONFIG_DSOUND |
| 308 | AUDIODRV += dsoundaudio.o |
| 309 | LIBS += -lole32 -ldxguid |
| 310 | endif |
bellard | 102a52e | 2004-11-14 19:57:29 +0000 | [diff] [blame] | 311 | ifdef CONFIG_FMOD |
bellard | 85571bc | 2004-11-07 18:04:02 +0000 | [diff] [blame] | 312 | AUDIODRV += fmodaudio.o |
bellard | 102a52e | 2004-11-14 19:57:29 +0000 | [diff] [blame] | 313 | audio.o fmodaudio.o: DEFINES := -I$(CONFIG_FMOD_INC) $(DEFINES) |
| 314 | LIBS += $(CONFIG_FMOD_LIB) |
bellard | 85571bc | 2004-11-07 18:04:02 +0000 | [diff] [blame] | 315 | endif |
bellard | 1d14ffa | 2005-10-30 18:58:22 +0000 | [diff] [blame] | 316 | ifdef CONFIG_ADLIB |
| 317 | SOUND_HW += fmopl.o adlib.o |
| 318 | endif |
bellard | 85571bc | 2004-11-07 18:04:02 +0000 | [diff] [blame] | 319 | |
pbrook | 2e5d83b | 2006-05-25 23:58:51 +0000 | [diff] [blame] | 320 | # SCSI layer |
pbrook | 7d8406b | 2006-05-30 01:48:12 +0000 | [diff] [blame] | 321 | VL_OBJS+= scsi-disk.o cdrom.o lsi53c895a.o |
pbrook | 2e5d83b | 2006-05-25 23:58:51 +0000 | [diff] [blame] | 322 | |
bellard | a594cfb | 2005-11-06 16:13:29 +0000 | [diff] [blame] | 323 | # USB layer |
pbrook | 2e5d83b | 2006-05-25 23:58:51 +0000 | [diff] [blame] | 324 | VL_OBJS+= usb.o usb-hub.o usb-linux.o usb-hid.o usb-ohci.o usb-msd.o |
bellard | a594cfb | 2005-11-06 16:13:29 +0000 | [diff] [blame] | 325 | |
pbrook | a41b2ff | 2006-02-05 04:14:41 +0000 | [diff] [blame] | 326 | # PCI network cards |
| 327 | VL_OBJS+= ne2000.o rtl8139.o |
| 328 | |
bellard | 0b0babc | 2005-01-03 23:38:40 +0000 | [diff] [blame] | 329 | ifeq ($(TARGET_BASE_ARCH), i386) |
bellard | a541f29 | 2004-04-12 20:39:29 +0000 | [diff] [blame] | 330 | # Hardware support |
pbrook | a41b2ff | 2006-02-05 04:14:41 +0000 | [diff] [blame] | 331 | VL_OBJS+= ide.o pckbd.o ps2.o vga.o $(SOUND_HW) dma.o $(AUDIODRV) |
bellard | fd06c37 | 2006-04-24 21:58:30 +0000 | [diff] [blame] | 332 | VL_OBJS+= fdc.o mc146818rtc.o serial.o i8259.o i8254.o pcspk.o pc.o |
pbrook | 502a539 | 2006-05-13 16:11:23 +0000 | [diff] [blame] | 333 | VL_OBJS+= cirrus_vga.o mixeng.o apic.o parallel.o acpi.o piix_pci.o |
| 334 | VL_OBJS+= usb-uhci.o |
bellard | 1d14ffa | 2005-10-30 18:58:22 +0000 | [diff] [blame] | 335 | DEFINES += -DHAS_AUDIO |
bellard | 67b915a | 2004-03-31 23:37:16 +0000 | [diff] [blame] | 336 | endif |
bellard | a245862 | 2005-07-23 22:39:53 +0000 | [diff] [blame] | 337 | ifeq ($(TARGET_BASE_ARCH), ppc) |
pbrook | a41b2ff | 2006-02-05 04:14:41 +0000 | [diff] [blame] | 338 | VL_OBJS+= ppc.o ide.o pckbd.o ps2.o vga.o $(SOUND_HW) dma.o $(AUDIODRV) |
bellard | 6420120 | 2004-05-26 22:55:16 +0000 | [diff] [blame] | 339 | VL_OBJS+= mc146818rtc.o serial.o i8259.o i8254.o fdc.o m48t59.o |
bellard | e68b9b2 | 2005-06-05 15:21:57 +0000 | [diff] [blame] | 340 | VL_OBJS+= ppc_prep.o ppc_chrp.o cuda.o adb.o openpic.o heathrow_pic.o mixeng.o |
pbrook | 502a539 | 2006-05-13 16:11:23 +0000 | [diff] [blame] | 341 | VL_OBJS+= grackle_pci.o prep_pci.o unin_pci.o |
bellard | 1d14ffa | 2005-10-30 18:58:22 +0000 | [diff] [blame] | 342 | DEFINES += -DHAS_AUDIO |
bellard | a541f29 | 2004-04-12 20:39:29 +0000 | [diff] [blame] | 343 | endif |
bellard | 6af0bf9 | 2005-07-02 14:58:51 +0000 | [diff] [blame] | 344 | ifeq ($(TARGET_ARCH), mips) |
pbrook | a41b2ff | 2006-02-05 04:14:41 +0000 | [diff] [blame] | 345 | VL_OBJS+= mips_r4k.o dma.o vga.o serial.o i8254.o i8259.o |
bellard | 697584a | 2005-08-21 09:41:56 +0000 | [diff] [blame] | 346 | #VL_OBJS+= #ide.o pckbd.o fdc.o m48t59.o |
bellard | 6af0bf9 | 2005-07-02 14:58:51 +0000 | [diff] [blame] | 347 | endif |
bellard | 64b3ab2 | 2005-01-30 22:43:42 +0000 | [diff] [blame] | 348 | ifeq ($(TARGET_BASE_ARCH), sparc) |
bellard | 3475187 | 2005-07-02 14:31:34 +0000 | [diff] [blame] | 349 | ifeq ($(TARGET_ARCH), sparc64) |
pbrook | 502a539 | 2006-05-13 16:11:23 +0000 | [diff] [blame] | 350 | VL_OBJS+= sun4u.o ide.o pckbd.o ps2.o vga.o apb_pci.o |
bellard | 8346901 | 2005-07-23 14:27:54 +0000 | [diff] [blame] | 351 | VL_OBJS+= fdc.o mc146818rtc.o serial.o m48t59.o |
| 352 | VL_OBJS+= cirrus_vga.o parallel.o |
bellard | 3475187 | 2005-07-02 14:31:34 +0000 | [diff] [blame] | 353 | else |
bellard | 5fe141f | 2006-04-23 17:12:42 +0000 | [diff] [blame] | 354 | VL_OBJS+= sun4m.o tcx.o lance.o iommu.o m48t59.o slavio_intctl.o |
bellard | 819385c | 2005-10-30 16:58:32 +0000 | [diff] [blame] | 355 | VL_OBJS+= slavio_timer.o slavio_serial.o slavio_misc.o fdc.o esp.o |
bellard | 3475187 | 2005-07-02 14:31:34 +0000 | [diff] [blame] | 356 | endif |
bellard | e95c8d5 | 2004-09-30 22:22:08 +0000 | [diff] [blame] | 357 | endif |
bellard | b5ff1b3 | 2005-11-26 10:38:39 +0000 | [diff] [blame] | 358 | ifeq ($(TARGET_BASE_ARCH), arm) |
pbrook | cdbdb64 | 2006-04-09 01:32:52 +0000 | [diff] [blame] | 359 | VL_OBJS+= integratorcp.o versatilepb.o ps2.o smc91c111.o arm_pic.o arm_timer.o |
pbrook | 1640695 | 2006-04-27 23:15:07 +0000 | [diff] [blame] | 360 | VL_OBJS+= arm_boot.o pl011.o pl050.o pl080.o pl110.o pl190.o |
pbrook | 502a539 | 2006-05-13 16:11:23 +0000 | [diff] [blame] | 361 | VL_OBJS+= versatile_pci.o |
bellard | b5ff1b3 | 2005-11-26 10:38:39 +0000 | [diff] [blame] | 362 | endif |
bellard | fdf9b3e | 2006-04-27 21:07:38 +0000 | [diff] [blame] | 363 | ifeq ($(TARGET_BASE_ARCH), sh4) |
| 364 | VL_OBJS+= shix.o sh7750.o sh7750_regnames.o tc58128.o |
| 365 | endif |
bellard | a541f29 | 2004-04-12 20:39:29 +0000 | [diff] [blame] | 366 | ifdef CONFIG_GDBSTUB |
| 367 | VL_OBJS+=gdbstub.o |
bellard | 728c9fd | 2004-01-05 00:08:14 +0000 | [diff] [blame] | 368 | endif |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 369 | ifdef CONFIG_SDL |
| 370 | VL_OBJS+=sdl.o |
bellard | de5eaa6 | 2003-11-16 23:18:17 +0000 | [diff] [blame] | 371 | endif |
bellard | 2423686 | 2006-04-30 21:28:36 +0000 | [diff] [blame] | 372 | VL_OBJS+=vnc.o |
bellard | 5b0753e | 2005-03-01 21:37:28 +0000 | [diff] [blame] | 373 | ifdef CONFIG_COCOA |
| 374 | VL_OBJS+=cocoa.o |
bellard | 1d14ffa | 2005-10-30 18:58:22 +0000 | [diff] [blame] | 375 | COCOA_LIBS=-F/System/Library/Frameworks -framework Cocoa -framework IOKit |
| 376 | ifdef CONFIG_COREAUDIO |
| 377 | COCOA_LIBS+=-framework CoreAudio |
| 378 | endif |
bellard | 5b0753e | 2005-03-01 21:37:28 +0000 | [diff] [blame] | 379 | endif |
bellard | 7c1f25b | 2004-04-22 00:02:08 +0000 | [diff] [blame] | 380 | ifdef CONFIG_SLIRP |
| 381 | DEFINES+=-I$(SRC_PATH)/slirp |
| 382 | SLIRP_OBJS=cksum.o if.o ip_icmp.o ip_input.o ip_output.o \ |
| 383 | slirp.o mbuf.o misc.o sbuf.o socket.o tcp_input.o tcp_output.o \ |
bellard | c7f7464 | 2004-08-24 21:57:12 +0000 | [diff] [blame] | 384 | tcp_subr.o tcp_timer.o udp.o bootp.o debug.o tftp.o |
bellard | 7c1f25b | 2004-04-22 00:02:08 +0000 | [diff] [blame] | 385 | VL_OBJS+=$(addprefix slirp/, $(SLIRP_OBJS)) |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 386 | endif |
| 387 | |
bellard | c321f67 | 2003-10-30 01:18:42 +0000 | [diff] [blame] | 388 | VL_LDFLAGS= |
| 389 | # specific flags are needed for non soft mmu emulator |
bellard | c321f67 | 2003-10-30 01:18:42 +0000 | [diff] [blame] | 390 | ifdef CONFIG_STATIC |
| 391 | VL_LDFLAGS+=-static |
| 392 | endif |
bellard | de5eaa6 | 2003-11-16 23:18:17 +0000 | [diff] [blame] | 393 | ifndef CONFIG_SOFTMMU |
| 394 | VL_LDFLAGS+=-Wl,-T,$(SRC_PATH)/i386-vl.ld |
| 395 | endif |
bellard | 83fb7ad | 2004-07-05 21:25:26 +0000 | [diff] [blame] | 396 | ifndef CONFIG_DARWIN |
bellard | 11d9f69 | 2004-04-02 20:55:59 +0000 | [diff] [blame] | 397 | ifndef CONFIG_WIN32 |
bellard | ec530c8 | 2006-04-25 22:36:06 +0000 | [diff] [blame] | 398 | ifndef CONFIG_SOLARIS |
bellard | 11d9f69 | 2004-04-02 20:55:59 +0000 | [diff] [blame] | 399 | VL_LIBS=-lutil |
| 400 | endif |
bellard | 83fb7ad | 2004-07-05 21:25:26 +0000 | [diff] [blame] | 401 | endif |
bellard | ec530c8 | 2006-04-25 22:36:06 +0000 | [diff] [blame] | 402 | endif |
bellard | e3086fb | 2005-02-10 21:48:51 +0000 | [diff] [blame] | 403 | ifdef TARGET_GPROF |
| 404 | vl.o: CFLAGS+=-p |
| 405 | VL_LDFLAGS+=-p |
| 406 | endif |
bellard | c321f67 | 2003-10-30 01:18:42 +0000 | [diff] [blame] | 407 | |
bellard | b8076a7 | 2005-04-07 22:20:31 +0000 | [diff] [blame] | 408 | ifeq ($(ARCH),ia64) |
| 409 | VL_LDFLAGS+=-Wl,-G0 -Wl,-T,$(SRC_PATH)/ia64.ld |
| 410 | endif |
| 411 | |
bellard | 1d14ffa | 2005-10-30 18:58:22 +0000 | [diff] [blame] | 412 | ifdef CONFIG_WIN32 |
| 413 | SDL_LIBS := $(filter-out -mwindows, $(SDL_LIBS)) -mconsole |
| 414 | endif |
| 415 | |
bellard | 1e43adf | 2003-09-30 20:54:24 +0000 | [diff] [blame] | 416 | $(QEMU_SYSTEM): $(VL_OBJS) libqemu.a |
bellard | 5b0753e | 2005-03-01 21:37:28 +0000 | [diff] [blame] | 417 | $(CC) $(VL_LDFLAGS) -o $@ $^ $(LIBS) $(SDL_LIBS) $(COCOA_LIBS) $(VL_LIBS) |
| 418 | |
| 419 | cocoa.o: cocoa.m |
| 420 | $(CC) $(CFLAGS) $(DEFINES) -c -o $@ $< |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 421 | |
bellard | 3d11d0e | 2004-12-12 16:56:30 +0000 | [diff] [blame] | 422 | sdl.o: sdl.c keymaps.c sdl_keysym.h |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 423 | $(CC) $(CFLAGS) $(DEFINES) $(SDL_CFLAGS) -c -o $@ $< |
| 424 | |
bellard | 2423686 | 2006-04-30 21:28:36 +0000 | [diff] [blame] | 425 | vnc.o: vnc.c keymaps.c sdl_keysym.h vnchextile.h |
| 426 | $(CC) $(CFLAGS) $(DEFINES) -c -o $@ $< |
| 427 | |
bellard | 9f059ec | 2004-11-14 18:59:52 +0000 | [diff] [blame] | 428 | sdlaudio.o: sdlaudio.c |
| 429 | $(CC) $(CFLAGS) $(DEFINES) $(SDL_CFLAGS) -c -o $@ $< |
| 430 | |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 431 | depend: $(SRCS) |
bellard | 16e9b7d | 2003-10-27 21:09:52 +0000 | [diff] [blame] | 432 | $(CC) -MM $(CFLAGS) $(DEFINES) $^ 1>.depend |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 433 | |
bellard | 1d14ffa | 2005-10-30 18:58:22 +0000 | [diff] [blame] | 434 | vldepend: $(VL_OBJS:.o=.c) |
| 435 | $(CC) -MM $(CFLAGS) $(DEFINES) $^ 1>.depend |
| 436 | |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 437 | # libqemu |
| 438 | |
| 439 | libqemu.a: $(LIBOBJS) |
| 440 | rm -f $@ |
| 441 | $(AR) rcs $@ $(LIBOBJS) |
| 442 | |
bellard | 1e43adf | 2003-09-30 20:54:24 +0000 | [diff] [blame] | 443 | translate.o: translate.c gen-op.h opc.h cpu.h |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 444 | |
bellard | 158142c | 2005-03-13 16:54:06 +0000 | [diff] [blame] | 445 | translate-all.o: translate-all.c opc.h cpu.h |
| 446 | |
| 447 | translate-op.o: translate-all.c op.h opc.h cpu.h |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 448 | |
bellard | 1e43adf | 2003-09-30 20:54:24 +0000 | [diff] [blame] | 449 | op.h: op.o $(DYNGEN) |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 450 | $(DYNGEN) -o $@ $< |
| 451 | |
bellard | 1e43adf | 2003-09-30 20:54:24 +0000 | [diff] [blame] | 452 | opc.h: op.o $(DYNGEN) |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 453 | $(DYNGEN) -c -o $@ $< |
| 454 | |
bellard | 1e43adf | 2003-09-30 20:54:24 +0000 | [diff] [blame] | 455 | gen-op.h: op.o $(DYNGEN) |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 456 | $(DYNGEN) -g -o $@ $< |
| 457 | |
bellard | 1e43adf | 2003-09-30 20:54:24 +0000 | [diff] [blame] | 458 | op.o: op.c |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 459 | $(CC) $(OP_CFLAGS) $(DEFINES) -c -o $@ $< |
| 460 | |
bellard | 1e43adf | 2003-09-30 20:54:24 +0000 | [diff] [blame] | 461 | helper.o: helper.c |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 462 | $(CC) $(HELPER_CFLAGS) $(DEFINES) -c -o $@ $< |
| 463 | |
bellard | 0b0babc | 2005-01-03 23:38:40 +0000 | [diff] [blame] | 464 | ifeq ($(TARGET_BASE_ARCH), i386) |
bellard | 664e0f1 | 2005-01-08 18:58:29 +0000 | [diff] [blame] | 465 | op.o: op.c opreg_template.h ops_template.h ops_template_mem.h ops_mem.h ops_sse.h |
bellard | 1e43adf | 2003-09-30 20:54:24 +0000 | [diff] [blame] | 466 | endif |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 467 | |
bellard | 1e43adf | 2003-09-30 20:54:24 +0000 | [diff] [blame] | 468 | ifeq ($(TARGET_ARCH), arm) |
| 469 | op.o: op.c op_template.h |
pbrook | bdd5003 | 2006-02-06 04:11:15 +0000 | [diff] [blame] | 470 | pl110.o: pl110_template.h |
bellard | 1e43adf | 2003-09-30 20:54:24 +0000 | [diff] [blame] | 471 | endif |
| 472 | |
bellard | 64b3ab2 | 2005-01-30 22:43:42 +0000 | [diff] [blame] | 473 | ifeq ($(TARGET_BASE_ARCH), sparc) |
bellard | 3475187 | 2005-07-02 14:31:34 +0000 | [diff] [blame] | 474 | op.o: op.c op_template.h op_mem.h fop_template.h fbranch_template.h |
| 475 | magic_load.o: elf_op.h |
bellard | 1e43adf | 2003-09-30 20:54:24 +0000 | [diff] [blame] | 476 | endif |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 477 | |
bellard | a245862 | 2005-07-23 22:39:53 +0000 | [diff] [blame] | 478 | ifeq ($(TARGET_BASE_ARCH), ppc) |
bellard | 728c9fd | 2004-01-05 00:08:14 +0000 | [diff] [blame] | 479 | op.o: op.c op_template.h op_mem.h |
| 480 | op_helper.o: op_helper_mem.h |
bellard | 3fc6c08 | 2005-07-02 20:59:34 +0000 | [diff] [blame] | 481 | translate.o: translate.c translate_init.c |
bellard | 728c9fd | 2004-01-05 00:08:14 +0000 | [diff] [blame] | 482 | endif |
| 483 | |
bellard | 6af0bf9 | 2005-07-02 14:58:51 +0000 | [diff] [blame] | 484 | ifeq ($(TARGET_ARCH), mips) |
| 485 | op.o: op.c op_template.c op_mem.c |
| 486 | op_helper.o: op_helper_mem.c |
| 487 | endif |
| 488 | |
bellard | 5fe141f | 2006-04-23 17:12:42 +0000 | [diff] [blame] | 489 | loader.o: loader.c elf_ops.h |
| 490 | |
bellard | 6515b20 | 2006-05-03 22:02:44 +0000 | [diff] [blame] | 491 | acpi.o: acpi.c acpi-dsdt.hex |
| 492 | |
| 493 | #$(SRC_PATH)/hw/acpi-dsdt.hex: acpi-dsdt.dsl |
| 494 | # iasl -tc -p $@ $< |
| 495 | |
bellard | fdf9b3e | 2006-04-27 21:07:38 +0000 | [diff] [blame] | 496 | ifeq ($(TARGET_ARCH), sh4) |
| 497 | op.o: op.c op_mem.c cpu.h |
| 498 | op_helper.o: op_helper.c exec.h cpu.h |
| 499 | helper.o: helper.c exec.h cpu.h |
bellard | 27c7ca7 | 2006-04-27 21:32:09 +0000 | [diff] [blame] | 500 | sh7750.o: sh7750.c sh7750_regs.h sh7750_regnames.h cpu.h |
| 501 | shix.o: shix.c sh7750_regs.h sh7750_regnames.h |
bellard | fdf9b3e | 2006-04-27 21:07:38 +0000 | [diff] [blame] | 502 | sh7750_regnames.o: sh7750_regnames.c sh7750_regnames.h sh7750_regs.h |
bellard | 27c7ca7 | 2006-04-27 21:32:09 +0000 | [diff] [blame] | 503 | tc58128.o: tc58128.c |
bellard | fdf9b3e | 2006-04-27 21:07:38 +0000 | [diff] [blame] | 504 | endif |
| 505 | |
pbrook | 214feb5 | 2006-05-13 16:30:17 +0000 | [diff] [blame] | 506 | $(OBJS) $(LIBOBJS) $(VL_OBJS): config.h ../config-host.h |
| 507 | |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 508 | %.o: %.c |
| 509 | $(CC) $(CFLAGS) $(DEFINES) -c -o $@ $< |
| 510 | |
bellard | f72b519 | 2004-02-16 21:55:35 +0000 | [diff] [blame] | 511 | %.o: %.S |
| 512 | $(CC) $(DEFINES) -c -o $@ $< |
| 513 | |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 514 | clean: |
bellard | e362b55 | 2005-04-26 20:34:26 +0000 | [diff] [blame] | 515 | rm -f *.o *.a *~ $(PROGS) gen-op.h opc.h op.h nwfpe/*.o slirp/*.o fpu/*.o |
bellard | 1e43adf | 2003-09-30 20:54:24 +0000 | [diff] [blame] | 516 | |
| 517 | install: all |
bellard | 9b14bb0 | 2004-03-26 22:43:34 +0000 | [diff] [blame] | 518 | ifneq ($(PROGS),) |
pbrook | 6a88264 | 2006-04-17 13:57:12 +0000 | [diff] [blame] | 519 | $(INSTALL) -m 755 -s $(PROGS) "$(DESTDIR)$(bindir)" |
bellard | 9b14bb0 | 2004-03-26 22:43:34 +0000 | [diff] [blame] | 520 | endif |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 521 | |
| 522 | ifneq ($(wildcard .depend),) |
| 523 | include .depend |
| 524 | endif |
bellard | 1d14ffa | 2005-10-30 18:58:22 +0000 | [diff] [blame] | 525 | |
bellard | c0fe382 | 2005-11-05 18:55:28 +0000 | [diff] [blame] | 526 | ifeq (1, 0) |
bellard | 1d14ffa | 2005-10-30 18:58:22 +0000 | [diff] [blame] | 527 | audio.o sdlaudio.o dsoundaudio.o ossaudio.o wavaudio.o noaudio.o \ |
bellard | c0fe382 | 2005-11-05 18:55:28 +0000 | [diff] [blame] | 528 | fmodaudio.o alsaaudio.o mixeng.o sb16.o es1370.o gus.o adlib.o: \ |
bellard | 1d14ffa | 2005-10-30 18:58:22 +0000 | [diff] [blame] | 529 | CFLAGS := $(CFLAGS) -Wall -Werror -W -Wsign-compare |
| 530 | endif |