]> git.proxmox.com Git - mirror_qemu.git/blame - Makefile
new x86 CPU core
[mirror_qemu.git] / Makefile
CommitLineData
766a487a
FB
1ARCH=i386
2#ARCH=ppc
367e86e8 3HOST_CC=gcc
766a487a
FB
4
5ifeq ($(ARCH),i386)
367e86e8 6CFLAGS=-Wall -O2 -g -fomit-frame-pointer
31e31b8a 7LDFLAGS=-g
766a487a
FB
8LIBS=
9CC=gcc
10DEFINES=-DHAVE_BYTESWAP_H
11endif
12
13ifeq ($(ARCH),ppc)
14GCC_LIBS_DIR=/usr/netgem/tools/lib/gcc-lib/powerpc-linux/2.95.2
15DIST=/home/fbe/nsv/dist/hw/n6-dtt
16CC=powerpc-linux-gcc -msoft-float
17CFLAGS=-Wall -pipe -O2 -mcpu=405 -mbig -nostdinc -g -I$(GCC_LIBS_DIR)/include -I$(DIST)/include
18LIBS_DIR=$(DIST)/lib
19CRT1=$(LIBS_DIR)/crt1.o
20CRTI=$(LIBS_DIR)/crti.o
21CRTN=$(LIBS_DIR)/crtn.o
22CRTBEGIN=$(GCC_LIBS_DIR)/crtbegin.o
23CRTEND=$(GCC_LIBS_DIR)/crtend.o
24LDFLAGS=-static -g -nostdlib $(CRT1) $(CRTI) $(CRTBEGIN)
25LIBS=-L$(LIBS_DIR) -ltinyc -lgcc $(CRTEND) $(CRTN)
26DEFINES=-Dsocklen_t=int
27endif
28
29#########################################################
30
367e86e8
FB
31DEFINES+=-D_GNU_SOURCE -DGEMU -DDOSEMU -DNO_TRACE_MSGS
32DEFINES+=-DCONFIG_PREFIX=\"/usr/local\"
766a487a 33LDSCRIPT=$(ARCH).ld
367e86e8 34LIBS+=-ldl
31e31b8a
FB
35
36OBJS= i386/fp87.o i386/interp_main.o i386/interp_modrm.o i386/interp_16_32.o \
37 i386/interp_32_16.o i386/interp_32_32.o i386/emu-utils.o \
38 i386/dis8086.o i386/emu-ldt.o
367e86e8 39OBJS+=translate-i386.o op-i386.o
31e31b8a 40OBJS+= elfload.o main.o thunk.o syscall.o
31e31b8a
FB
41SRCS = $(OBJS:.o=.c)
42
43all: gemu
44
45gemu: $(OBJS)
367e86e8 46 $(CC) -Wl,-T,$(LDSCRIPT) $(LDFLAGS) -o $@ $^ $(LIBS)
31e31b8a
FB
47
48depend: $(SRCS)
49 $(CC) -MM $(CFLAGS) $^ 1>.depend
50
367e86e8
FB
51# old i386 emulator
52i386/interp_32_32.o: i386/interp_32_32.c i386/interp_gen.h
53
54i386/interp_gen.h: i386/gencode
55 ./i386/gencode > $@
56
57i386/gencode: i386/gencode.c
58 $(CC) -O2 -Wall -g $< -o $@
59
60# new i386 emulator
61dyngen: dyngen.c
62 $(HOST_CC) -O2 -Wall -g $< -o $@
63
64translate-i386.o: translate-i386.c op-i386.h cpu-i386.h
65
66op-i386.h: op-i386.o dyngen
67 ./dyngen -o $@ $<
68
69op-i386.o: op-i386.c opreg_template.h ops_template.h
70 $(CC) $(CFLAGS) $(DEFINES) -c -o $@ $<
71
31e31b8a
FB
72%.o: %.c
73 $(CC) $(CFLAGS) $(DEFINES) -c -o $@ $<
74
75clean:
367e86e8 76 rm -f *.o *~ i386/*.o i386/*~ gemu TAGS
31e31b8a 77
367e86e8
FB
78# various test targets
79test speed: gemu
80 make -C tests $@
31e31b8a 81
367e86e8
FB
82TAGS:
83 etags *.[ch] i386/*.[ch]
31e31b8a
FB
84
85ifneq ($(wildcard .depend),)
86include .depend
87endif