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 |
ths | 540635b | 2007-09-30 01:58:33 +0000 | [diff] [blame] | 7 | ifeq ($(TARGET_ARCH), mipsn32) |
| 8 | TARGET_BASE_ARCH:=mips |
| 9 | endif |
ths | fbe4f65 | 2007-04-01 11:16:48 +0000 | [diff] [blame] | 10 | ifeq ($(TARGET_ARCH), mips64) |
| 11 | TARGET_BASE_ARCH:=mips |
| 12 | endif |
bellard | a245862 | 2005-07-23 22:39:53 +0000 | [diff] [blame] | 13 | ifeq ($(TARGET_ARCH), ppc64) |
| 14 | TARGET_BASE_ARCH:=ppc |
| 15 | endif |
j_mayer | 22f8a8b | 2007-10-14 08:38:29 +0000 | [diff] [blame] | 16 | ifeq ($(TARGET_ARCH), ppc64h) |
| 17 | TARGET_BASE_ARCH:=ppc |
| 18 | endif |
j_mayer | d4082e9 | 2007-04-24 07:34:03 +0000 | [diff] [blame] | 19 | ifeq ($(TARGET_ARCH), ppcemb) |
| 20 | TARGET_BASE_ARCH:=ppc |
| 21 | endif |
bellard | 64b3ab2 | 2005-01-30 22:43:42 +0000 | [diff] [blame] | 22 | ifeq ($(TARGET_ARCH), sparc64) |
| 23 | TARGET_BASE_ARCH:=sparc |
| 24 | endif |
bellard | 0b0babc | 2005-01-03 23:38:40 +0000 | [diff] [blame] | 25 | TARGET_PATH=$(SRC_PATH)/target-$(TARGET_BASE_ARCH) |
bellard | 4fb240a | 2007-11-07 19:24:02 +0000 | [diff] [blame] | 26 | VPATH=$(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw |
balrog | 46dc388 | 2008-06-02 02:09:09 +0000 | [diff] [blame] | 27 | CPPFLAGS=-I. -I.. -I$(TARGET_PATH) -I$(SRC_PATH) -MMD -MT $@ -MP -DNEED_CPU_H |
bellard | 0b0babc | 2005-01-03 23:38:40 +0000 | [diff] [blame] | 28 | #CFLAGS+=-Werror |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 29 | LIBS= |
bellard | 1e43adf | 2003-09-30 20:54:24 +0000 | [diff] [blame] | 30 | # user emulator name |
bellard | 0c64b9c | 2008-01-06 18:27:58 +0000 | [diff] [blame] | 31 | ifndef TARGET_ARCH2 |
bellard | c91fde6 | 2006-05-02 22:52:36 +0000 | [diff] [blame] | 32 | TARGET_ARCH2=$(TARGET_ARCH) |
bellard | 0c64b9c | 2008-01-06 18:27:58 +0000 | [diff] [blame] | 33 | endif |
bellard | 808c495 | 2004-12-19 23:33:47 +0000 | [diff] [blame] | 34 | ifeq ($(TARGET_ARCH),arm) |
| 35 | ifeq ($(TARGET_WORDS_BIGENDIAN),yes) |
bellard | c91fde6 | 2006-05-02 22:52:36 +0000 | [diff] [blame] | 36 | TARGET_ARCH2=armeb |
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 | endif |
pbrook | 908f52b | 2006-06-18 19:16:53 +0000 | [diff] [blame] | 39 | ifeq ($(TARGET_ARCH),sh4) |
| 40 | ifeq ($(TARGET_WORDS_BIGENDIAN),yes) |
| 41 | TARGET_ARCH2=sh4eb |
| 42 | endif |
| 43 | endif |
bellard | 01f5e59 | 2005-12-06 21:42:17 +0000 | [diff] [blame] | 44 | ifeq ($(TARGET_ARCH),mips) |
bellard | c91fde6 | 2006-05-02 22:52:36 +0000 | [diff] [blame] | 45 | ifneq ($(TARGET_WORDS_BIGENDIAN),yes) |
| 46 | TARGET_ARCH2=mipsel |
bellard | 01f5e59 | 2005-12-06 21:42:17 +0000 | [diff] [blame] | 47 | endif |
bellard | 808c495 | 2004-12-19 23:33:47 +0000 | [diff] [blame] | 48 | endif |
ths | 540635b | 2007-09-30 01:58:33 +0000 | [diff] [blame] | 49 | ifeq ($(TARGET_ARCH),mipsn32) |
| 50 | ifneq ($(TARGET_WORDS_BIGENDIAN),yes) |
| 51 | TARGET_ARCH2=mipsn32el |
| 52 | endif |
| 53 | endif |
ths | fbe4f65 | 2007-04-01 11:16:48 +0000 | [diff] [blame] | 54 | ifeq ($(TARGET_ARCH),mips64) |
| 55 | ifneq ($(TARGET_WORDS_BIGENDIAN),yes) |
| 56 | TARGET_ARCH2=mips64el |
| 57 | endif |
| 58 | endif |
bellard | 1e43adf | 2003-09-30 20:54:24 +0000 | [diff] [blame] | 59 | |
bellard | 16e9b7d | 2003-10-27 21:09:52 +0000 | [diff] [blame] | 60 | ifdef CONFIG_USER_ONLY |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 61 | # user emulator name |
| 62 | QEMU_PROG=qemu-$(TARGET_ARCH2) |
bellard | 16e9b7d | 2003-10-27 21:09:52 +0000 | [diff] [blame] | 63 | else |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 64 | # system emulator name |
| 65 | ifeq ($(TARGET_ARCH), i386) |
| 66 | QEMU_PROG=qemu$(EXESUF) |
| 67 | else |
| 68 | QEMU_PROG=qemu-system-$(TARGET_ARCH2)$(EXESUF) |
bellard | de5eaa6 | 2003-11-16 23:18:17 +0000 | [diff] [blame] | 69 | endif |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 70 | endif |
bellard | 728c9fd | 2004-01-05 00:08:14 +0000 | [diff] [blame] | 71 | |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 72 | PROGS=$(QEMU_PROG) |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 73 | |
ths | 6f30fa8 | 2007-01-05 01:00:47 +0000 | [diff] [blame] | 74 | # We require -O2 to avoid the stack setup prologue in EXIT_TB |
blueswir1 | ac41a62 | 2008-09-14 06:46:31 +0000 | [diff] [blame] | 75 | OP_CFLAGS := -O2 -g -fno-strict-aliasing |
blueswir1 | e0e36fe | 2008-12-07 19:16:27 +0000 | [diff] [blame] | 76 | OP_CFLAGS += -Wall -Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes -Wstrict-prototypes -Wredundant-decls |
ths | 6c041c5 | 2007-03-18 23:23:31 +0000 | [diff] [blame] | 77 | |
| 78 | # cc-option |
| 79 | # Usage: OP_CFLAGS+=$(call cc-option, -falign-functions=0, -malign-functions=0) |
| 80 | |
| 81 | cc-option = $(shell if $(CC) $(OP_CFLAGS) $(1) -S -o /dev/null -xc /dev/null \ |
| 82 | > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;) |
| 83 | |
| 84 | OP_CFLAGS+=$(call cc-option, -fno-reorder-blocks, "") |
| 85 | OP_CFLAGS+=$(call cc-option, -fno-gcse, "") |
| 86 | OP_CFLAGS+=$(call cc-option, -fno-tree-ch, "") |
| 87 | OP_CFLAGS+=$(call cc-option, -fno-optimize-sibling-calls, "") |
| 88 | OP_CFLAGS+=$(call cc-option, -fno-crossjumping, "") |
| 89 | OP_CFLAGS+=$(call cc-option, -fno-align-labels, "") |
| 90 | OP_CFLAGS+=$(call cc-option, -fno-align-jumps, "") |
| 91 | OP_CFLAGS+=$(call cc-option, -fno-align-functions, $(call cc-option, -malign-functions=0, "")) |
ths | 1870a74 | 2007-09-13 03:24:53 +0000 | [diff] [blame] | 92 | OP_CFLAGS+=$(call cc-option, -fno-section-anchors, "") |
ths | 6f30fa8 | 2007-01-05 01:00:47 +0000 | [diff] [blame] | 93 | |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 94 | HELPER_CFLAGS= |
| 95 | |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 96 | ifeq ($(ARCH),i386) |
ths | 6f30fa8 | 2007-01-05 01:00:47 +0000 | [diff] [blame] | 97 | HELPER_CFLAGS+=-fomit-frame-pointer |
| 98 | OP_CFLAGS+=-mpreferred-stack-boundary=2 -fomit-frame-pointer |
bellard | bc51c5c | 2004-03-17 23:46:04 +0000 | [diff] [blame] | 99 | endif |
| 100 | |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 101 | ifeq ($(ARCH),ppc) |
ths | 6f30fa8 | 2007-01-05 01:00:47 +0000 | [diff] [blame] | 102 | CPPFLAGS+= -D__powerpc__ |
malc | 176a4f2 | 2008-06-09 06:06:30 +0000 | [diff] [blame] | 103 | OP_CFLAGS+= -mlongcall |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 104 | endif |
| 105 | |
| 106 | ifeq ($(ARCH),sparc) |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 107 | CFLAGS+=-ffixed-g2 -ffixed-g3 |
blueswir1 | 3142255 | 2007-04-16 18:27:06 +0000 | [diff] [blame] | 108 | OP_CFLAGS+=-fno-delayed-branch -ffixed-i0 |
| 109 | ifeq ($(CONFIG_SOLARIS),yes) |
| 110 | OP_CFLAGS+=-fno-omit-frame-pointer |
| 111 | else |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 112 | CFLAGS+=-ffixed-g1 -ffixed-g6 |
| 113 | HELPER_CFLAGS+=-ffixed-i0 |
blueswir1 | 3142255 | 2007-04-16 18:27:06 +0000 | [diff] [blame] | 114 | endif |
bellard | fdbb469 | 2006-06-14 17:32:25 +0000 | [diff] [blame] | 115 | endif |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 116 | |
| 117 | ifeq ($(ARCH),sparc64) |
blueswir1 | 3142255 | 2007-04-16 18:27:06 +0000 | [diff] [blame] | 118 | OP_CFLAGS+=-mcpu=ultrasparc -m64 -fno-delayed-branch -ffixed-i0 |
| 119 | ifneq ($(CONFIG_SOLARIS),yes) |
blueswir1 | e97b640 | 2008-07-26 17:19:35 +0000 | [diff] [blame] | 120 | CFLAGS+=-ffixed-g5 -ffixed-g6 -ffixed-g7 |
| 121 | OP_CFLAGS+=-ffixed-g5 -ffixed-g6 -ffixed-g7 |
| 122 | else |
| 123 | CFLAGS+=-ffixed-g1 -ffixed-g4 -ffixed-g5 -ffixed-g7 |
blueswir1 | 3142255 | 2007-04-16 18:27:06 +0000 | [diff] [blame] | 124 | endif |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 125 | endif |
| 126 | |
| 127 | ifeq ($(ARCH),alpha) |
ths | 6f30fa8 | 2007-01-05 01:00:47 +0000 | [diff] [blame] | 128 | # -msmall-data is not used for OP_CFLAGS because we want two-instruction |
| 129 | # relocations for the constant constructions |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 130 | # Ensure there's only a single GP |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 131 | CFLAGS+=-msmall-data |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 132 | endif |
| 133 | |
aurel32 | f54b3f9 | 2008-04-12 20:14:54 +0000 | [diff] [blame] | 134 | ifeq ($(ARCH),hppa) |
| 135 | OP_CFLAGS=-O1 -fno-delayed-branch |
| 136 | BASE_LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld |
| 137 | endif |
| 138 | |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 139 | ifeq ($(ARCH),ia64) |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 140 | CFLAGS+=-mno-sdata |
ths | 6f30fa8 | 2007-01-05 01:00:47 +0000 | [diff] [blame] | 141 | OP_CFLAGS+=-mno-sdata |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 142 | endif |
| 143 | |
| 144 | ifeq ($(ARCH),arm) |
ths | 6f30fa8 | 2007-01-05 01:00:47 +0000 | [diff] [blame] | 145 | OP_CFLAGS+=-mno-sched-prolog -fno-omit-frame-pointer |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 146 | endif |
| 147 | |
bellard | 38e584a | 2003-08-10 22:14:22 +0000 | [diff] [blame] | 148 | ifeq ($(ARCH),m68k) |
ths | 6f30fa8 | 2007-01-05 01:00:47 +0000 | [diff] [blame] | 149 | OP_CFLAGS+=-fomit-frame-pointer |
ths | 6f30fa8 | 2007-01-05 01:00:47 +0000 | [diff] [blame] | 150 | endif |
| 151 | |
| 152 | ifeq ($(ARCH),mips) |
ths | 9617efe | 2007-05-08 21:05:55 +0000 | [diff] [blame] | 153 | OP_CFLAGS+=-mabi=32 -G0 -fno-PIC -mno-abicalls -fomit-frame-pointer -fno-delayed-branch -Wa,-O0 |
ths | fbe4f65 | 2007-04-01 11:16:48 +0000 | [diff] [blame] | 154 | endif |
| 155 | |
| 156 | ifeq ($(ARCH),mips64) |
ths | 9617efe | 2007-05-08 21:05:55 +0000 | [diff] [blame] | 157 | OP_CFLAGS+=-mabi=n32 -G0 -fno-PIC -mno-abicalls -fomit-frame-pointer -fno-delayed-branch -Wa,-O0 |
bellard | 38e584a | 2003-08-10 22:14:22 +0000 | [diff] [blame] | 158 | endif |
| 159 | |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 160 | CFLAGS+=$(OS_CFLAGS) $(ARCH_CFLAGS) |
| 161 | LDFLAGS+=$(OS_LDFLAGS) $(ARCH_LDFLAGS) |
blueswir1 | 3142255 | 2007-04-16 18:27:06 +0000 | [diff] [blame] | 162 | OP_CFLAGS+=$(OS_CFLAGS) $(ARCH_CFLAGS) |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 163 | |
ths | 6f30fa8 | 2007-01-05 01:00:47 +0000 | [diff] [blame] | 164 | CPPFLAGS+=-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 165 | LIBS+=-lm |
bellard | 67b915a | 2004-03-31 23:37:16 +0000 | [diff] [blame] | 166 | ifdef CONFIG_WIN32 |
bellard | 3db38e8 | 2004-07-14 17:19:55 +0000 | [diff] [blame] | 167 | LIBS+=-lwinmm -lws2_32 -liphlpapi |
bellard | 67b915a | 2004-03-31 23:37:16 +0000 | [diff] [blame] | 168 | endif |
bellard | ec530c8 | 2006-04-25 22:36:06 +0000 | [diff] [blame] | 169 | ifdef CONFIG_SOLARIS |
| 170 | LIBS+=-lsocket -lnsl -lresolv |
ths | 0475a5c | 2007-04-01 18:54:44 +0000 | [diff] [blame] | 171 | ifdef NEEDS_LIBSUNMATH |
| 172 | LIBS+=-lsunmath |
| 173 | LDFLAGS+=-L/opt/SUNWspro/prod/lib -R/opt/SUNWspro/prod/lib |
| 174 | OP_CFLAGS+=-I/opt/SUNWspro/prod/include/cc |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 175 | CFLAGS+=-I/opt/SUNWspro/prod/include/cc |
ths | 0475a5c | 2007-04-01 18:54:44 +0000 | [diff] [blame] | 176 | endif |
bellard | ec530c8 | 2006-04-25 22:36:06 +0000 | [diff] [blame] | 177 | endif |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 178 | |
aliguori | 7ba1e61 | 2008-11-05 16:04:33 +0000 | [diff] [blame] | 179 | kvm.o: CFLAGS+=$(KVM_CFLAGS) |
| 180 | kvm-all.o: CFLAGS+=$(KVM_CFLAGS) |
| 181 | |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 182 | all: $(PROGS) |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 183 | |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 184 | ######################################################### |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 185 | # cpu emulator library |
bellard | 57fec1f | 2008-02-01 10:50:11 +0000 | [diff] [blame] | 186 | LIBOBJS=exec.o kqemu.o translate-all.o cpu-exec.o\ |
blueswir1 | cf2be98 | 2008-03-21 18:03:09 +0000 | [diff] [blame] | 187 | translate.o host-utils.o |
bellard | 57fec1f | 2008-02-01 10:50:11 +0000 | [diff] [blame] | 188 | # TCG code generator |
aurel32 | 49516bc | 2008-12-07 18:15:45 +0000 | [diff] [blame] | 189 | LIBOBJS+= tcg/tcg.o tcg/tcg-runtime.o |
bellard | 57fec1f | 2008-02-01 10:50:11 +0000 | [diff] [blame] | 190 | CPPFLAGS+=-I$(SRC_PATH)/tcg -I$(SRC_PATH)/tcg/$(ARCH) |
blueswir1 | 8289b27 | 2008-02-27 17:53:27 +0000 | [diff] [blame] | 191 | ifeq ($(ARCH),sparc64) |
| 192 | CPPFLAGS+=-I$(SRC_PATH)/tcg/sparc |
| 193 | endif |
bellard | 158142c | 2005-03-13 16:54:06 +0000 | [diff] [blame] | 194 | ifdef CONFIG_SOFTFLOAT |
| 195 | LIBOBJS+=fpu/softfloat.o |
| 196 | else |
| 197 | LIBOBJS+=fpu/softfloat-native.o |
| 198 | endif |
ths | 6f30fa8 | 2007-01-05 01:00:47 +0000 | [diff] [blame] | 199 | CPPFLAGS+=-I$(SRC_PATH)/fpu |
bellard | 728c9fd | 2004-01-05 00:08:14 +0000 | [diff] [blame] | 200 | LIBOBJS+= op_helper.o helper.o |
bellard | e95c8d5 | 2004-09-30 22:22:08 +0000 | [diff] [blame] | 201 | |
bellard | b7bcbe9 | 2005-02-22 19:27:29 +0000 | [diff] [blame] | 202 | ifeq ($(TARGET_BASE_ARCH), arm) |
bellard | eaa728e | 2008-05-28 12:51:20 +0000 | [diff] [blame] | 203 | LIBOBJS+= neon_helper.o iwmmxt_helper.o |
pbrook | e6e5906 | 2006-10-22 00:18:54 +0000 | [diff] [blame] | 204 | endif |
| 205 | |
j_mayer | cf6c1b1 | 2007-04-05 20:46:02 +0000 | [diff] [blame] | 206 | ifeq ($(TARGET_BASE_ARCH), alpha) |
bellard | eaa728e | 2008-05-28 12:51:20 +0000 | [diff] [blame] | 207 | LIBOBJS+= alpha_palcode.o |
j_mayer | cf6c1b1 | 2007-04-05 20:46:02 +0000 | [diff] [blame] | 208 | endif |
| 209 | |
ths | e7daa60 | 2007-10-08 13:38:27 +0000 | [diff] [blame] | 210 | ifeq ($(TARGET_BASE_ARCH), cris) |
ths | e7daa60 | 2007-10-08 13:38:27 +0000 | [diff] [blame] | 211 | LIBOBJS+= cris-dis.o |
| 212 | |
| 213 | ifndef CONFIG_USER_ONLY |
| 214 | LIBOBJS+= mmu.o |
| 215 | endif |
| 216 | endif |
| 217 | |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 218 | # NOTE: the disassembler code is only needed for debugging |
ths | 5fafdf2 | 2007-09-16 21:08:06 +0000 | [diff] [blame] | 219 | LIBOBJS+=disas.o |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 220 | ifeq ($(findstring i386, $(TARGET_ARCH) $(ARCH)),i386) |
bellard | bc51c5c | 2004-03-17 23:46:04 +0000 | [diff] [blame] | 221 | USE_I386_DIS=y |
| 222 | endif |
bellard | 0b0babc | 2005-01-03 23:38:40 +0000 | [diff] [blame] | 223 | ifeq ($(findstring x86_64, $(TARGET_ARCH) $(ARCH)),x86_64) |
bellard | bc51c5c | 2004-03-17 23:46:04 +0000 | [diff] [blame] | 224 | USE_I386_DIS=y |
| 225 | endif |
| 226 | ifdef USE_I386_DIS |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 227 | LIBOBJS+=i386-dis.o |
| 228 | endif |
| 229 | ifeq ($(findstring alpha, $(TARGET_ARCH) $(ARCH)),alpha) |
| 230 | LIBOBJS+=alpha-dis.o |
| 231 | endif |
bellard | a245862 | 2005-07-23 22:39:53 +0000 | [diff] [blame] | 232 | ifeq ($(findstring ppc, $(TARGET_BASE_ARCH) $(ARCH)),ppc) |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 233 | LIBOBJS+=ppc-dis.o |
| 234 | endif |
ths | fbe4f65 | 2007-04-01 11:16:48 +0000 | [diff] [blame] | 235 | ifeq ($(findstring mips, $(TARGET_BASE_ARCH) $(ARCH)),mips) |
bellard | 6af0bf9 | 2005-07-02 14:58:51 +0000 | [diff] [blame] | 236 | LIBOBJS+=mips-dis.o |
| 237 | endif |
bellard | 64b3ab2 | 2005-01-30 22:43:42 +0000 | [diff] [blame] | 238 | ifeq ($(findstring sparc, $(TARGET_BASE_ARCH) $(ARCH)),sparc) |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 239 | LIBOBJS+=sparc-dis.o |
| 240 | endif |
| 241 | ifeq ($(findstring arm, $(TARGET_ARCH) $(ARCH)),arm) |
| 242 | LIBOBJS+=arm-dis.o |
| 243 | endif |
bellard | 48024e4 | 2005-11-06 16:52:11 +0000 | [diff] [blame] | 244 | ifeq ($(findstring m68k, $(TARGET_ARCH) $(ARCH)),m68k) |
| 245 | LIBOBJS+=m68k-dis.o |
| 246 | endif |
bellard | fdf9b3e | 2006-04-27 21:07:38 +0000 | [diff] [blame] | 247 | ifeq ($(findstring sh4, $(TARGET_ARCH) $(ARCH)),sh4) |
| 248 | LIBOBJS+=sh4-dis.o |
| 249 | endif |
aurel32 | f54b3f9 | 2008-04-12 20:14:54 +0000 | [diff] [blame] | 250 | ifeq ($(findstring hppa, $(TARGET_BASE_ARCH) $(ARCH)),hppa) |
| 251 | LIBOBJS+=hppa-dis.o |
| 252 | endif |
ths | 8f860bb | 2007-07-31 23:44:21 +0000 | [diff] [blame] | 253 | ifeq ($(findstring s390, $(TARGET_ARCH) $(ARCH)),s390) |
| 254 | LIBOBJS+=s390-dis.o |
| 255 | endif |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 256 | |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 257 | # libqemu |
| 258 | |
| 259 | libqemu.a: $(LIBOBJS) |
| 260 | rm -f $@ |
| 261 | $(AR) rcs $@ $(LIBOBJS) |
| 262 | |
aurel32 | 86e840e | 2008-12-07 15:21:23 +0000 | [diff] [blame] | 263 | translate.o: translate.c cpu.h |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 264 | |
aurel32 | 86e840e | 2008-12-07 15:21:23 +0000 | [diff] [blame] | 265 | translate-all.o: translate-all.c cpu.h |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 266 | |
aurel32 | 86e840e | 2008-12-07 15:21:23 +0000 | [diff] [blame] | 267 | tcg/tcg.o: cpu.h |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 268 | |
aurel32 | 8dd3dca | 2008-05-04 13:11:44 +0000 | [diff] [blame] | 269 | machine.o: machine.c |
| 270 | $(CC) $(OP_CFLAGS) $(CPPFLAGS) -c -o $@ $< |
| 271 | |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 272 | # HELPER_CFLAGS is used for all the code compiled with static register |
| 273 | # variables |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 274 | op_helper.o: op_helper.c |
bellard | eaa728e | 2008-05-28 12:51:20 +0000 | [diff] [blame] | 275 | $(CC) $(HELPER_CFLAGS) $(CPPFLAGS) $(CFLAGS) $(I386_CFLAGS) -c -o $@ $< |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 276 | |
aurel32 | 86e840e | 2008-12-07 15:21:23 +0000 | [diff] [blame] | 277 | cpu-exec.o: cpu-exec.c |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 278 | $(CC) $(HELPER_CFLAGS) $(CPPFLAGS) $(CFLAGS) -c -o $@ $< |
| 279 | |
| 280 | ######################################################### |
| 281 | # Linux user emulator target |
| 282 | |
| 283 | ifdef CONFIG_LINUX_USER |
| 284 | |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 285 | ifndef TARGET_ABI_DIR |
| 286 | TARGET_ABI_DIR=$(TARGET_ARCH) |
| 287 | endif |
aurel32 | 3ebdd11 | 2008-04-09 06:53:01 +0000 | [diff] [blame] | 288 | VPATH+=:$(SRC_PATH)/linux-user:$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR) |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 289 | CPPFLAGS+=-I$(SRC_PATH)/linux-user -I$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR) |
| 290 | |
| 291 | ifdef CONFIG_STATIC |
| 292 | LDFLAGS+=-static |
| 293 | endif |
| 294 | |
| 295 | ifeq ($(ARCH),i386) |
| 296 | ifdef TARGET_GPROF |
| 297 | USE_I386_LD=y |
| 298 | endif |
| 299 | ifdef CONFIG_STATIC |
| 300 | USE_I386_LD=y |
| 301 | endif |
| 302 | ifdef USE_I386_LD |
| 303 | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld |
| 304 | else |
| 305 | # WARNING: this LDFLAGS is _very_ tricky : qemu is an ELF shared object |
| 306 | # that the kernel ELF loader considers as an executable. I think this |
| 307 | # is the simplest way to make it self virtualizable! |
| 308 | LDFLAGS+=-Wl,-shared |
| 309 | endif |
| 310 | endif |
| 311 | |
| 312 | ifeq ($(ARCH),x86_64) |
| 313 | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld |
| 314 | endif |
| 315 | |
| 316 | ifeq ($(ARCH),ppc) |
| 317 | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld |
| 318 | endif |
| 319 | |
malc | 810260a | 2008-07-23 19:17:46 +0000 | [diff] [blame] | 320 | ifeq ($(ARCH),ppc64) |
| 321 | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld |
| 322 | endif |
| 323 | |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 324 | ifeq ($(ARCH),s390) |
| 325 | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld |
| 326 | endif |
| 327 | |
| 328 | ifeq ($(ARCH),sparc) |
| 329 | # -static is used to avoid g1/g3 usage by the dynamic linker |
| 330 | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld -static |
| 331 | endif |
| 332 | |
| 333 | ifeq ($(ARCH),sparc64) |
| 334 | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld |
| 335 | endif |
| 336 | |
| 337 | ifeq ($(ARCH),alpha) |
| 338 | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld |
| 339 | endif |
| 340 | |
| 341 | ifeq ($(ARCH),ia64) |
| 342 | LDFLAGS+=-Wl,-G0 -Wl,-T,$(SRC_PATH)/$(ARCH).ld |
| 343 | endif |
| 344 | |
| 345 | ifeq ($(ARCH),arm) |
| 346 | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld |
| 347 | endif |
| 348 | |
| 349 | ifeq ($(ARCH),m68k) |
| 350 | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld |
| 351 | endif |
| 352 | |
| 353 | ifeq ($(ARCH),mips) |
| 354 | ifeq ($(WORDS_BIGENDIAN),yes) |
| 355 | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld |
| 356 | else |
| 357 | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH)el.ld |
| 358 | endif |
| 359 | endif |
| 360 | |
| 361 | ifeq ($(ARCH),mips64) |
| 362 | ifeq ($(WORDS_BIGENDIAN),yes) |
| 363 | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld |
| 364 | else |
| 365 | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH)el.ld |
| 366 | endif |
| 367 | endif |
| 368 | |
aurel32 | 6d946cd | 2008-11-06 16:15:18 +0000 | [diff] [blame] | 369 | # profiling code |
| 370 | ifdef TARGET_GPROF |
| 371 | LDFLAGS+=-p |
| 372 | CFLAGS+=-p |
| 373 | endif |
| 374 | |
pbrook | 17e2377 | 2008-06-09 13:47:45 +0000 | [diff] [blame] | 375 | OBJS= main.o syscall.o strace.o mmap.o signal.o path.o thunk.o \ |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 376 | elfload.o linuxload.o uaccess.o |
| 377 | LIBS+= $(AIOLIBS) |
| 378 | ifdef TARGET_HAS_BFLT |
| 379 | OBJS+= flatload.o |
| 380 | endif |
| 381 | ifdef TARGET_HAS_ELFLOAD32 |
| 382 | OBJS+= elfload32.o |
| 383 | elfload32.o: elfload.c |
| 384 | endif |
| 385 | |
| 386 | ifeq ($(TARGET_ARCH), i386) |
| 387 | OBJS+= vm86.o |
| 388 | endif |
| 389 | ifeq ($(TARGET_ARCH), arm) |
| 390 | OBJS+=nwfpe/fpa11.o nwfpe/fpa11_cpdo.o \ |
| 391 | nwfpe/fpa11_cpdt.o nwfpe/fpa11_cprt.o nwfpe/fpopcode.o nwfpe/single_cpdo.o \ |
| 392 | nwfpe/double_cpdo.o nwfpe/extended_cpdo.o arm-semi.o |
| 393 | endif |
| 394 | ifeq ($(TARGET_ARCH), m68k) |
| 395 | OBJS+= m68k-sim.o m68k-semi.o |
| 396 | endif |
| 397 | |
bellard | 1fddef4 | 2005-04-17 19:16:13 +0000 | [diff] [blame] | 398 | ifdef CONFIG_GDBSTUB |
pbrook | 56aebc8 | 2008-10-11 17:55:29 +0000 | [diff] [blame] | 399 | OBJS+=gdbstub.o gdbstub-xml.o |
bellard | 1fddef4 | 2005-04-17 19:16:13 +0000 | [diff] [blame] | 400 | endif |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 401 | |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 402 | OBJS+= libqemu.a |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 403 | |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 404 | # Note: this is a workaround. The real fix is to avoid compiling |
| 405 | # cpu_signal_handler() in cpu-exec.c. |
| 406 | signal.o: signal.c |
| 407 | $(CC) $(HELPER_CFLAGS) $(CPPFLAGS) $(CFLAGS) -c -o $@ $< |
| 408 | |
pbrook | cec7d0b | 2008-05-28 16:44:57 +0000 | [diff] [blame] | 409 | $(QEMU_PROG): $(OBJS) ../libqemu_user.a |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 410 | $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 411 | ifeq ($(ARCH),alpha) |
| 412 | # Mark as 32 bit binary, i. e. it will be mapped into the low 31 bit of |
| 413 | # the address space (31 bit so sign extending doesn't matter) |
| 414 | echo -ne '\001\000\000\000' | dd of=qemu bs=1 seek=48 count=4 conv=notrunc |
| 415 | endif |
| 416 | |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 417 | endif #CONFIG_LINUX_USER |
| 418 | |
| 419 | ######################################################### |
| 420 | # Darwin user emulator target |
| 421 | |
| 422 | ifdef CONFIG_DARWIN_USER |
| 423 | |
| 424 | VPATH+=:$(SRC_PATH)/darwin-user |
| 425 | CPPFLAGS+=-I$(SRC_PATH)/darwin-user -I$(SRC_PATH)/darwin-user/$(TARGET_ARCH) |
| 426 | |
| 427 | # Leave some space for the regular program loading zone |
| 428 | LDFLAGS+=-Wl,-segaddr,__STD_PROG_ZONE,0x1000 -image_base 0x0e000000 |
| 429 | |
| 430 | LIBS+=-lmx |
| 431 | |
pbrook | 17e2377 | 2008-06-09 13:47:45 +0000 | [diff] [blame] | 432 | OBJS= main.o commpage.o machload.o mmap.o signal.o syscall.o thunk.o |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 433 | |
| 434 | OBJS+= libqemu.a |
| 435 | |
| 436 | ifdef CONFIG_GDBSTUB |
pbrook | 56aebc8 | 2008-10-11 17:55:29 +0000 | [diff] [blame] | 437 | OBJS+=gdbstub.o gdbstub-xml.o |
ths | 223d467 | 2007-12-15 17:28:36 +0000 | [diff] [blame] | 438 | endif |
bellard | a541f29 | 2004-04-12 20:39:29 +0000 | [diff] [blame] | 439 | |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 440 | # Note: this is a workaround. The real fix is to avoid compiling |
| 441 | # cpu_signal_handler() in cpu-exec.c. |
| 442 | signal.o: signal.c |
| 443 | $(CC) $(HELPER_CFLAGS) $(CPPFLAGS) $(CFLAGS) -c -o $@ $< |
| 444 | |
| 445 | $(QEMU_PROG): $(OBJS) |
| 446 | $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) |
| 447 | |
| 448 | endif #CONFIG_DARWIN_USER |
| 449 | |
| 450 | ######################################################### |
blueswir1 | 8477850 | 2008-10-26 20:33:16 +0000 | [diff] [blame] | 451 | # BSD user emulator target |
| 452 | |
| 453 | ifdef CONFIG_BSD_USER |
| 454 | |
| 455 | VPATH+=:$(SRC_PATH)/bsd-user |
| 456 | CPPFLAGS+=-I$(SRC_PATH)/bsd-user -I$(SRC_PATH)/bsd-user/$(TARGET_ARCH) |
| 457 | |
| 458 | ifdef CONFIG_STATIC |
| 459 | LDFLAGS+=-static |
| 460 | endif |
| 461 | |
| 462 | ifeq ($(ARCH),i386) |
| 463 | ifdef TARGET_GPROF |
| 464 | USE_I386_LD=y |
| 465 | endif |
| 466 | ifdef CONFIG_STATIC |
| 467 | USE_I386_LD=y |
| 468 | endif |
| 469 | ifdef USE_I386_LD |
| 470 | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld |
| 471 | else |
| 472 | # WARNING: this LDFLAGS is _very_ tricky : qemu is an ELF shared object |
| 473 | # that the kernel ELF loader considers as an executable. I think this |
| 474 | # is the simplest way to make it self virtualizable! |
| 475 | LDFLAGS+=-Wl,-shared |
| 476 | endif |
| 477 | endif |
| 478 | |
| 479 | ifeq ($(ARCH),x86_64) |
| 480 | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld |
| 481 | endif |
| 482 | |
| 483 | ifeq ($(ARCH),ppc) |
| 484 | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld |
| 485 | endif |
| 486 | |
| 487 | ifeq ($(ARCH),ppc64) |
| 488 | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld |
| 489 | endif |
| 490 | |
| 491 | ifeq ($(ARCH),s390) |
| 492 | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld |
| 493 | endif |
| 494 | |
| 495 | ifeq ($(ARCH),sparc) |
| 496 | # -static is used to avoid g1/g3 usage by the dynamic linker |
| 497 | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld -static |
| 498 | endif |
| 499 | |
| 500 | ifeq ($(ARCH),sparc64) |
| 501 | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld |
| 502 | endif |
| 503 | |
| 504 | ifeq ($(ARCH),alpha) |
| 505 | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld |
| 506 | endif |
| 507 | |
| 508 | ifeq ($(ARCH),ia64) |
| 509 | LDFLAGS+=-Wl,-G0 -Wl,-T,$(SRC_PATH)/$(ARCH).ld |
| 510 | endif |
| 511 | |
| 512 | ifeq ($(ARCH),arm) |
| 513 | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld |
| 514 | endif |
| 515 | |
| 516 | ifeq ($(ARCH),m68k) |
| 517 | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld |
| 518 | endif |
| 519 | |
| 520 | ifeq ($(ARCH),mips) |
| 521 | ifeq ($(WORDS_BIGENDIAN),yes) |
| 522 | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld |
| 523 | else |
| 524 | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH)el.ld |
| 525 | endif |
| 526 | endif |
| 527 | |
| 528 | ifeq ($(ARCH),mips64) |
| 529 | ifeq ($(WORDS_BIGENDIAN),yes) |
| 530 | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH).ld |
| 531 | else |
| 532 | LDFLAGS+=-Wl,-T,$(SRC_PATH)/$(ARCH)el.ld |
| 533 | endif |
| 534 | endif |
| 535 | |
| 536 | OBJS= main.o bsdload.o elfload.o mmap.o path.o signal.o strace.o syscall.o |
| 537 | OBJS+= uaccess.o |
| 538 | |
| 539 | OBJS+= libqemu.a |
| 540 | |
| 541 | ifdef CONFIG_GDBSTUB |
| 542 | OBJS+=gdbstub.o |
| 543 | endif |
| 544 | |
| 545 | # Note: this is a workaround. The real fix is to avoid compiling |
| 546 | # cpu_signal_handler() in cpu-exec.c. |
| 547 | signal.o: signal.c |
| 548 | $(CC) $(HELPER_CFLAGS) $(CPPFLAGS) $(CFLAGS) -c -o $@ $< |
| 549 | |
| 550 | $(QEMU_PROG): $(OBJS) ../libqemu_user.a |
| 551 | $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) |
| 552 | |
| 553 | endif #CONFIG_BSD_USER |
| 554 | |
| 555 | ######################################################### |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 556 | # System emulator target |
| 557 | ifndef CONFIG_USER_ONLY |
| 558 | |
aliguori | 559b90f | 2008-11-11 21:20:14 +0000 | [diff] [blame] | 559 | OBJS=vl.o osdep.o monitor.o pci.o loader.o isa_mmio.o machine.o |
| 560 | OBJS+=fw_cfg.o |
aliguori | 7ba1e61 | 2008-11-05 16:04:33 +0000 | [diff] [blame] | 561 | ifdef CONFIG_KVM |
| 562 | OBJS+=kvm.o kvm-all.o |
| 563 | endif |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 564 | ifdef CONFIG_WIN32 |
| 565 | OBJS+=block-raw-win32.o |
| 566 | else |
aliguori | 3c529d9 | 2008-12-12 16:41:40 +0000 | [diff] [blame] | 567 | ifdef CONFIG_AIO |
| 568 | OBJS+=posix-aio-compat.o |
| 569 | endif |
aliguori | 559b90f | 2008-11-11 21:20:14 +0000 | [diff] [blame] | 570 | OBJS+=block-raw-posix.o |
aliguori | a3392f9 | 2008-09-11 18:00:19 +0000 | [diff] [blame] | 571 | endif |
| 572 | |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 573 | LIBS+=-lz |
bellard | 1d14ffa | 2005-10-30 18:58:22 +0000 | [diff] [blame] | 574 | ifdef CONFIG_ALSA |
bellard | 1d14ffa | 2005-10-30 18:58:22 +0000 | [diff] [blame] | 575 | LIBS += -lasound |
| 576 | endif |
balrog | ca9cc28 | 2008-01-14 04:24:29 +0000 | [diff] [blame] | 577 | ifdef CONFIG_ESD |
| 578 | LIBS += -lesd |
| 579 | endif |
malc | b8e59f1 | 2008-07-02 21:03:08 +0000 | [diff] [blame] | 580 | ifdef CONFIG_PA |
| 581 | LIBS += -lpulse-simple |
| 582 | endif |
bellard | 1d14ffa | 2005-10-30 18:58:22 +0000 | [diff] [blame] | 583 | ifdef CONFIG_DSOUND |
bellard | 1d14ffa | 2005-10-30 18:58:22 +0000 | [diff] [blame] | 584 | LIBS += -lole32 -ldxguid |
| 585 | endif |
bellard | 102a52e | 2004-11-14 19:57:29 +0000 | [diff] [blame] | 586 | ifdef CONFIG_FMOD |
bellard | 102a52e | 2004-11-14 19:57:29 +0000 | [diff] [blame] | 587 | LIBS += $(CONFIG_FMOD_LIB) |
bellard | 85571bc | 2004-11-07 18:04:02 +0000 | [diff] [blame] | 588 | endif |
blueswir1 | 2f6a1ab | 2008-08-21 18:00:53 +0000 | [diff] [blame] | 589 | ifdef CONFIG_OSS |
| 590 | LIBS += $(CONFIG_OSS_LIB) |
| 591 | endif |
bellard | 4fb240a | 2007-11-07 19:24:02 +0000 | [diff] [blame] | 592 | |
| 593 | SOUND_HW = sb16.o es1370.o |
balrog | ca9cc28 | 2008-01-14 04:24:29 +0000 | [diff] [blame] | 594 | ifdef CONFIG_AC97 |
| 595 | SOUND_HW += ac97.o |
| 596 | endif |
bellard | 1d14ffa | 2005-10-30 18:58:22 +0000 | [diff] [blame] | 597 | ifdef CONFIG_ADLIB |
| 598 | SOUND_HW += fmopl.o adlib.o |
malc | c40e866 | 2008-12-11 00:14:25 +0000 | [diff] [blame] | 599 | adlib.o fmopl.o: CFLAGS := ${CFLAGS} -DBUILD_Y8950=0 |
bellard | 1d14ffa | 2005-10-30 18:58:22 +0000 | [diff] [blame] | 600 | endif |
balrog | 423d65f | 2008-01-14 22:09:11 +0000 | [diff] [blame] | 601 | ifdef CONFIG_GUS |
| 602 | SOUND_HW += gus.o gusemu_hal.o gusemu_mixer.o |
| 603 | endif |
malc | cc53d26 | 2008-06-13 10:48:22 +0000 | [diff] [blame] | 604 | ifdef CONFIG_CS4231A |
| 605 | SOUND_HW += cs4231a.o |
| 606 | endif |
bellard | 85571bc | 2004-11-07 18:04:02 +0000 | [diff] [blame] | 607 | |
ths | 8d5d2d4 | 2007-08-25 01:37:51 +0000 | [diff] [blame] | 608 | ifdef CONFIG_VNC_TLS |
| 609 | CPPFLAGS += $(CONFIG_VNC_TLS_CFLAGS) |
| 610 | LIBS += $(CONFIG_VNC_TLS_LIBS) |
| 611 | endif |
| 612 | |
balrog | fb599c9 | 2008-09-28 23:49:55 +0000 | [diff] [blame] | 613 | ifdef CONFIG_BLUEZ |
| 614 | LIBS += $(CONFIG_BLUEZ_LIBS) |
| 615 | endif |
| 616 | |
pbrook | 2e5d83b | 2006-05-25 23:58:51 +0000 | [diff] [blame] | 617 | # SCSI layer |
blueswir1 | 8b17de8 | 2008-03-02 08:48:47 +0000 | [diff] [blame] | 618 | OBJS+= lsi53c895a.o esp.o |
pbrook | 2e5d83b | 2006-05-25 23:58:51 +0000 | [diff] [blame] | 619 | |
bellard | a594cfb | 2005-11-06 16:13:29 +0000 | [diff] [blame] | 620 | # USB layer |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 621 | OBJS+= usb-ohci.o |
bellard | a594cfb | 2005-11-06 16:13:29 +0000 | [diff] [blame] | 622 | |
ths | 663e8e5 | 2007-04-02 12:35:34 +0000 | [diff] [blame] | 623 | # EEPROM emulation |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 624 | OBJS += eeprom93xx.o |
ths | 663e8e5 | 2007-04-02 12:35:34 +0000 | [diff] [blame] | 625 | |
pbrook | a41b2ff | 2006-02-05 04:14:41 +0000 | [diff] [blame] | 626 | # PCI network cards |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 627 | OBJS += eepro100.o |
| 628 | OBJS += ne2000.o |
| 629 | OBJS += pcnet.o |
| 630 | OBJS += rtl8139.o |
balrog | 7c23b89 | 2008-02-03 02:20:18 +0000 | [diff] [blame] | 631 | OBJS += e1000.o |
pbrook | a41b2ff | 2006-02-05 04:14:41 +0000 | [diff] [blame] | 632 | |
bellard | 0b0babc | 2005-01-03 23:38:40 +0000 | [diff] [blame] | 633 | ifeq ($(TARGET_BASE_ARCH), i386) |
bellard | a541f29 | 2004-04-12 20:39:29 +0000 | [diff] [blame] | 634 | # Hardware support |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 635 | OBJS+= ide.o pckbd.o ps2.o vga.o $(SOUND_HW) dma.o |
| 636 | OBJS+= fdc.o mc146818rtc.o serial.o i8259.o i8254.o pcspk.o pc.o |
| 637 | OBJS+= cirrus_vga.o apic.o parallel.o acpi.o piix_pci.o |
| 638 | OBJS+= usb-uhci.o vmmouse.o vmport.o vmware_vga.o |
aliguori | 967f97f | 2008-12-04 19:38:57 +0000 | [diff] [blame] | 639 | # virtio support |
aliguori | bd32208 | 2008-12-04 20:33:06 +0000 | [diff] [blame] | 640 | OBJS+= virtio.o virtio-blk.o virtio-balloon.o |
balrog | b00052e | 2007-04-30 02:22:06 +0000 | [diff] [blame] | 641 | CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE |
bellard | 67b915a | 2004-03-31 23:37:16 +0000 | [diff] [blame] | 642 | endif |
bellard | a245862 | 2005-07-23 22:39:53 +0000 | [diff] [blame] | 643 | ifeq ($(TARGET_BASE_ARCH), ppc) |
aurel32 | 70ad3de | 2008-12-14 17:30:18 +0000 | [diff] [blame] | 644 | CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE |
j_mayer | 3cbee15 | 2007-10-28 23:42:18 +0000 | [diff] [blame] | 645 | # shared objects |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 646 | OBJS+= ppc.o ide.o vga.o $(SOUND_HW) dma.o openpic.o |
j_mayer | 3cbee15 | 2007-10-28 23:42:18 +0000 | [diff] [blame] | 647 | # PREP target |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 648 | OBJS+= pckbd.o ps2.o serial.o i8259.o i8254.o fdc.o m48t59.o mc146818rtc.o |
| 649 | OBJS+= prep_pci.o ppc_prep.o |
j_mayer | 3cbee15 | 2007-10-28 23:42:18 +0000 | [diff] [blame] | 650 | # Mac shared devices |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 651 | OBJS+= macio.o cuda.o adb.o mac_nvram.o mac_dbdma.o |
j_mayer | 3cbee15 | 2007-10-28 23:42:18 +0000 | [diff] [blame] | 652 | # OldWorld PowerMac |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 653 | OBJS+= heathrow_pic.o grackle_pci.o ppc_oldworld.o |
j_mayer | 3cbee15 | 2007-10-28 23:42:18 +0000 | [diff] [blame] | 654 | # NewWorld PowerMac |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 655 | OBJS+= unin_pci.o ppc_chrp.o |
j_mayer | 3cbee15 | 2007-10-28 23:42:18 +0000 | [diff] [blame] | 656 | # PowerPC 4xx boards |
aurel32 | 825bb58 | 2008-12-02 23:53:50 +0000 | [diff] [blame] | 657 | OBJS+= pflash_cfi02.o ppc4xx_devs.o ppc4xx_pci.o ppc405_uc.o ppc405_boards.o |
aurel32 | f652e6a | 2008-12-16 10:43:48 +0000 | [diff] [blame^] | 658 | ifdef FDT_LIBS |
| 659 | OBJS+= device_tree.o |
| 660 | LIBS+= $(FDT_LIBS) |
| 661 | endif |
aliguori | 967f97f | 2008-12-04 19:38:57 +0000 | [diff] [blame] | 662 | # virtio support |
aliguori | bd32208 | 2008-12-04 20:33:06 +0000 | [diff] [blame] | 663 | OBJS+= virtio.o virtio-blk.o virtio-balloon.o |
bellard | a541f29 | 2004-04-12 20:39:29 +0000 | [diff] [blame] | 664 | endif |
ths | fbe4f65 | 2007-04-01 11:16:48 +0000 | [diff] [blame] | 665 | ifeq ($(TARGET_BASE_ARCH), mips) |
aurel32 | c171148 | 2008-04-08 19:51:06 +0000 | [diff] [blame] | 666 | OBJS+= mips_r4k.o mips_jazz.o mips_malta.o mips_mipssim.o |
aurel32 | 4ce7ff6 | 2008-04-07 19:47:14 +0000 | [diff] [blame] | 667 | OBJS+= mips_timer.o mips_int.o dma.o vga.o serial.o i8254.o i8259.o rc4030.o |
| 668 | OBJS+= g364fb.o jazz_led.o |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 669 | OBJS+= ide.o gt64xxx.o pckbd.o ps2.o fdc.o mc146818rtc.o usb-uhci.o acpi.o ds1225y.o |
aurel32 | 4ce7ff6 | 2008-04-07 19:47:14 +0000 | [diff] [blame] | 670 | OBJS+= piix_pci.o parallel.o cirrus_vga.o pcspk.o $(SOUND_HW) |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 671 | OBJS+= mipsnet.o |
| 672 | OBJS+= pflash_cfi01.o |
aurel32 | 4ce7ff6 | 2008-04-07 19:47:14 +0000 | [diff] [blame] | 673 | CPPFLAGS += -DHAS_AUDIO -DHAS_AUDIO_CHOICE |
bellard | 6af0bf9 | 2005-07-02 14:58:51 +0000 | [diff] [blame] | 674 | endif |
ths | e7daa60 | 2007-10-08 13:38:27 +0000 | [diff] [blame] | 675 | ifeq ($(TARGET_BASE_ARCH), cris) |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 676 | OBJS+= etraxfs.o |
edgar_igl | 4831801 | 2008-05-11 15:07:19 +0000 | [diff] [blame] | 677 | OBJS+= etraxfs_dma.o |
edgar_igl | e62b5b1 | 2008-03-14 01:04:24 +0000 | [diff] [blame] | 678 | OBJS+= etraxfs_pic.o |
edgar_igl | 4831801 | 2008-05-11 15:07:19 +0000 | [diff] [blame] | 679 | OBJS+= etraxfs_eth.o |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 680 | OBJS+= etraxfs_timer.o |
| 681 | OBJS+= etraxfs_ser.o |
edgar_igl | e62b5b1 | 2008-03-14 01:04:24 +0000 | [diff] [blame] | 682 | |
| 683 | OBJS+= ptimer.o |
edgar_igl | 4831801 | 2008-05-11 15:07:19 +0000 | [diff] [blame] | 684 | OBJS+= pflash_cfi02.o |
ths | e7daa60 | 2007-10-08 13:38:27 +0000 | [diff] [blame] | 685 | endif |
bellard | 64b3ab2 | 2005-01-30 22:43:42 +0000 | [diff] [blame] | 686 | ifeq ($(TARGET_BASE_ARCH), sparc) |
bellard | 3475187 | 2005-07-02 14:31:34 +0000 | [diff] [blame] | 687 | ifeq ($(TARGET_ARCH), sparc64) |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 688 | OBJS+= sun4u.o ide.o pckbd.o ps2.o vga.o apb_pci.o |
| 689 | OBJS+= fdc.o mc146818rtc.o serial.o m48t59.o |
| 690 | OBJS+= cirrus_vga.o parallel.o ptimer.o |
bellard | 3475187 | 2005-07-02 14:31:34 +0000 | [diff] [blame] | 691 | else |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 692 | OBJS+= sun4m.o tcx.o pcnet.o iommu.o m48t59.o slavio_intctl.o |
blueswir1 | 8b17de8 | 2008-03-02 08:48:47 +0000 | [diff] [blame] | 693 | OBJS+= slavio_timer.o slavio_serial.o slavio_misc.o fdc.o sparc32_dma.o |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 694 | OBJS+= cs4231.o ptimer.o eccmemctl.o sbi.o sun4c_intctl.o |
bellard | 3475187 | 2005-07-02 14:31:34 +0000 | [diff] [blame] | 695 | endif |
bellard | e95c8d5 | 2004-09-30 22:22:08 +0000 | [diff] [blame] | 696 | endif |
bellard | b5ff1b3 | 2005-11-26 10:38:39 +0000 | [diff] [blame] | 697 | ifeq ($(TARGET_BASE_ARCH), arm) |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 698 | OBJS+= integratorcp.o versatilepb.o ps2.o smc91c111.o arm_pic.o arm_timer.o |
| 699 | OBJS+= arm_boot.o pl011.o pl031.o pl050.o pl080.o pl110.o pl181.o pl190.o |
| 700 | OBJS+= versatile_pci.o ptimer.o |
| 701 | OBJS+= realview_gic.o realview.o arm_sysctl.o mpcore.o |
| 702 | OBJS+= armv7m.o armv7m_nvic.o stellaris.o pl022.o stellaris_enet.o |
| 703 | OBJS+= pl061.o |
| 704 | OBJS+= arm-semi.o |
| 705 | OBJS+= pxa2xx.o pxa2xx_pic.o pxa2xx_gpio.o pxa2xx_timer.o pxa2xx_dma.o |
| 706 | OBJS+= pxa2xx_lcd.o pxa2xx_mmci.o pxa2xx_pcmcia.o pxa2xx_keypad.o |
| 707 | OBJS+= pflash_cfi01.o gumstix.o |
balrog | 88d2c95 | 2008-06-09 00:03:13 +0000 | [diff] [blame] | 708 | OBJS+= zaurus.o ide.o serial.o nand.o ecc.o spitz.o tosa.o tc6393xb.o |
balrog | b4e3104 | 2008-03-06 21:07:38 +0000 | [diff] [blame] | 709 | OBJS+= omap1.o omap_lcdc.o omap_dma.o omap_clk.o omap_mmc.o omap_i2c.o |
balrog | afbb519 | 2008-07-21 20:40:22 +0000 | [diff] [blame] | 710 | OBJS+= omap2.o omap_dss.o soc_dma.o |
balrog | 997641a | 2008-12-15 02:05:00 +0000 | [diff] [blame] | 711 | OBJS+= omap_sx1.o palm.o tsc210x.o |
balrog | 942ac05 | 2008-04-22 03:15:10 +0000 | [diff] [blame] | 712 | OBJS+= nseries.o blizzard.o onenand.o vga.o cbus.o tusb6010.o usb-musb.o |
balrog | 58a26b4 | 2008-09-28 23:34:13 +0000 | [diff] [blame] | 713 | OBJS+= tsc2005.o bt-hci-csr.o |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 714 | OBJS+= mst_fpga.o mainstone.o |
balrog | 24859b6 | 2008-04-24 19:21:53 +0000 | [diff] [blame] | 715 | OBJS+= musicpal.o pflash_cfi02.o |
balrog | 5a1237c | 2007-05-02 02:11:51 +0000 | [diff] [blame] | 716 | CPPFLAGS += -DHAS_AUDIO |
bellard | b5ff1b3 | 2005-11-26 10:38:39 +0000 | [diff] [blame] | 717 | endif |
bellard | fdf9b3e | 2006-04-27 21:07:38 +0000 | [diff] [blame] | 718 | ifeq ($(TARGET_BASE_ARCH), sh4) |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 719 | OBJS+= shix.o r2d.o sh7750.o sh7750_regnames.o tc58128.o |
balrog | 1e5459a | 2008-12-07 19:08:45 +0000 | [diff] [blame] | 720 | OBJS+= sh_timer.o ptimer.o sh_serial.o sh_intc.o sh_pci.o sm501.o serial.o |
balrog | a4a771c | 2008-12-07 18:41:42 +0000 | [diff] [blame] | 721 | OBJS+= ide.o |
bellard | fdf9b3e | 2006-04-27 21:07:38 +0000 | [diff] [blame] | 722 | endif |
pbrook | 0633879 | 2007-05-23 19:58:11 +0000 | [diff] [blame] | 723 | ifeq ($(TARGET_BASE_ARCH), m68k) |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 724 | OBJS+= an5206.o mcf5206.o ptimer.o mcf_uart.o mcf_intc.o mcf5208.o mcf_fec.o |
| 725 | OBJS+= m68k-semi.o dummy_m68k.o |
pbrook | 0633879 | 2007-05-23 19:58:11 +0000 | [diff] [blame] | 726 | endif |
bellard | a541f29 | 2004-04-12 20:39:29 +0000 | [diff] [blame] | 727 | ifdef CONFIG_GDBSTUB |
pbrook | 56aebc8 | 2008-10-11 17:55:29 +0000 | [diff] [blame] | 728 | OBJS+=gdbstub.o gdbstub-xml.o |
bellard | 728c9fd | 2004-01-05 00:08:14 +0000 | [diff] [blame] | 729 | endif |
bellard | 5b0753e | 2005-03-01 21:37:28 +0000 | [diff] [blame] | 730 | ifdef CONFIG_COCOA |
bellard | 1d14ffa | 2005-10-30 18:58:22 +0000 | [diff] [blame] | 731 | COCOA_LIBS=-F/System/Library/Frameworks -framework Cocoa -framework IOKit |
| 732 | ifdef CONFIG_COREAUDIO |
| 733 | COCOA_LIBS+=-framework CoreAudio |
| 734 | endif |
bellard | 5b0753e | 2005-03-01 21:37:28 +0000 | [diff] [blame] | 735 | endif |
bellard | 7c1f25b | 2004-04-22 00:02:08 +0000 | [diff] [blame] | 736 | ifdef CONFIG_SLIRP |
ths | 6f30fa8 | 2007-01-05 01:00:47 +0000 | [diff] [blame] | 737 | CPPFLAGS+=-I$(SRC_PATH)/slirp |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 738 | endif |
| 739 | |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 740 | LIBS+=$(AIOLIBS) |
bellard | c321f67 | 2003-10-30 01:18:42 +0000 | [diff] [blame] | 741 | # specific flags are needed for non soft mmu emulator |
bellard | c321f67 | 2003-10-30 01:18:42 +0000 | [diff] [blame] | 742 | ifdef CONFIG_STATIC |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 743 | LDFLAGS+=-static |
bellard | de5eaa6 | 2003-11-16 23:18:17 +0000 | [diff] [blame] | 744 | endif |
bellard | 83fb7ad | 2004-07-05 21:25:26 +0000 | [diff] [blame] | 745 | ifndef CONFIG_DARWIN |
bellard | 11d9f69 | 2004-04-02 20:55:59 +0000 | [diff] [blame] | 746 | ifndef CONFIG_WIN32 |
bellard | ec530c8 | 2006-04-25 22:36:06 +0000 | [diff] [blame] | 747 | ifndef CONFIG_SOLARIS |
malc | b29fe3e | 2008-11-18 01:42:22 +0000 | [diff] [blame] | 748 | ifndef CONFIG_AIX |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 749 | LIBS+=-lutil |
bellard | 11d9f69 | 2004-04-02 20:55:59 +0000 | [diff] [blame] | 750 | endif |
bellard | 83fb7ad | 2004-07-05 21:25:26 +0000 | [diff] [blame] | 751 | endif |
bellard | ec530c8 | 2006-04-25 22:36:06 +0000 | [diff] [blame] | 752 | endif |
malc | b29fe3e | 2008-11-18 01:42:22 +0000 | [diff] [blame] | 753 | endif |
bellard | e3086fb | 2005-02-10 21:48:51 +0000 | [diff] [blame] | 754 | ifdef TARGET_GPROF |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 755 | vl.o: CFLAGS+=-p |
| 756 | LDFLAGS+=-p |
bellard | e3086fb | 2005-02-10 21:48:51 +0000 | [diff] [blame] | 757 | endif |
bellard | c321f67 | 2003-10-30 01:18:42 +0000 | [diff] [blame] | 758 | |
bellard | b8076a7 | 2005-04-07 22:20:31 +0000 | [diff] [blame] | 759 | ifeq ($(ARCH),ia64) |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 760 | LDFLAGS+=-Wl,-G0 -Wl,-T,$(SRC_PATH)/ia64.ld |
ths | 8a0ef21 | 2007-11-18 22:34:46 +0000 | [diff] [blame] | 761 | endif |
| 762 | |
bellard | 1d14ffa | 2005-10-30 18:58:22 +0000 | [diff] [blame] | 763 | ifdef CONFIG_WIN32 |
| 764 | SDL_LIBS := $(filter-out -mwindows, $(SDL_LIBS)) -mconsole |
| 765 | endif |
| 766 | |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 767 | # profiling code |
| 768 | ifdef TARGET_GPROF |
| 769 | LDFLAGS+=-p |
| 770 | main.o: CFLAGS+=-p |
bellard | 6e1b3e4 | 2006-08-17 17:41:26 +0000 | [diff] [blame] | 771 | endif |
| 772 | |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 773 | $(QEMU_PROG): $(OBJS) ../libqemu_common.a libqemu.a |
ths | 8a16d27 | 2008-07-19 09:56:24 +0000 | [diff] [blame] | 774 | $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) $(SDL_LIBS) $(COCOA_LIBS) $(CURSES_LIBS) $(BRLAPI_LIBS) $(VDE_LIBS) |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 775 | |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 776 | endif # !CONFIG_USER_ONLY |
bellard | 00a67ba | 2006-10-28 12:19:07 +0000 | [diff] [blame] | 777 | |
pbrook | 56aebc8 | 2008-10-11 17:55:29 +0000 | [diff] [blame] | 778 | gdbstub-xml.c: $(TARGET_XML_FILES) feature_to_c.sh |
| 779 | rm -f $@ |
| 780 | ifeq ($(TARGET_XML_FILES),) |
| 781 | echo > $@ |
| 782 | else |
| 783 | $(SHELL) $(SRC_PATH)/feature_to_c.sh $@ $(TARGET_XML_FILES) |
| 784 | endif |
| 785 | |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 786 | %.o: %.c |
bellard | 40293e5 | 2008-01-31 11:32:10 +0000 | [diff] [blame] | 787 | $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $< |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 788 | |
bellard | f72b519 | 2004-02-16 21:55:35 +0000 | [diff] [blame] | 789 | %.o: %.S |
ths | 6f30fa8 | 2007-01-05 01:00:47 +0000 | [diff] [blame] | 790 | $(CC) $(CPPFLAGS) -c -o $@ $< |
bellard | f72b519 | 2004-02-16 21:55:35 +0000 | [diff] [blame] | 791 | |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 792 | clean: |
aurel32 | 86e840e | 2008-12-07 15:21:23 +0000 | [diff] [blame] | 793 | rm -f *.o *.a *~ $(PROGS) nwfpe/*.o fpu/*.o |
bellard | 57fec1f | 2008-02-01 10:50:11 +0000 | [diff] [blame] | 794 | rm -f *.d */*.d tcg/*.o |
bellard | 1e43adf | 2003-09-30 20:54:24 +0000 | [diff] [blame] | 795 | |
ths | 5fafdf2 | 2007-09-16 21:08:06 +0000 | [diff] [blame] | 796 | install: all |
bellard | 9b14bb0 | 2004-03-26 22:43:34 +0000 | [diff] [blame] | 797 | ifneq ($(PROGS),) |
pbrook | 6a88264 | 2006-04-17 13:57:12 +0000 | [diff] [blame] | 798 | $(INSTALL) -m 755 -s $(PROGS) "$(DESTDIR)$(bindir)" |
bellard | 9b14bb0 | 2004-03-26 22:43:34 +0000 | [diff] [blame] | 799 | endif |
bellard | 626df76 | 2003-08-10 21:39:31 +0000 | [diff] [blame] | 800 | |
j_mayer | 2f96c28 | 2007-10-28 13:07:12 +0000 | [diff] [blame] | 801 | # Include automatically generated dependency files |
| 802 | -include $(wildcard *.d */*.d) |