Commit 2f96c28d5518944fa3577b09582aa5ae39f8b509
1 parent
603fccce
Use cpp to generate correct build dependencies for target objects
instead of using incomplete hardcoded ones. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3467 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
6 additions
and
54 deletions
Makefile.target
| @@ -24,7 +24,7 @@ TARGET_BASE_ARCH:=sparc | @@ -24,7 +24,7 @@ TARGET_BASE_ARCH:=sparc | ||
| 24 | endif | 24 | endif |
| 25 | TARGET_PATH=$(SRC_PATH)/target-$(TARGET_BASE_ARCH) | 25 | TARGET_PATH=$(SRC_PATH)/target-$(TARGET_BASE_ARCH) |
| 26 | VPATH=$(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw:$(SRC_PATH)/audio | 26 | VPATH=$(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw:$(SRC_PATH)/audio |
| 27 | -CPPFLAGS=-I. -I.. -I$(TARGET_PATH) -I$(SRC_PATH) | 27 | +CPPFLAGS=-I. -I.. -I$(TARGET_PATH) -I$(SRC_PATH) -MMD -MP |
| 28 | ifdef CONFIG_DARWIN_USER | 28 | ifdef CONFIG_DARWIN_USER |
| 29 | VPATH+=:$(SRC_PATH)/darwin-user | 29 | VPATH+=:$(SRC_PATH)/darwin-user |
| 30 | CPPFLAGS+=-I$(SRC_PATH)/darwin-user -I$(SRC_PATH)/darwin-user/$(TARGET_ARCH) | 30 | CPPFLAGS+=-I$(SRC_PATH)/darwin-user -I$(SRC_PATH)/darwin-user/$(TARGET_ARCH) |
| @@ -645,58 +645,6 @@ cpu-exec.o: cpu-exec.c | @@ -645,58 +645,6 @@ cpu-exec.o: cpu-exec.c | ||
| 645 | signal.o: signal.c | 645 | signal.o: signal.c |
| 646 | $(CC) $(HELPER_CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) -c -o $@ $< | 646 | $(CC) $(HELPER_CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) -c -o $@ $< |
| 647 | 647 | ||
| 648 | -vga.o: pixel_ops.h | ||
| 649 | - | ||
| 650 | -tcx.o: pixel_ops.h | ||
| 651 | - | ||
| 652 | -ifeq ($(TARGET_BASE_ARCH), i386) | ||
| 653 | -op.o: op.c opreg_template.h ops_template.h ops_template_mem.h ops_mem.h ops_sse.h | ||
| 654 | -endif | ||
| 655 | - | ||
| 656 | -ifeq ($(TARGET_ARCH), arm) | ||
| 657 | -op.o: op.c op_template.h | ||
| 658 | -pl110.o: pl110_template.h | ||
| 659 | -endif | ||
| 660 | - | ||
| 661 | -ifeq ($(TARGET_BASE_ARCH), sparc) | ||
| 662 | -helper.o: cpu.h exec-all.h | ||
| 663 | -op.o: op.c op_template.h op_mem.h fop_template.h fbranch_template.h exec.h cpu.h | ||
| 664 | -op_helper.o: exec.h softmmu_template.h cpu.h | ||
| 665 | -translate.o: cpu.h exec-all.h disas.h | ||
| 666 | -endif | ||
| 667 | - | ||
| 668 | -ifeq ($(TARGET_BASE_ARCH), ppc) | ||
| 669 | -op.o: op.c op_template.h op_mem.h op_helper.h | ||
| 670 | -op_helper.o: op_helper.c mfrom_table.c op_helper_mem.h op_helper.h | ||
| 671 | -translate.o: translate.c translate_init.c | ||
| 672 | -endif | ||
| 673 | - | ||
| 674 | -ifeq ($(TARGET_BASE_ARCH), mips) | ||
| 675 | -helper.o: cpu.h exec-all.h | ||
| 676 | -op.o: op_template.c fop_template.c op_mem.c exec.h cpu.h | ||
| 677 | -op_helper.o: exec.h softmmu_template.h cpu.h | ||
| 678 | -translate.o: translate_init.c exec-all.h disas.h | ||
| 679 | -endif | ||
| 680 | - | ||
| 681 | -loader.o: loader.c elf_ops.h | ||
| 682 | - | ||
| 683 | -ifeq ($(TARGET_ARCH), sh4) | ||
| 684 | -op.o: op.c op_mem.c cpu.h | ||
| 685 | -op_helper.o: op_helper.c exec.h cpu.h | ||
| 686 | -helper.o: helper.c exec.h cpu.h | ||
| 687 | -sh7750.o: sh7750.c sh7750_regs.h sh7750_regnames.h cpu.h | ||
| 688 | -shix.o: shix.c sh7750_regs.h sh7750_regnames.h | ||
| 689 | -sh7750_regnames.o: sh7750_regnames.c sh7750_regnames.h sh7750_regs.h | ||
| 690 | -tc58128.o: tc58128.c | ||
| 691 | -endif | ||
| 692 | - | ||
| 693 | -ifeq ($(TARGET_BASE_ARCH), alpha) | ||
| 694 | -op.o: op.c op_template.h op_mem.h | ||
| 695 | -op_helper.o: op_helper_mem.h | ||
| 696 | -endif | ||
| 697 | - | ||
| 698 | -$(OBJS) $(LIBOBJS) $(VL_OBJS): config.h ../config-host.h | ||
| 699 | - | ||
| 700 | %.o: %.c | 648 | %.o: %.c |
| 701 | $(CC) $(CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) -c -o $@ $< | 649 | $(CC) $(CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) -c -o $@ $< |
| 702 | 650 | ||
| @@ -704,7 +652,8 @@ $(OBJS) $(LIBOBJS) $(VL_OBJS): config.h ../config-host.h | @@ -704,7 +652,8 @@ $(OBJS) $(LIBOBJS) $(VL_OBJS): config.h ../config-host.h | ||
| 704 | $(CC) $(CPPFLAGS) -c -o $@ $< | 652 | $(CC) $(CPPFLAGS) -c -o $@ $< |
| 705 | 653 | ||
| 706 | clean: | 654 | clean: |
| 707 | - rm -f *.o *.a *~ $(PROGS) gen-op.h opc.h op.h nwfpe/*.o slirp/*.o fpu/*.o | 655 | + rm -f *.o *.a *~ $(PROGS) gen-op.h opc.h op.h nwfpe/*.o slirp/*.o fpu/*.o |
| 656 | + rm -f *.d */*.d | ||
| 708 | 657 | ||
| 709 | install: all | 658 | install: all |
| 710 | ifneq ($(PROGS),) | 659 | ifneq ($(PROGS),) |
| @@ -720,3 +669,6 @@ audio.o sdlaudio.o dsoundaudio.o ossaudio.o wavaudio.o noaudio.o \ | @@ -720,3 +669,6 @@ audio.o sdlaudio.o dsoundaudio.o ossaudio.o wavaudio.o noaudio.o \ | ||
| 720 | fmodaudio.o alsaaudio.o mixeng.o sb16.o es1370.o gus.o adlib.o: \ | 669 | fmodaudio.o alsaaudio.o mixeng.o sb16.o es1370.o gus.o adlib.o: \ |
| 721 | CFLAGS := $(CFLAGS) -Wall -Werror -W -Wsign-compare | 670 | CFLAGS := $(CFLAGS) -Wall -Werror -W -Wsign-compare |
| 722 | endif | 671 | endif |
| 672 | + | ||
| 673 | +# Include automatically generated dependency files | ||
| 674 | +-include $(wildcard *.d */*.d) |