Revision 7d13299d Makefile

b/Makefile
1
ARCH=i386
2
#ARCH=ppc
3
HOST_CC=gcc
1
include config.mak
4 2

  
5
ifeq ($(ARCH),i386)
6
CFLAGS=-Wall -O2 -g -fomit-frame-pointer
3
CFLAGS=-Wall -O2 -g
7 4
LDFLAGS=-g
8 5
LIBS=
9
CC=gcc
10 6
DEFINES=-DHAVE_BYTESWAP_H
7

  
8
ifeq ($(ARCH),i386)
9
CFLAGS+=-fomit-frame-pointer
11 10
OP_CFLAGS=$(CFLAGS) -malign-functions=0 -mpreferred-stack-boundary=2
12 11
endif
13 12

  
14 13
ifeq ($(ARCH),ppc)
15
GCC_LIBS_DIR=/usr/netgem/tools/lib/gcc-lib/powerpc-linux/2.95.2
16
DIST=/home/fbe/nsv/dist/hw/n6-dtt
17
CC=powerpc-linux-gcc -msoft-float 
18
CFLAGS=-Wall -pipe -O2 -mcpu=405 -mbig -nostdinc -g -I$(GCC_LIBS_DIR)/include -I$(DIST)/include
19
LIBS_DIR=$(DIST)/lib
20
CRT1=$(LIBS_DIR)/crt1.o
21
CRTI=$(LIBS_DIR)/crti.o
22
CRTN=$(LIBS_DIR)/crtn.o
23
CRTBEGIN=$(GCC_LIBS_DIR)/crtbegin.o
24
CRTEND=$(GCC_LIBS_DIR)/crtend.o
25
LDFLAGS=-static -g -nostdlib $(CRT1) $(CRTI) $(CRTBEGIN) 
26
LIBS=-L$(LIBS_DIR) -ltinyc -lgcc $(CRTEND) $(CRTN)
27
DEFINES=-Dsocklen_t=int
28 14
OP_CFLAGS=$(CFLAGS)
29 15
endif
30 16

  
31 17
#########################################################
32 18

  
33 19
DEFINES+=-D_GNU_SOURCE
34
DEFINES+=-DCONFIG_PREFIX=\"/usr/local\"
35 20
LDSCRIPT=$(ARCH).ld
36 21
LIBS+=-ldl -lm
37
VERSION=0.1
22

  
23
# profiling code
24
ifdef TARGET_GPROF
25
LDFLAGS+=-p
26
CFLAGS+=-p
27
endif
38 28

  
39 29
OBJS= elfload.o main.o thunk.o syscall.o
40
OBJS+=translate-i386.o op-i386.o
30
OBJS+=translate-i386.o op-i386.o exec-i386.o
41 31
# NOTE: the disassembler code is only needed for debugging
42 32
OBJS+=i386-dis.o dis-buf.o
43 33
SRCS = $(OBJS:.o=.c)
......
66 56
	$(CC) $(CFLAGS) $(DEFINES) -c -o $@ $<
67 57

  
68 58
clean:
59
	$(MAKE) -C tests clean
69 60
	rm -f *.o *~ gemu dyngen TAGS
70 61

  
62
distclean: clean
63
	rm -f config.mak config.h
64

  
71 65
# various test targets
72 66
test speed: gemu
73 67
	make -C tests $@
......
82 76
cpu-i386.h   gemu.h      op-i386.c         syscall-i386.h  translate-i386.c\
83 77
dis-asm.h    gen-i386.h  op-i386.h         syscall.c\
84 78
dis-buf.c    i386-dis.c  opreg_template.h  syscall_defs.h\
85
i386.ld ppc.ld\
79
i386.ld ppc.ld exec-i386.h exec-i386.c configure VERSION \
86 80
tests/Makefile\
87 81
tests/test-i386.c tests/test-i386-shift.h tests/test-i386.h\
88 82
tests/test-i386-muldiv.h\

Also available in: Unified diff