Introduce rules.mak (Avi Kivity)
Add a file for common makefile rules. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6378 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
807544e27d
commit
17759187b6
8
Makefile
8
Makefile
@ -1,12 +1,14 @@
|
|||||||
# Makefile for QEMU.
|
# Makefile for QEMU.
|
||||||
|
|
||||||
include config-host.mak
|
include config-host.mak
|
||||||
|
include $(SRC_PATH)/rules.mak
|
||||||
|
|
||||||
.PHONY: all clean cscope distclean dvi html info install install-doc \
|
.PHONY: all clean cscope distclean dvi html info install install-doc \
|
||||||
recurse-all speed tar tarbin test
|
recurse-all speed tar tarbin test
|
||||||
|
|
||||||
VPATH=$(SRC_PATH):$(SRC_PATH)/hw
|
VPATH=$(SRC_PATH):$(SRC_PATH)/hw
|
||||||
|
|
||||||
|
|
||||||
CFLAGS += $(OS_CFLAGS) $(ARCH_CFLAGS)
|
CFLAGS += $(OS_CFLAGS) $(ARCH_CFLAGS)
|
||||||
LDFLAGS += $(OS_LDFLAGS) $(ARCH_LDFLAGS)
|
LDFLAGS += $(OS_LDFLAGS) $(ARCH_LDFLAGS)
|
||||||
|
|
||||||
@ -188,12 +190,6 @@ libqemu_user.a: $(USER_OBJS)
|
|||||||
qemu-img$(EXESUF): qemu-img.o qemu-tool.o osdep.o $(BLOCK_OBJS)
|
qemu-img$(EXESUF): qemu-img.o qemu-tool.o osdep.o $(BLOCK_OBJS)
|
||||||
$(CC) $(LDFLAGS) -o $@ $^ -lz $(LIBS)
|
$(CC) $(LDFLAGS) -o $@ $^ -lz $(LIBS)
|
||||||
|
|
||||||
%.o: %.c
|
|
||||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
|
|
||||||
|
|
||||||
%.o: %.m
|
|
||||||
$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
|
|
||||||
|
|
||||||
qemu-nbd$(EXESUF): qemu-nbd.o qemu-tool.o osdep.o $(BLOCK_OBJS)
|
qemu-nbd$(EXESUF): qemu-nbd.o qemu-tool.o osdep.o $(BLOCK_OBJS)
|
||||||
$(CC) $(LDFLAGS) -o $@ $^ -lz $(LIBS)
|
$(CC) $(LDFLAGS) -o $@ $^ -lz $(LIBS)
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
include config.mak
|
include config.mak
|
||||||
|
include $(SRC_PATH)/rules.mak
|
||||||
|
|
||||||
TARGET_BASE_ARCH:=$(TARGET_ARCH)
|
TARGET_BASE_ARCH:=$(TARGET_ARCH)
|
||||||
ifeq ($(TARGET_ARCH), x86_64)
|
ifeq ($(TARGET_ARCH), x86_64)
|
||||||
@ -731,12 +732,6 @@ else
|
|||||||
$(SHELL) $(SRC_PATH)/feature_to_c.sh $@ $(TARGET_XML_FILES)
|
$(SHELL) $(SRC_PATH)/feature_to_c.sh $@ $(TARGET_XML_FILES)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
%.o: %.c
|
|
||||||
$(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
|
|
||||||
|
|
||||||
%.o: %.S
|
|
||||||
$(CC) $(CPPFLAGS) -c -o $@ $<
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o *.a *~ $(PROGS) nwfpe/*.o fpu/*.o
|
rm -f *.o *.a *~ $(PROGS) nwfpe/*.o fpu/*.o
|
||||||
rm -f *.d */*.d tcg/*.o
|
rm -f *.d */*.d tcg/*.o
|
||||||
|
Loading…
Reference in New Issue
Block a user