From 367e86e8476d6373a00d0e56a29b03c4b8f3e2ee Mon Sep 17 00:00:00 2001 From: bellard Date: Sat, 1 Mar 2003 17:13:26 +0000 Subject: new x86 CPU core git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@14 c046a42c-6fe2-441c-8c8c-71466251a162 --- Makefile | 46 ++++++++++++++++++++++++++++++++++------------ 1 file changed, 34 insertions(+), 12 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 9f71211333..397ddf1342 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,9 @@ ARCH=i386 #ARCH=ppc +HOST_CC=gcc ifeq ($(ARCH),i386) -CFLAGS=-Wall -O2 -g +CFLAGS=-Wall -O2 -g -fomit-frame-pointer LDFLAGS=-g LIBS= CC=gcc @@ -27,38 +28,59 @@ endif ######################################################### -DEFINES+=-D_GNU_SOURCE -DGEMU -DDOSEMU #-DNO_TRACE_MSGS +DEFINES+=-D_GNU_SOURCE -DGEMU -DDOSEMU -DNO_TRACE_MSGS +DEFINES+=-DCONFIG_PREFIX=\"/usr/local\" LDSCRIPT=$(ARCH).ld +LIBS+=-ldl OBJS= i386/fp87.o i386/interp_main.o i386/interp_modrm.o i386/interp_16_32.o \ i386/interp_32_16.o i386/interp_32_32.o i386/emu-utils.o \ i386/dis8086.o i386/emu-ldt.o +OBJS+=translate-i386.o op-i386.o OBJS+= elfload.o main.o thunk.o syscall.o - SRCS = $(OBJS:.o=.c) all: gemu gemu: $(OBJS) - $(CC) -Wl,-T,$(LDSCRIPT) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) + $(CC) -Wl,-T,$(LDSCRIPT) $(LDFLAGS) -o $@ $^ $(LIBS) depend: $(SRCS) $(CC) -MM $(CFLAGS) $^ 1>.depend +# old i386 emulator +i386/interp_32_32.o: i386/interp_32_32.c i386/interp_gen.h + +i386/interp_gen.h: i386/gencode + ./i386/gencode > $@ + +i386/gencode: i386/gencode.c + $(CC) -O2 -Wall -g $< -o $@ + +# new i386 emulator +dyngen: dyngen.c + $(HOST_CC) -O2 -Wall -g $< -o $@ + +translate-i386.o: translate-i386.c op-i386.h cpu-i386.h + +op-i386.h: op-i386.o dyngen + ./dyngen -o $@ $< + +op-i386.o: op-i386.c opreg_template.h ops_template.h + $(CC) $(CFLAGS) $(DEFINES) -c -o $@ $< + %.o: %.c $(CC) $(CFLAGS) $(DEFINES) -c -o $@ $< clean: - rm -f *.o *~ i386/*.o i386/*~ gemu hello test1 test2 TAGS - -hello: hello.c - $(CC) -nostdlib $(CFLAGS) -static $(LDFLAGS) -o $@ $< + rm -f *.o *~ i386/*.o i386/*~ gemu TAGS -test1: test1.c - $(CC) $(CFLAGS) -static $(LDFLAGS) -o $@ $< +# various test targets +test speed: gemu + make -C tests $@ -test2: test2.c - $(CC) $(CFLAGS) -static $(LDFLAGS) -o $@ $< +TAGS: + etags *.[ch] i386/*.[ch] ifneq ($(wildcard .depend),) include .depend -- cgit v1.2.1