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
This commit is contained in:
parent
603fcccece
commit
2f96c28d55
@ -24,7 +24,7 @@ TARGET_BASE_ARCH:=sparc
|
||||
endif
|
||||
TARGET_PATH=$(SRC_PATH)/target-$(TARGET_BASE_ARCH)
|
||||
VPATH=$(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw:$(SRC_PATH)/audio
|
||||
CPPFLAGS=-I. -I.. -I$(TARGET_PATH) -I$(SRC_PATH)
|
||||
CPPFLAGS=-I. -I.. -I$(TARGET_PATH) -I$(SRC_PATH) -MMD -MP
|
||||
ifdef CONFIG_DARWIN_USER
|
||||
VPATH+=:$(SRC_PATH)/darwin-user
|
||||
CPPFLAGS+=-I$(SRC_PATH)/darwin-user -I$(SRC_PATH)/darwin-user/$(TARGET_ARCH)
|
||||
@ -645,58 +645,6 @@ cpu-exec.o: cpu-exec.c
|
||||
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: 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 $@ $<
|
||||
|
||||
@ -704,7 +652,8 @@ $(OBJS) $(LIBOBJS) $(VL_OBJS): config.h ../config-host.h
|
||||
$(CC) $(CPPFLAGS) -c -o $@ $<
|
||||
|
||||
clean:
|
||||
rm -f *.o *.a *~ $(PROGS) gen-op.h opc.h op.h nwfpe/*.o slirp/*.o fpu/*.o
|
||||
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),)
|
||||
@ -720,3 +669,6 @@ 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: \
|
||||
CFLAGS := $(CFLAGS) -Wall -Werror -W -Wsign-compare
|
||||
endif
|
||||
|
||||
# Include automatically generated dependency files
|
||||
-include $(wildcard *.d */*.d)
|
||||
|
Loading…
Reference in New Issue
Block a user