/[qemu]/qemu/Makefile.target
ViewVC logotype

Diff of /qemu/Makefile.target

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by bellard, Wed Sep 17 22:57:56 2003 UTC revision 1.4 by bellard, Tue Sep 30 20:54:24 2003 UTC
# Line 1  Line 1 
1  include config.mak  include config.mak
2    
3  VPATH=$(SRC_PATH)  TARGET_PATH=$(SRC_PATH)/target-$(TARGET_ARCH)
4    VPATH=$(SRC_PATH):$(TARGET_PATH)
5  CFLAGS=-Wall -O2 -g  CFLAGS=-Wall -O2 -g
6  LDFLAGS=-g  LDFLAGS=-g
7  LIBS=  LIBS=
8  DEFINES=-I.  DEFINES=-I. -I$(TARGET_PATH) -I$(SRC_PATH)
9  HELPER_CFLAGS=$(CFLAGS)  HELPER_CFLAGS=$(CFLAGS)
10  DYNGEN=../dyngen  DYNGEN=../dyngen
11    # user emulator name
12    QEMU_USER=qemu-$(TARGET_ARCH)
13    # system emulator name
14    ifdef CONFIG_SOFTMMU
15    QEMU_SYSTEM=qemu-softmmu
16    else
17    QEMU_SYSTEM=qemu
18    endif
19    
20  ifndef CONFIG_SOFTMMU  ifndef CONFIG_SOFTMMU
21  PROGS=qemu  PROGS=$(QEMU_USER)
22  endif  endif
23    
24  ifdef CONFIG_STATIC  ifdef CONFIG_STATIC
# Line 32  else Line 42  else
42  LDFLAGS+=-Wl,-shared  LDFLAGS+=-Wl,-shared
43  endif  endif
44  ifeq ($(TARGET_ARCH), i386)  ifeq ($(TARGET_ARCH), i386)
45  PROGS+=vl  PROGS+=$(QEMU_SYSTEM)
46  endif  endif
47  endif  endif
48    
# Line 108  SRCS:= $(OBJS:.o=.c) Line 118  SRCS:= $(OBJS:.o=.c)
118  OBJS+= libqemu.a  OBJS+= libqemu.a
119    
120  # cpu emulator library  # cpu emulator library
121  LIBOBJS=thunk.o exec.o translate.o cpu-exec.o gdbstub.o  LIBOBJS=thunk.o exec.o translate-all.o cpu-exec.o gdbstub.o \
122            translate.o op.o
123    
124  ifeq ($(TARGET_ARCH), i386)  ifeq ($(TARGET_ARCH), i386)
125  LIBOBJS+=translate-i386.o op-i386.o helper-i386.o helper2-i386.o  LIBOBJS+=helper.o helper2.o
 endif  
 ifeq ($(TARGET_ARCH), arm)  
 LIBOBJS+=translate-arm.o op-arm.o  
126  endif  endif
127    
128  # NOTE: the disassembler code is only needed for debugging  # NOTE: the disassembler code is only needed for debugging
# Line 139  ifeq ($(ARCH),ia64) Line 147  ifeq ($(ARCH),ia64)
147  OBJS += ia64-syscall.o  OBJS += ia64-syscall.o
148  endif  endif
149    
150  all: $(PROGS) qemu-doc.html  all: $(PROGS)
151    
152  qemu: $(OBJS)  $(QEMU_USER): $(OBJS)
153          $(CC) $(LDFLAGS) -o $@ $^  $(LIBS)          $(CC) $(LDFLAGS) -o $@ $^  $(LIBS)
154  ifeq ($(ARCH),alpha)  ifeq ($(ARCH),alpha)
155  # Mark as 32 bit binary, i. e. it will be mapped into the low 31 bit of  # Mark as 32 bit binary, i. e. it will be mapped into the low 31 bit of
# Line 156  VL_OBJS+=sdl.o Line 164  VL_OBJS+=sdl.o
164  SDL_LIBS+=-L/usr/X11R6/lib -lX11 -lXext -lXv -ldl -lm  SDL_LIBS+=-L/usr/X11R6/lib -lX11 -lXext -lXv -ldl -lm
165  endif  endif
166    
167  vl: $(VL_OBJS) libqemu.a  $(QEMU_SYSTEM): $(VL_OBJS) libqemu.a
168          $(CC) -static -Wl,-T,$(SRC_PATH)/i386-vl.ld -o $@ $^ $(LIBS) $(SDL_LIBS)          $(CC) -static -Wl,-T,$(SRC_PATH)/i386-vl.ld -o $@ $^ $(LIBS) $(SDL_LIBS)
169    
170  sdl.o: sdl.c  sdl.o: sdl.c
# Line 171  libqemu.a: $(LIBOBJS) Line 179  libqemu.a: $(LIBOBJS)
179          rm -f $@          rm -f $@
180          $(AR) rcs $@ $(LIBOBJS)          $(AR) rcs $@ $(LIBOBJS)
181    
182  translate-$(TARGET_ARCH).o: translate-$(TARGET_ARCH).c gen-op-$(TARGET_ARCH).h opc-$(TARGET_ARCH).h cpu-$(TARGET_ARCH).h  translate.o: translate.c gen-op.h opc.h cpu.h
183    
184  translate.o: translate.c op-$(TARGET_ARCH).h opc-$(TARGET_ARCH).h cpu-$(TARGET_ARCH).h  translate-all.o: translate-all.c op.h opc.h cpu.h
185    
186  op-$(TARGET_ARCH).h: op-$(TARGET_ARCH).o $(DYNGEN)  op.h: op.o $(DYNGEN)
187          $(DYNGEN) -o $@ $<          $(DYNGEN) -o $@ $<
188    
189  opc-$(TARGET_ARCH).h: op-$(TARGET_ARCH).o $(DYNGEN)  opc.h: op.o $(DYNGEN)
190          $(DYNGEN) -c -o $@ $<          $(DYNGEN) -c -o $@ $<
191    
192  gen-op-$(TARGET_ARCH).h: op-$(TARGET_ARCH).o $(DYNGEN)  gen-op.h: op.o $(DYNGEN)
193          $(DYNGEN) -g -o $@ $<          $(DYNGEN) -g -o $@ $<
194    
195  op-$(TARGET_ARCH).o: op-$(TARGET_ARCH).c  op.o: op.c
196          $(CC) $(OP_CFLAGS) $(DEFINES) -c -o $@ $<          $(CC) $(OP_CFLAGS) $(DEFINES) -c -o $@ $<
197    
198  helper-$(TARGET_ARCH).o: helper-$(TARGET_ARCH).c  helper.o: helper.c
199          $(CC) $(HELPER_CFLAGS) $(DEFINES) -c -o $@ $<          $(CC) $(HELPER_CFLAGS) $(DEFINES) -c -o $@ $<
200    
201  op-i386.o: op-i386.c opreg_template.h ops_template.h ops_template_mem.h ops_mem.h  ifeq ($(TARGET_ARCH), i386)
202    op.o: op.c opreg_template.h ops_template.h ops_template_mem.h ops_mem.h
203    endif
204    
205    ifeq ($(TARGET_ARCH), arm)
206    op.o: op.c op_template.h
207    endif
208    
209  op-arm.o: op-arm.c op-arm-template.h  ifeq ($(TARGET_ARCH), sparc)
210    op.o: op.c op_template.h
211    endif
212    
213  %.o: %.c  %.o: %.c
214          $(CC) $(CFLAGS) $(DEFINES) -c -o $@ $<          $(CC) $(CFLAGS) $(DEFINES) -c -o $@ $<
215    
216  clean:  clean:
217          rm -f *.o  *.a *~ $(PROGS) \          rm -f *.o  *.a *~ $(PROGS) gen-op.h opc.h op.h
218             gen-op-$(TARGET_ARCH).h opc-$(TARGET_ARCH).h op-$(TARGET_ARCH).h  
219    install: all
220            install -m 755 -s $(PROGS) $(prefix)/bin
221    
222  ifneq ($(wildcard .depend),)  ifneq ($(wildcard .depend),)
223  include .depend  include .depend

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26