x49gp/qemu/qemu-git/Makefile-small.target

104 lines
2.7 KiB
Makefile

# -*- Mode: makefile -*-
GENERATED_HEADERS = config-target.h
include ../config-host.mak
include config-devices.mak
include config-target.mak
include $(SRC_PATH)/rules.mak
ifneq ($(HWDIR),)
include $(HWDIR)/config.mak
endif
TARGET_PATH=$(SRC_PATH)/target-$(TARGET_BASE_ARCH)
$(call set-vpath, $(SRC_PATH):$(TARGET_PATH):$(SRC_PATH)/hw)
QEMU_CFLAGS+= -I.. -I$(TARGET_PATH) -DNEED_CPU_H
include $(SRC_PATH)/Makefile-small.objs
# system emulator name
QEMU_PROG=qemu-system-arm$(EXESUF)
PROGS=$(QEMU_PROG)
LIBS+=-lm
config-target.h: config-target.h-timestamp
config-target.h-timestamp: config-target.mak
all: $(PROGS)
# Dummy command so that make thinks it has done something
@true
#########################################################
# cpu emulator library
libobj-y = exec.o translate-all.o cpu-exec.o translate.o
libobj-y += tcg/tcg.o
libobj-$(CONFIG_SOFTFLOAT) += fpu/softfloat.o
libobj-$(CONFIG_NOSOFTFLOAT) += fpu/softfloat-native.o
libobj-y += op_helper.o helper.o
libobj-$(CONFIG_NEED_MMU) += mmu.o
libobj-$(TARGET_ARM) += neon_helper.o iwmmxt_helper.o
# NOTE: the disassembler code is only needed for debugging
libobj-y += disas.o
libobj-$(CONFIG_ALPHA_DIS) += alpha-dis.o
libobj-$(CONFIG_ARM_DIS) += arm-dis.o
libobj-$(CONFIG_CRIS_DIS) += cris-dis.o
libobj-$(CONFIG_HPPA_DIS) += hppa-dis.o
libobj-$(CONFIG_I386_DIS) += i386-dis.o
libobj-$(CONFIG_M68K_DIS) += m68k-dis.o
libobj-$(CONFIG_MICROBLAZE_DIS) += microblaze-dis.o
libobj-$(CONFIG_MIPS_DIS) += mips-dis.o
libobj-$(CONFIG_PPC_DIS) += ppc-dis.o
libobj-$(CONFIG_S390_DIS) += s390-dis.o
libobj-$(CONFIG_SH4_DIS) += sh4-dis.o
libobj-$(CONFIG_SPARC_DIS) += sparc-dis.o
$(libobj-y): $(GENERATED_HEADERS)
# libqemu
translate.o: translate.c cpu.h
translate-all.o: translate-all.c cpu.h
tcg/tcg.o: cpu.h
# HELPER_CFLAGS is used for all the code compiled with static register
# variables
op_helper.o cpu-exec.o: QEMU_CFLAGS += $(HELPER_CFLAGS)
#########################################################
# System emulator target
ifdef CONFIG_SOFTMMU
#obj-y = gdbstub.o
LIBS+=-lz
main.o: QEMU_CFLAGS+=$(GPROF_CFLAGS)
$(obj-y) $(obj-$(TARGET_BASE_ARCH)-y): $(GENERATED_HEADERS)
obj-y += $(addprefix ../, $(common-obj-y))
obj-y += $(libobj-y)
endif # CONFIG_SOFTMMU
#obj-$(CONFIG_GDBSTUB_XML) += gdbstub-xml.o
$(QEMU_PROG): $(obj-y) $(obj-$(TARGET_BASE_ARCH)-y)
# $(call LINK,$(obj-y) $(obj-$(TARGET_BASE_ARCH)-y))
gdbstub-xml.c: $(TARGET_XML_FILES) $(SRC_PATH)/feature_to_c.sh
$(call quiet-command,rm -f $@ && $(SHELL) $(SRC_PATH)/feature_to_c.sh $@ $(TARGET_XML_FILES)," GEN $(TARGET_DIR)$@")
clean:
rm -f *.o *.a *~ $(PROGS) fpu/*.o
rm -f *.d */*.d tcg/*.o
rm -f gdbstub-xml.c
# Include automatically generated dependency files
-include $(wildcard *.d */*.d)