6 CFLAGS=-Wall -O2 -g -fomit-frame-pointer
10 DEFINES=-DHAVE_BYTESWAP_H
11 OP_CFLAGS=$(CFLAGS) -malign-functions=0 -mpreferred-stack-boundary=2
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
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
31 #########################################################
33 DEFINES+=-D_GNU_SOURCE
34 DEFINES+=-DCONFIG_PREFIX=\"/usr/local\"
38 #DEFINES+= -DGEMU -DDOSEMU -DNO_TRACE_MSGS
39 #OBJS= i386/fp87.o i386/interp_main.o i386/interp_modrm.o i386/interp_16_32.o \
40 # i386/interp_32_16.o i386/interp_32_32.o i386/emu-utils.o \
41 # i386/dis8086.o i386/emu-ldt.o
42 OBJS+=translate-i386.o op-i386.o
43 OBJS+= elfload.o main.o thunk.o syscall.o
44 # NOTE: the disassembler code is only needed for debugging
45 OBJS+=i386-dis.o dis-buf.o
51 $(CC) -Wl,-T,$(LDSCRIPT) $(LDFLAGS) -o $@ $^ $(LIBS)
54 $(CC) -MM $(CFLAGS) $^ 1>.depend
57 i386/interp_32_32.o: i386/interp_32_32.c i386/interp_gen.h
59 i386/interp_gen.h: i386/gencode
62 i386/gencode: i386/gencode.c
63 $(CC) -O2 -Wall -g $< -o $@
67 $(HOST_CC) -O2 -Wall -g $< -o $@
69 translate-i386.o: translate-i386.c op-i386.h cpu-i386.h
71 op-i386.h: op-i386.o dyngen
74 op-i386.o: op-i386.c opreg_template.h ops_template.h
75 $(CC) $(OP_CFLAGS) $(DEFINES) -c -o $@ $<
78 $(CC) $(CFLAGS) $(DEFINES) -c -o $@ $<
81 rm -f *.o *~ i386/*.o i386/*~ gemu TAGS
83 # various test targets
88 etags *.[ch] i386/*.[ch]
90 ifneq ($(wildcard .depend),)