git subrepo pull --force emummc
subrepo: subdir: "emummc" merged: "2fc47cbb8" upstream: origin: "https://github.com/lulle2007200/emuMMC.git" branch: "develop" commit: "2fc47cbb8" git-subrepo: version: "0.4.9" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "30db3b8"
This commit is contained in:
32
emummc/Makefile
vendored
32
emummc/Makefile
vendored
@@ -4,6 +4,8 @@ ifeq ($(strip $(DEVKITPRO)),)
|
||||
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>/devkitpro")
|
||||
endif
|
||||
|
||||
include $(DEVKITPRO)/libnx/switch_rules
|
||||
|
||||
TARGET := emummc
|
||||
BUILD := build
|
||||
SOURCES := source/nx source source/utils source/emmc source/soc source/power source/emuMMC source/FS source/libs/fatfs
|
||||
@@ -11,13 +13,15 @@ DATA := data
|
||||
INCLUDES := include
|
||||
EXEFS_SRC := exefs_src
|
||||
|
||||
|
||||
EMUMMC_INCLUDE_FATAL_PAYLOAD ?= 1
|
||||
|
||||
ifneq ($(BUILD),$(notdir $(CURDIR)))
|
||||
EMUMMCDIR ?= $(CURDIR)
|
||||
else
|
||||
EMUMMCDIR ?= $(CURDIR)/../
|
||||
endif
|
||||
|
||||
include $(DEVKITPRO)/libnx/switch_rules
|
||||
|
||||
ARCH := -march=armv8-a -mtune=cortex-a57 -mtp=soft -fPIE
|
||||
|
||||
@@ -27,20 +31,24 @@ DEFINES := -DINNER_HEAP_SIZE=0x8000
|
||||
CFLAGS := -Wall -O2 -ffunction-sections -fdata-sections -Wno-unused-function \
|
||||
$(ARCH) $(DEFINES)
|
||||
|
||||
CFLAGS += $(INCLUDE) -D__SWITCH__
|
||||
CFLAGS += $(INCLUDE) -D__SWITCH__ -DEMUMMC_HAS_FATAL_PAYLOAD=$(EMUMMC_INCLUDE_FATAL_PAYLOAD)
|
||||
|
||||
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++17
|
||||
|
||||
ASFLAGS := -g $(ARCH)
|
||||
LDFLAGS = -specs=$(EMUMMCDIR)/emummc.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map)
|
||||
|
||||
LIBS := -lnx
|
||||
LIBDIRS := $(LIBNX)
|
||||
|
||||
ifneq ($(BUILD),$(notdir $(CURDIR)))
|
||||
|
||||
export OUTPUT := $(CURDIR)/$(TARGET)
|
||||
export TOPDIR := $(EMUMMCDIR)
|
||||
|
||||
export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
|
||||
$(foreach dir,$(DATA),$(CURDIR)/$(dir))
|
||||
$(foreach dir,$(DATA),$(CURDIR)/$(dir)) \
|
||||
../source/fatal/out
|
||||
|
||||
export DEPSDIR := $(CURDIR)/$(BUILD)
|
||||
|
||||
@@ -48,6 +56,9 @@ CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
|
||||
CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
|
||||
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
|
||||
BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*)))
|
||||
ifeq ($(EMUMMC_INCLUDE_FATAL_PAYLOAD), 1)
|
||||
BINFILES += fatal_handler.bin
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(CPPFILES)),)
|
||||
export LD := $(CC)
|
||||
@@ -94,11 +105,20 @@ clean:
|
||||
@rm -fr $(BUILD) $(TARGET).elf $(TARGET).kip
|
||||
|
||||
else
|
||||
.PHONY: all
|
||||
.PHONY: all fatal_handler
|
||||
|
||||
all : fatal_handler $(OUTPUT)_unpacked.kip
|
||||
|
||||
ifeq ($(EMUMMC_INCLUDE_FATAL_PAYLOAD), 1)
|
||||
fatal_handler:
|
||||
@$(MAKE) --no-print-directory -C $(CURDIR)/../source/fatal
|
||||
else
|
||||
fatal_handler: ;
|
||||
|
||||
endif
|
||||
|
||||
DEPENDS := $(OFILES:.o=.d)
|
||||
|
||||
all : $(OUTPUT)_unpacked.kip
|
||||
|
||||
$(OUTPUT)_unpacked.kip : $(OUTPUT).kip
|
||||
@hactool -t kip --uncompressed=$(OUTPUT)_unpacked.kip $(OUTPUT).kip
|
||||
@@ -109,7 +129,7 @@ $(OUTPUT).elf : $(OFILES)
|
||||
|
||||
$(OFILES_SRC) : $(HFILES_BIN)
|
||||
|
||||
%.bin.o %_bin.h : %.bin
|
||||
fatal_handler.bin.o fatal_handler_bin.h : fatal_handler.bin
|
||||
@echo $(notdir $<)
|
||||
@$(bin2o)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user