Statistics
| Branch: | Revision:

root / Makefile @ 31e31b8a

History | View | Annotate | Download (817 Bytes)

1
CFLAGS=-Wall -O2 -g
2
LDFLAGS=-g
3
DEFINES=-D_GNU_SOURCE -DGEMU -DDOSEMU #-DNO_TRACE_MSGS
4

    
5
OBJS= i386/fp87.o i386/interp_main.o i386/interp_modrm.o i386/interp_16_32.o \
6
      i386/interp_32_16.o i386/interp_32_32.o i386/emu-utils.o \
7
      i386/dis8086.o i386/emu-ldt.o
8
OBJS+= elfload.o main.o thunk.o syscall.o
9

    
10
SRCS = $(OBJS:.o=.c)
11

    
12
all: gemu
13

    
14
gemu: $(OBJS)
15
	$(CC) -Wl,-T,i386.ld $(LDFLAGS) -o $@ $(OBJS)
16

    
17
depend: $(SRCS)
18
	$(CC) -MM $(CFLAGS) $^ 1>.depend
19

    
20
%.o: %.c
21
	$(CC) $(CFLAGS) $(DEFINES) -c -o $@ $<
22

    
23
clean:
24
	rm -f *.o *~ i386/*.o i386/*~ gemu hello test1 test2 TAGS
25

    
26
hello: hello.c
27
	$(CC) -nostdlib $(CFLAGS) -static $(LDFLAGS) -o $@ $<
28

    
29
test1: test1.c
30
	$(CC) $(CFLAGS) -static $(LDFLAGS) -o $@ $<
31

    
32
test2: test2.c
33
	$(CC) $(CFLAGS) -static $(LDFLAGS) -o $@ $<
34

    
35
ifneq ($(wildcard .depend),)
36
include .depend
37
endif