Commit 612384d77146639cebdc9b71c87ee4a94bf44501

Authored by bellard
1 parent dab2ed99

added libgemu.a build


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@39 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 18 additions and 8 deletions
Makefile
@@ -36,21 +36,27 @@ LDFLAGS+=-p @@ -36,21 +36,27 @@ LDFLAGS+=-p
36 main.o: CFLAGS+=-p 36 main.o: CFLAGS+=-p
37 endif 37 endif
38 38
39 -OBJS= elfload.o main.o thunk.o syscall.o  
40 -OBJS+=translate-i386.o op-i386.o exec-i386.o 39 +OBJS= elfload.o main.o thunk.o syscall.o libgemu.a
  40 +
  41 +LIBOBJS+=translate-i386.o op-i386.o exec-i386.o
41 # NOTE: the disassembler code is only needed for debugging 42 # NOTE: the disassembler code is only needed for debugging
42 -OBJS+=i386-dis.o dis-buf.o 43 +LIBOBJS+=i386-dis.o dis-buf.o
43 SRCS = $(OBJS:.o=.c) 44 SRCS = $(OBJS:.o=.c)
44 45
45 all: gemu 46 all: gemu
46 47
47 gemu: $(OBJS) 48 gemu: $(OBJS)
48 - $(CC) -Wl,-T,$(LDSCRIPT) $(LDFLAGS) -o $@ $^ $(LIBS) 49 + $(CC) -Wl,-T,$(LDSCRIPT) $(LDFLAGS) -o $@ $^ $(LIBS)
49 50
50 depend: $(SRCS) 51 depend: $(SRCS)
51 $(CC) -MM $(CFLAGS) $^ 1>.depend 52 $(CC) -MM $(CFLAGS) $^ 1>.depend
52 53
53 -# new i386 emulator 54 +# libgemu
  55 +
  56 +libgemu.a: $(LIBOBJS)
  57 + rm -f $@
  58 + $(AR) rcs $@ $(LIBOBJS)
  59 +
54 dyngen: dyngen.c 60 dyngen: dyngen.c
55 $(HOST_CC) -O2 -Wall -g $< -o $@ 61 $(HOST_CC) -O2 -Wall -g $< -o $@
56 62
@@ -67,11 +73,14 @@ op-i386.o: op-i386.c opreg_template.h ops_template.h @@ -67,11 +73,14 @@ op-i386.o: op-i386.c opreg_template.h ops_template.h
67 73
68 clean: 74 clean:
69 $(MAKE) -C tests clean 75 $(MAKE) -C tests clean
70 - rm -f *.o *~ gemu dyngen TAGS 76 + rm -f *.o *.a *~ gemu dyngen TAGS
71 77
72 distclean: clean 78 distclean: clean
73 rm -f config.mak config.h 79 rm -f config.mak config.h
74 80
  81 +install: gemu
  82 + install -m755 -s gemu $(prefix)/bin
  83 +
75 # various test targets 84 # various test targets
76 test speed: gemu 85 test speed: gemu
77 make -C tests $@ 86 make -C tests $@
@@ -89,8 +98,9 @@ dis-buf.c i386-dis.c opreg_template.h syscall_defs.h\ @@ -89,8 +98,9 @@ dis-buf.c i386-dis.c opreg_template.h syscall_defs.h\
89 i386.ld ppc.ld exec-i386.h exec-i386.c configure VERSION \ 98 i386.ld ppc.ld exec-i386.h exec-i386.c configure VERSION \
90 tests/Makefile\ 99 tests/Makefile\
91 tests/test-i386.c tests/test-i386-shift.h tests/test-i386.h\ 100 tests/test-i386.c tests/test-i386-shift.h tests/test-i386.h\
92 -tests/test-i386-muldiv.h\  
93 -tests/test2.c tests/hello.c tests/hello tests/sha1.c 101 +tests/test-i386-muldiv.h tests/test-i386-code16.S\
  102 +tests/hello.c tests/hello tests/sha1.c \
  103 +tests/testsig.c tests/testclone.c tests/testthread.c
94 104
95 FILE=gemu-$(VERSION) 105 FILE=gemu-$(VERSION)
96 106