mirror of
https://github.com/yuzu-emu/unicorn
synced 2024-11-24 09:48:21 +00:00
3fa5a557eb
Now that we require at least GCC 4.8, we don't need this als workaround for 4.6 and 4.7 anymore. Backports commit d376e9de07e9541a040609d30b73403c33b6afe0 from qemu
122 lines
2.9 KiB
Makefile
122 lines
2.9 KiB
Makefile
# -*- Mode: makefile -*-
|
|
|
|
include ../config-host.mak
|
|
include config-target.mak
|
|
include config-devices.mak
|
|
include $(SRC_PATH)/rules.mak
|
|
|
|
$(call set-vpath, $(SRC_PATH))
|
|
QEMU_CFLAGS += -I.. -I$(SRC_PATH)/target/$(TARGET_BASE_ARCH) -DNEED_CPU_H
|
|
|
|
QEMU_CFLAGS+=-I$(SRC_PATH)/include
|
|
|
|
ifdef CONFIG_USER_ONLY
|
|
# user emulator name
|
|
QEMU_PROG=qemu-$(TARGET_NAME)
|
|
QEMU_PROG_BUILD = $(QEMU_PROG)
|
|
else
|
|
# system emulator name
|
|
QEMU_PROG=qemu-system-$(TARGET_NAME)$(EXESUF)
|
|
ifneq (,$(findstring -mwindows,$(libs_softmmu)))
|
|
# Terminate program name with a 'w' because the linker builds a windows executable.
|
|
QEMU_PROGW=qemu-system-$(TARGET_NAME)w$(EXESUF)
|
|
$(QEMU_PROG): $(QEMU_PROGW)
|
|
$(call quiet-command,$(OBJCOPY) --subsystem console $(QEMU_PROGW) $(QEMU_PROG)," GEN $(TARGET_DIR)$(QEMU_PROG)")
|
|
QEMU_PROG_BUILD = $(QEMU_PROGW)
|
|
else
|
|
QEMU_PROG_BUILD = $(QEMU_PROG)
|
|
endif
|
|
endif
|
|
|
|
PROGS=$(QEMU_PROG) $(QEMU_PROGW)
|
|
|
|
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
|
|
obj-y = exec.o
|
|
obj-$(CONFIG_TCG) += tcg/tcg.o tcg/tcg-op.o tcg/tcg-op-vec.o tcg/tcg-op-gvec.o
|
|
obj-$(CONFIG_TCG) += tcg/tcg-common.o tcg/optimize.o
|
|
obj-$(CONFIG_TCG) += fpu/softfloat.o
|
|
obj-y += target/$(TARGET_BASE_ARCH)/
|
|
obj-y += accel/
|
|
|
|
#########################################################
|
|
# System emulator target
|
|
ifdef CONFIG_SOFTMMU
|
|
obj-y += cpus.o ioport.o
|
|
obj-y += hw/
|
|
obj-y += memory.o
|
|
obj-y += memory_mapping.o
|
|
LIBS+=$(libs_softmmu)
|
|
|
|
# Hardware support
|
|
ifeq ($(TARGET_NAME), sparc64)
|
|
obj-y += hw/sparc64/
|
|
else
|
|
obj-y += hw/$(TARGET_BASE_ARCH)/
|
|
endif
|
|
|
|
endif # CONFIG_SOFTMMU
|
|
|
|
dummy := $(call unnest-vars,,obj-y)
|
|
all-obj-y := $(obj-y)
|
|
|
|
block-obj-y :=
|
|
common-obj-y :=
|
|
include $(SRC_PATH)/Makefile.objs
|
|
|
|
dummy := $(call unnest-vars,..,util-obj-y)
|
|
|
|
target-obj-y-save := $(target-obj-y) $(util-obj-y)
|
|
|
|
dummy := $(call unnest-vars,.., \
|
|
block-obj-y \
|
|
block-obj-m \
|
|
crypto-obj-y \
|
|
crypto-aes-obj-y)
|
|
|
|
dummy := $(call unnest-vars,..,common-obj-y,common-obj-m)
|
|
|
|
target-obj-y := $(target-obj-y-save)
|
|
all-obj-y += $(common-obj-y)
|
|
all-obj-y += $(target-obj-y)
|
|
all-obj-$(CONFIG_SOFTMMU) += $(block-obj-y)
|
|
all-obj-$(CONFIG_USER_ONLY) += $(crypto-aes-obj-y)
|
|
all-obj-$(CONFIG_SOFTMMU) += $(crypto-obj-y)
|
|
|
|
# determine shared lib extension
|
|
IS_APPLE := $(shell $(CC) -dM -E - < /dev/null | grep __apple_build_version__ | wc -l | tr -d " ")
|
|
ifeq ($(IS_APPLE),1)
|
|
EXT = dylib
|
|
else
|
|
# Cygwin?
|
|
IS_CYGWIN := $(shell $(CC) -dumpmachine | grep -i cygwin | wc -l)
|
|
ifeq ($(IS_CYGWIN),1)
|
|
EXT = dll
|
|
else
|
|
EXT = so
|
|
endif
|
|
endif
|
|
|
|
# build either PROG or PROGW
|
|
$(QEMU_PROG_BUILD): $(all-obj-y)
|
|
|
|
clean:
|
|
rm -f *.a *~ $(PROGS)
|
|
rm -f $(shell find . -name '*.[od]')
|
|
|
|
install: all
|
|
ifneq ($(PROGS),)
|
|
$(call install-prog,$(PROGS),$(DESTDIR)$(bindir))
|
|
endif
|
|
|
|
GENERATED_FILES += config-target.h
|
|
Makefile: $(GENERATED_FILES)
|
|
|