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 36 main.o: CFLAGS+=-p
37 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 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 44 SRCS = $(OBJS:.o=.c)
44 45  
45 46 all: gemu
46 47  
47 48 gemu: $(OBJS)
48   - $(CC) -Wl,-T,$(LDSCRIPT) $(LDFLAGS) -o $@ $^ $(LIBS)
  49 + $(CC) -Wl,-T,$(LDSCRIPT) $(LDFLAGS) -o $@ $^ $(LIBS)
49 50  
50 51 depend: $(SRCS)
51 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 60 dyngen: dyngen.c
55 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 73  
68 74 clean:
69 75 $(MAKE) -C tests clean
70   - rm -f *.o *~ gemu dyngen TAGS
  76 + rm -f *.o *.a *~ gemu dyngen TAGS
71 77  
72 78 distclean: clean
73 79 rm -f config.mak config.h
74 80  
  81 +install: gemu
  82 + install -m755 -s gemu $(prefix)/bin
  83 +
75 84 # various test targets
76 85 test speed: gemu
77 86 make -C tests $@
... ... @@ -89,8 +98,9 @@ dis-buf.c i386-dis.c opreg_template.h syscall_defs.h\
89 98 i386.ld ppc.ld exec-i386.h exec-i386.c configure VERSION \
90 99 tests/Makefile\
91 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 105 FILE=gemu-$(VERSION)
96 106  
... ...