From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IeyMH-0001u8-1G for qemu-devel@nongnu.org; Mon, 08 Oct 2007 15:33:41 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IeyMF-0001tX-5l for qemu-devel@nongnu.org; Mon, 08 Oct 2007 15:33:39 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IeyME-0001tM-UD for qemu-devel@nongnu.org; Mon, 08 Oct 2007 15:33:38 -0400 Received: from moutng.kundenserver.de ([212.227.126.183]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IeyME-0004dN-Fi for qemu-devel@nongnu.org; Mon, 08 Oct 2007 15:33:38 -0400 Message-ID: <470A860C.3000709@mail.berlios.de> Date: Mon, 08 Oct 2007 21:33:32 +0200 From: Stefan Weil MIME-Version: 1.0 Subject: Re: [Qemu-devel] qemu Makefile.target References: <46605E29.6000509@mail.berlios.de> In-Reply-To: Content-Type: multipart/mixed; boundary="------------000608090202020908090603" 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 This is a multi-part message in MIME format. --------------000608090202020908090603 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Blue Swirl schrieb: > On 6/1/07, Stefan Weil wrote: >> Wouldn't it be better to let the compiler create dependency files >> which make can read? I posted a patch some time ago and use it >> since many months for different QEMU target platforms. > > I don't know, the dependencies aren't changing very often. The current Makefile.target contains a lot of dependencies, and I think they change often, their number is growing and nevertheless they are far from being complete. The appended patch removes most explicit dependencies and adds gcc flags which create dependency files during normal compilation (so they are always up-to-date). Stefan --------------000608090202020908090603 Content-Type: text/x-diff; name="Makefile.target.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="Makefile.target.patch" Index: Makefile.target =================================================================== RCS file: /sources/qemu/qemu/Makefile.target,v retrieving revision 1.206 diff -u -b -B -r1.206 Makefile.target --- Makefile.target 8 Oct 2007 13:38:26 -0000 1.206 +++ Makefile.target 8 Oct 2007 19:30:59 -0000 @@ -33,6 +33,7 @@ BASE_CFLAGS= BASE_LDFLAGS= #CFLAGS+=-Werror +BASE_CFLAGS += -MMD -MP LIBS= HELPER_CFLAGS=$(CFLAGS) DYNGEN=../dyngen$(EXESUF) @@ -107,6 +108,8 @@ OP_CFLAGS+=$(call cc-option, -fno-align-functions, $(call cc-option, -malign-functions=0, "")) OP_CFLAGS+=$(call cc-option, -fno-section-anchors, "") +OP_CFLAGS += -MMD -MP + ifeq ($(ARCH),i386) HELPER_CFLAGS+=-fomit-frame-pointer OP_CFLAGS+=-mpreferred-stack-boundary=2 -fomit-frame-pointer @@ -629,58 +632,6 @@ signal.o: signal.c $(CC) $(HELPER_CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) -c -o $@ $< -vga.o: pixel_ops.h - -tcx.o: pixel_ops.h - -ifeq ($(TARGET_BASE_ARCH), i386) -op.o: op.c opreg_template.h ops_template.h ops_template_mem.h ops_mem.h ops_sse.h -endif - -ifeq ($(TARGET_ARCH), arm) -op.o: op.c op_template.h -pl110.o: pl110_template.h -endif - -ifeq ($(TARGET_BASE_ARCH), sparc) -helper.o: cpu.h exec-all.h -op.o: op.c op_template.h op_mem.h fop_template.h fbranch_template.h exec.h cpu.h -op_helper.o: exec.h softmmu_template.h cpu.h -translate.o: cpu.h exec-all.h disas.h -endif - -ifeq ($(TARGET_BASE_ARCH), ppc) -op.o: op.c op_template.h op_mem.h op_helper.h -op_helper.o: op_helper.c mfrom_table.c op_helper_mem.h op_helper.h -translate.o: translate.c translate_init.c -endif - -ifeq ($(TARGET_BASE_ARCH), mips) -helper.o: cpu.h exec-all.h -op.o: op_template.c fop_template.c op_mem.c exec.h cpu.h -op_helper.o: op_helper_mem.c exec.h softmmu_template.h cpu.h -translate.o: translate_init.c exec-all.h disas.h -endif - -loader.o: loader.c elf_ops.h - -ifeq ($(TARGET_ARCH), sh4) -op.o: op.c op_mem.c cpu.h -op_helper.o: op_helper.c exec.h cpu.h -helper.o: helper.c exec.h cpu.h -sh7750.o: sh7750.c sh7750_regs.h sh7750_regnames.h cpu.h -shix.o: shix.c sh7750_regs.h sh7750_regnames.h -sh7750_regnames.o: sh7750_regnames.c sh7750_regnames.h sh7750_regs.h -tc58128.o: tc58128.c -endif - -ifeq ($(TARGET_BASE_ARCH), alpha) -op.o: op.c op_template.h op_mem.h -op_helper.o: op_helper_mem.h -endif - -$(OBJS) $(LIBOBJS) $(VL_OBJS): config.h ../config-host.h - %.o: %.c $(CC) $(CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) -c -o $@ $< @@ -689,6 +640,7 @@ clean: rm -f *.o *.a *~ $(PROGS) gen-op.h opc.h op.h nwfpe/*.o slirp/*.o fpu/*.o + rm -f *.d */*.d install: all ifneq ($(PROGS),) @@ -699,6 +651,9 @@ include .depend endif +-include *.d +-include */*.d + ifeq (1, 0) audio.o sdlaudio.o dsoundaudio.o ossaudio.o wavaudio.o noaudio.o \ fmodaudio.o alsaaudio.o mixeng.o sb16.o es1370.o gus.o adlib.o: \ --------------000608090202020908090603--