Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LPhZO-0001sS-Su for qemu-devel@nongnu.org; Wed, 21 Jan 2009 13:12:54 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LPhZO-0001qx-3Y for qemu-devel@nongnu.org; Wed, 21 Jan 2009 13:12:54 -0500 Received: from [199.232.76.173] (port=38366 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LPhZN-0001qk-UX for qemu-devel@nongnu.org; Wed, 21 Jan 2009 13:12:53 -0500 Received: from savannah.gnu.org ([199.232.41.3]:55787 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LPhZN-0003M1-OU for qemu-devel@nongnu.org; Wed, 21 Jan 2009 13:12:53 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1LPhZN-0002kd-Cc for qemu-devel@nongnu.org; Wed, 21 Jan 2009 18:12:53 +0000 Received: from aliguori by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1LPhZN-0002kZ-8M for qemu-devel@nongnu.org; Wed, 21 Jan 2009 18:12:53 +0000 MIME-Version: 1.0 Errors-To: aliguori Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Anthony Liguori Message-Id: Date: Wed, 21 Jan 2009 18:12:53 +0000 Subject: [Qemu-devel] [6378] Introduce rules.mak (Avi Kivity) Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 6378 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6378 Author: aliguori Date: 2009-01-21 18:12:52 +0000 (Wed, 21 Jan 2009) Log Message: ----------- Introduce rules.mak (Avi Kivity) Add a file for common makefile rules. Signed-off-by: Avi Kivity Signed-off-by: Anthony Liguori Modified Paths: -------------- trunk/Makefile trunk/Makefile.target Added Paths: ----------- trunk/rules.mak Modified: trunk/Makefile =================================================================== --- trunk/Makefile 2009-01-21 18:12:44 UTC (rev 6377) +++ trunk/Makefile 2009-01-21 18:12:52 UTC (rev 6378) @@ -1,12 +1,14 @@ # Makefile for QEMU. include config-host.mak +include $(SRC_PATH)/rules.mak .PHONY: all clean cscope distclean dvi html info install install-doc \ recurse-all speed tar tarbin test VPATH=$(SRC_PATH):$(SRC_PATH)/hw + CFLAGS += $(OS_CFLAGS) $(ARCH_CFLAGS) LDFLAGS += $(OS_LDFLAGS) $(ARCH_LDFLAGS) @@ -188,12 +190,6 @@ qemu-img$(EXESUF): qemu-img.o qemu-tool.o osdep.o $(BLOCK_OBJS) $(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) $(CC) $(LDFLAGS) -o $@ $^ -lz $(LIBS) Modified: trunk/Makefile.target =================================================================== --- trunk/Makefile.target 2009-01-21 18:12:44 UTC (rev 6377) +++ trunk/Makefile.target 2009-01-21 18:12:52 UTC (rev 6378) @@ -1,4 +1,5 @@ include config.mak +include $(SRC_PATH)/rules.mak TARGET_BASE_ARCH:=$(TARGET_ARCH) ifeq ($(TARGET_ARCH), x86_64) @@ -731,12 +732,6 @@ $(SHELL) $(SRC_PATH)/feature_to_c.sh $@ $(TARGET_XML_FILES) endif -%.o: %.c - $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $< - -%.o: %.S - $(CC) $(CPPFLAGS) -c -o $@ $< - clean: rm -f *.o *.a *~ $(PROGS) nwfpe/*.o fpu/*.o rm -f *.d */*.d tcg/*.o Added: trunk/rules.mak =================================================================== --- trunk/rules.mak (rev 0) +++ trunk/rules.mak 2009-01-21 18:12:52 UTC (rev 6378) @@ -0,0 +1,10 @@ + +%.o: %.c + $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $< + +%.o: %.S + $(CC) $(CPPFLAGS) -c -o $@ $< + +%.o: %.m + $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< +