mirror of
https://github.com/PretendoNetwork/Inkay.git
synced 2024-05-16 20:00:52 -04:00
b02db3f20b
* Fix aroma beta 17 incompatibilities (no network notification, no unregister boss tasks), and fix debug logger * Update Dockerfile * Fix logger.h * Simplify notifcations * Init nn::boss::Task * Small fixes for the storage/config API usage * Do a bunch of stuff, wish I knew what I did but I honestly forgot most of it (this is not considered a 100% functional commit * Remove remnants of has_displayed_popup variables (not needed anymore) * More notifications stuff * Even more notifications stuff * Fix notifications (yay) (thanks maschell) * Disable debug by default * Fix compiler warnings * Update some stuff, cant test have to go --------- Co-authored-by: Maschell <Maschell@gmx.de>
149 lines
5.4 KiB
Makefile
149 lines
5.4 KiB
Makefile
#-------------------------------------------------------------------------------
|
|
.SUFFIXES:
|
|
#-------------------------------------------------------------------------------
|
|
|
|
ifeq ($(strip $(DEVKITPRO)),)
|
|
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>/devkitpro")
|
|
endif
|
|
|
|
TOPDIR ?= $(CURDIR)
|
|
|
|
include $(DEVKITPRO)/wups/share/wups_rules
|
|
|
|
WUT_ROOT := $(DEVKITPRO)/wut
|
|
WUMS_ROOT := $(DEVKITPRO)/wums
|
|
#-------------------------------------------------------------------------------
|
|
# TARGET is the name of the output
|
|
# BUILD is the directory where object files & intermediate files will be placed
|
|
# SOURCES is a list of directories containing source code
|
|
# DATA is a list of directories containing data files
|
|
# INCLUDES is a list of directories containing header files
|
|
#-------------------------------------------------------------------------------
|
|
TARGET := Inkay-pretendo
|
|
BUILD := build
|
|
SOURCES := src src/patches src/utils src/ext/inih
|
|
DATA := data
|
|
INCLUDES := src src/ext/inih
|
|
#DEBUG := 1
|
|
|
|
#-------------------------------------------------------------------------------
|
|
# options for code generation
|
|
#-------------------------------------------------------------------------------
|
|
CFLAGS := -g -Wall -O2 -ffunction-sections \
|
|
$(MACHDEP)
|
|
|
|
CFLAGS += $(INCLUDE) -D__WIIU__ -D__WUT__ -D__WUPS__
|
|
|
|
ifeq ($(DEBUG),1)
|
|
CFLAGS += -DDEBUG
|
|
endif
|
|
|
|
CXXFLAGS := $(CFLAGS) -std=c++20
|
|
|
|
ASFLAGS := -g $(ARCH)
|
|
LDFLAGS = -g $(ARCH) $(RPXSPECS) -Wl,-Map,$(notdir $*.map)
|
|
|
|
LDFLAGS += -T$(WUMS_ROOT)/share/libkernel.ld $(WUPSSPECS)
|
|
|
|
LIBS := -lwups -lmocha -lkernel -lwut -lnotifications -lfunctionpatcher
|
|
|
|
#-------------------------------------------------------------------------------
|
|
# list of directories containing libraries, this must be the top level
|
|
# containing include and lib
|
|
#-------------------------------------------------------------------------------
|
|
LIBDIRS := $(PORTLIBS) $(WUMS_ROOT) $(WUPS_ROOT) $(WUT_ROOT) $(WUT_ROOT)/usr
|
|
|
|
#-------------------------------------------------------------------------------
|
|
# no real need to edit anything past this point unless you need to add additional
|
|
# rules for different file extensions
|
|
#-------------------------------------------------------------------------------
|
|
ifneq ($(BUILD),$(notdir $(CURDIR)))
|
|
#-------------------------------------------------------------------------------
|
|
|
|
export OUTPUT := $(CURDIR)/$(TARGET)
|
|
export TOPDIR := $(CURDIR)
|
|
|
|
export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
|
|
$(foreach dir,$(DATA),$(CURDIR)/$(dir))
|
|
|
|
export DEPSDIR := $(CURDIR)/$(BUILD)
|
|
|
|
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)/*.*)))
|
|
|
|
#-------------------------------------------------------------------------------
|
|
# use CXX for linking C++ projects, CC for standard C
|
|
#-------------------------------------------------------------------------------
|
|
ifeq ($(strip $(CPPFILES)),)
|
|
#-------------------------------------------------------------------------------
|
|
export LD := $(CC)
|
|
#-------------------------------------------------------------------------------
|
|
else
|
|
#-------------------------------------------------------------------------------
|
|
export LD := $(CXX)
|
|
#-------------------------------------------------------------------------------
|
|
endif
|
|
#-------------------------------------------------------------------------------
|
|
|
|
export OFILES_BIN := $(addsuffix .o,$(BINFILES))
|
|
export OFILES_SRC := $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o)
|
|
export OFILES := $(OFILES_BIN) $(OFILES_SRC)
|
|
export HFILES_BIN := $(addsuffix .h,$(subst .,_,$(BINFILES)))
|
|
|
|
export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
|
|
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
|
|
-I$(CURDIR)/$(BUILD)
|
|
|
|
export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib)
|
|
|
|
.PHONY: $(BUILD) clean all
|
|
|
|
#-------------------------------------------------------------------------------
|
|
all: $(BUILD)
|
|
|
|
$(BUILD):
|
|
@$(shell [ ! -d $(BUILD) ] && mkdir -p $(BUILD))
|
|
@$(MAKE) --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile
|
|
|
|
#-------------------------------------------------------------------------------
|
|
clean:
|
|
@echo clean ...
|
|
@rm -fr $(BUILD) $(TARGET).wps $(TARGET).elf
|
|
|
|
#-------------------------------------------------------------------------------
|
|
else
|
|
.PHONY: all
|
|
|
|
DEPENDS := $(OFILES:.o=.d)
|
|
|
|
#-------------------------------------------------------------------------------
|
|
# main targets
|
|
#-------------------------------------------------------------------------------
|
|
all : $(OUTPUT).wps
|
|
|
|
$(OUTPUT).wps : $(OUTPUT).elf
|
|
$(OUTPUT).elf : $(OFILES)
|
|
|
|
$(OFILES_SRC) : $(HFILES_BIN)
|
|
|
|
#-------------------------------------------------------------------------------
|
|
# you need a rule like this for each extension you use as binary data
|
|
#-------------------------------------------------------------------------------
|
|
%.bin.o %_bin.h : %.bin
|
|
#-------------------------------------------------------------------------------
|
|
@echo $(notdir $<)
|
|
@$(bin2o)
|
|
|
|
%.pem.o %_pem.h : %.pem
|
|
#-------------------------------------------------------------------------------
|
|
@echo $(notdir $<)
|
|
@$(bin2o)
|
|
|
|
-include $(DEPENDS)
|
|
|
|
#-------------------------------------------------------------------------------
|
|
endif
|
|
#-------------------------------------------------------------------------------
|