From a4b503c3750ccca386bbfb83c5e148c31cd4b2fd Mon Sep 17 00:00:00 2001 From: Maschell Date: Sun, 17 Jun 2018 13:00:29 +0200 Subject: [PATCH] Add missing compiler flags that may be required for WUT libraries --- plugins/example_plugin/Makefile | 7 ++++++- plugins/example_plugin/makefile.mk | 3 +++ plugins/example_plugin_wut/Makefile | 7 ++++++- plugins/example_plugin_wut/makefile.mk | 7 +++++-- plugins/hid_to_vpad/Makefile | 7 ++++++- plugins/hid_to_vpad/makefile.mk | 3 +++ plugins/memory_info/Makefile | 7 ++++++- plugins/memory_info/makefile.mk | 3 +++ plugins/nnu_patcher/Makefile | 7 ++++++- plugins/nnu_patcher/makefile.mk | 3 +++ plugins/overlay/Makefile | 7 ++++++- plugins/overlay/makefile.mk | 3 +++ plugins/padcon/Makefile | 7 ++++++- plugins/padcon/makefile.mk | 3 +++ plugins/screenshot/Makefile | 7 ++++++- plugins/screenshot/makefile.mk | 3 +++ plugins/sdcafiine/Makefile | 7 ++++++- plugins/sdcafiine/makefile.mk | 3 +++ plugins/swipswapme/Makefile | 7 ++++++- plugins/swipswapme/makefile.mk | 3 +++ 20 files changed, 92 insertions(+), 12 deletions(-) diff --git a/plugins/example_plugin/Makefile b/plugins/example_plugin/Makefile index f52cd9e..a5d6788 100644 --- a/plugins/example_plugin/Makefile +++ b/plugins/example_plugin/Makefile @@ -66,7 +66,7 @@ include $(WUPSDIR)/plugin_makefile.mk # -memb: enable embedded application specific compilation # -ffunction-sections: split up functions so linker can garbage collect # -fdata-sections: split up data so linker can garbage collect -COMMON_CFLAGS += -Os -Wall -DGEKKO_U -D__wiiu__ -mrvl -mcpu=750 -meabi -mhard-float -fno-common -msdata=none -memb -ffunction-sections -fdata-sections +COMMON_CFLAGS += -Os -Wall -DGEKKO_U -D__wiiu__ -D__WIIU__ -mrvl -mcpu=750 -meabi -mhard-float -fno-common -msdata=none -memb -ffunction-sections -fdata-sections # -x c: compile as c code @@ -81,6 +81,11 @@ ifeq ($(DO_LOGGING), 1) CFLAGS += -D__LOGGING__ CXXFLAGS += -D__LOGGING__ endif + +ifeq ($(USE_WUT), 1) + CFLAGS += -D__WUT__ + CXXFLAGS += -D__WUT__ +endif ASFLAGS += diff --git a/plugins/example_plugin/makefile.mk b/plugins/example_plugin/makefile.mk index f2e0000..6012d38 100644 --- a/plugins/example_plugin/makefile.mk +++ b/plugins/example_plugin/makefile.mk @@ -4,6 +4,9 @@ DO_LOGGING := 1 # Non WUT plugins need to wrap the malloc functions. WRAP_MALLOC := 1 +# Sets the "-D__WUT__" compiling flag +USE_WUT := 0 + # Target filename TARGET := $(notdir $(CURDIR)).mod diff --git a/plugins/example_plugin_wut/Makefile b/plugins/example_plugin_wut/Makefile index f52cd9e..a5d6788 100644 --- a/plugins/example_plugin_wut/Makefile +++ b/plugins/example_plugin_wut/Makefile @@ -66,7 +66,7 @@ include $(WUPSDIR)/plugin_makefile.mk # -memb: enable embedded application specific compilation # -ffunction-sections: split up functions so linker can garbage collect # -fdata-sections: split up data so linker can garbage collect -COMMON_CFLAGS += -Os -Wall -DGEKKO_U -D__wiiu__ -mrvl -mcpu=750 -meabi -mhard-float -fno-common -msdata=none -memb -ffunction-sections -fdata-sections +COMMON_CFLAGS += -Os -Wall -DGEKKO_U -D__wiiu__ -D__WIIU__ -mrvl -mcpu=750 -meabi -mhard-float -fno-common -msdata=none -memb -ffunction-sections -fdata-sections # -x c: compile as c code @@ -81,6 +81,11 @@ ifeq ($(DO_LOGGING), 1) CFLAGS += -D__LOGGING__ CXXFLAGS += -D__LOGGING__ endif + +ifeq ($(USE_WUT), 1) + CFLAGS += -D__WUT__ + CXXFLAGS += -D__WUT__ +endif ASFLAGS += diff --git a/plugins/example_plugin_wut/makefile.mk b/plugins/example_plugin_wut/makefile.mk index 6b70fc0..3924977 100644 --- a/plugins/example_plugin_wut/makefile.mk +++ b/plugins/example_plugin_wut/makefile.mk @@ -4,6 +4,9 @@ DO_LOGGING := 1 # Non WUT plugins need to wrap the malloc functions. WRAP_MALLOC := 0 +# Sets the "-D__WUT__" compiling flag +USE_WUT := 1 + # Target filename TARGET := $(notdir $(CURDIR)).mod @@ -20,9 +23,9 @@ INCLUDES := src # options for code generation and linking #--------------------------------------------------------------------------------- # Extra C compiler flags -CFLAGS := +CFLAGS := # Extra C++ compiler flags -CXXFLAGS := +CXXFLAGS := # Extra linking flags for all linking steps LD_FLAGS := # extra linking flags for linking the temporarily elf file (using ld) diff --git a/plugins/hid_to_vpad/Makefile b/plugins/hid_to_vpad/Makefile index f52cd9e..a5d6788 100644 --- a/plugins/hid_to_vpad/Makefile +++ b/plugins/hid_to_vpad/Makefile @@ -66,7 +66,7 @@ include $(WUPSDIR)/plugin_makefile.mk # -memb: enable embedded application specific compilation # -ffunction-sections: split up functions so linker can garbage collect # -fdata-sections: split up data so linker can garbage collect -COMMON_CFLAGS += -Os -Wall -DGEKKO_U -D__wiiu__ -mrvl -mcpu=750 -meabi -mhard-float -fno-common -msdata=none -memb -ffunction-sections -fdata-sections +COMMON_CFLAGS += -Os -Wall -DGEKKO_U -D__wiiu__ -D__WIIU__ -mrvl -mcpu=750 -meabi -mhard-float -fno-common -msdata=none -memb -ffunction-sections -fdata-sections # -x c: compile as c code @@ -81,6 +81,11 @@ ifeq ($(DO_LOGGING), 1) CFLAGS += -D__LOGGING__ CXXFLAGS += -D__LOGGING__ endif + +ifeq ($(USE_WUT), 1) + CFLAGS += -D__WUT__ + CXXFLAGS += -D__WUT__ +endif ASFLAGS += diff --git a/plugins/hid_to_vpad/makefile.mk b/plugins/hid_to_vpad/makefile.mk index c760764..33970e8 100644 --- a/plugins/hid_to_vpad/makefile.mk +++ b/plugins/hid_to_vpad/makefile.mk @@ -4,6 +4,9 @@ DO_LOGGING := 1 # Non WUT plugins need to wrap the malloc functions. WRAP_MALLOC := 1 +# Sets the "-D__WUT__" compiling flag +USE_WUT := 0 + # Target filename TARGET := $(notdir $(CURDIR)).mod diff --git a/plugins/memory_info/Makefile b/plugins/memory_info/Makefile index f52cd9e..a5d6788 100644 --- a/plugins/memory_info/Makefile +++ b/plugins/memory_info/Makefile @@ -66,7 +66,7 @@ include $(WUPSDIR)/plugin_makefile.mk # -memb: enable embedded application specific compilation # -ffunction-sections: split up functions so linker can garbage collect # -fdata-sections: split up data so linker can garbage collect -COMMON_CFLAGS += -Os -Wall -DGEKKO_U -D__wiiu__ -mrvl -mcpu=750 -meabi -mhard-float -fno-common -msdata=none -memb -ffunction-sections -fdata-sections +COMMON_CFLAGS += -Os -Wall -DGEKKO_U -D__wiiu__ -D__WIIU__ -mrvl -mcpu=750 -meabi -mhard-float -fno-common -msdata=none -memb -ffunction-sections -fdata-sections # -x c: compile as c code @@ -81,6 +81,11 @@ ifeq ($(DO_LOGGING), 1) CFLAGS += -D__LOGGING__ CXXFLAGS += -D__LOGGING__ endif + +ifeq ($(USE_WUT), 1) + CFLAGS += -D__WUT__ + CXXFLAGS += -D__WUT__ +endif ASFLAGS += diff --git a/plugins/memory_info/makefile.mk b/plugins/memory_info/makefile.mk index f2e0000..6012d38 100644 --- a/plugins/memory_info/makefile.mk +++ b/plugins/memory_info/makefile.mk @@ -4,6 +4,9 @@ DO_LOGGING := 1 # Non WUT plugins need to wrap the malloc functions. WRAP_MALLOC := 1 +# Sets the "-D__WUT__" compiling flag +USE_WUT := 0 + # Target filename TARGET := $(notdir $(CURDIR)).mod diff --git a/plugins/nnu_patcher/Makefile b/plugins/nnu_patcher/Makefile index f52cd9e..a5d6788 100644 --- a/plugins/nnu_patcher/Makefile +++ b/plugins/nnu_patcher/Makefile @@ -66,7 +66,7 @@ include $(WUPSDIR)/plugin_makefile.mk # -memb: enable embedded application specific compilation # -ffunction-sections: split up functions so linker can garbage collect # -fdata-sections: split up data so linker can garbage collect -COMMON_CFLAGS += -Os -Wall -DGEKKO_U -D__wiiu__ -mrvl -mcpu=750 -meabi -mhard-float -fno-common -msdata=none -memb -ffunction-sections -fdata-sections +COMMON_CFLAGS += -Os -Wall -DGEKKO_U -D__wiiu__ -D__WIIU__ -mrvl -mcpu=750 -meabi -mhard-float -fno-common -msdata=none -memb -ffunction-sections -fdata-sections # -x c: compile as c code @@ -81,6 +81,11 @@ ifeq ($(DO_LOGGING), 1) CFLAGS += -D__LOGGING__ CXXFLAGS += -D__LOGGING__ endif + +ifeq ($(USE_WUT), 1) + CFLAGS += -D__WUT__ + CXXFLAGS += -D__WUT__ +endif ASFLAGS += diff --git a/plugins/nnu_patcher/makefile.mk b/plugins/nnu_patcher/makefile.mk index f2e0000..6012d38 100644 --- a/plugins/nnu_patcher/makefile.mk +++ b/plugins/nnu_patcher/makefile.mk @@ -4,6 +4,9 @@ DO_LOGGING := 1 # Non WUT plugins need to wrap the malloc functions. WRAP_MALLOC := 1 +# Sets the "-D__WUT__" compiling flag +USE_WUT := 0 + # Target filename TARGET := $(notdir $(CURDIR)).mod diff --git a/plugins/overlay/Makefile b/plugins/overlay/Makefile index f52cd9e..a5d6788 100644 --- a/plugins/overlay/Makefile +++ b/plugins/overlay/Makefile @@ -66,7 +66,7 @@ include $(WUPSDIR)/plugin_makefile.mk # -memb: enable embedded application specific compilation # -ffunction-sections: split up functions so linker can garbage collect # -fdata-sections: split up data so linker can garbage collect -COMMON_CFLAGS += -Os -Wall -DGEKKO_U -D__wiiu__ -mrvl -mcpu=750 -meabi -mhard-float -fno-common -msdata=none -memb -ffunction-sections -fdata-sections +COMMON_CFLAGS += -Os -Wall -DGEKKO_U -D__wiiu__ -D__WIIU__ -mrvl -mcpu=750 -meabi -mhard-float -fno-common -msdata=none -memb -ffunction-sections -fdata-sections # -x c: compile as c code @@ -81,6 +81,11 @@ ifeq ($(DO_LOGGING), 1) CFLAGS += -D__LOGGING__ CXXFLAGS += -D__LOGGING__ endif + +ifeq ($(USE_WUT), 1) + CFLAGS += -D__WUT__ + CXXFLAGS += -D__WUT__ +endif ASFLAGS += diff --git a/plugins/overlay/makefile.mk b/plugins/overlay/makefile.mk index f2e0000..6012d38 100644 --- a/plugins/overlay/makefile.mk +++ b/plugins/overlay/makefile.mk @@ -4,6 +4,9 @@ DO_LOGGING := 1 # Non WUT plugins need to wrap the malloc functions. WRAP_MALLOC := 1 +# Sets the "-D__WUT__" compiling flag +USE_WUT := 0 + # Target filename TARGET := $(notdir $(CURDIR)).mod diff --git a/plugins/padcon/Makefile b/plugins/padcon/Makefile index f52cd9e..a5d6788 100644 --- a/plugins/padcon/Makefile +++ b/plugins/padcon/Makefile @@ -66,7 +66,7 @@ include $(WUPSDIR)/plugin_makefile.mk # -memb: enable embedded application specific compilation # -ffunction-sections: split up functions so linker can garbage collect # -fdata-sections: split up data so linker can garbage collect -COMMON_CFLAGS += -Os -Wall -DGEKKO_U -D__wiiu__ -mrvl -mcpu=750 -meabi -mhard-float -fno-common -msdata=none -memb -ffunction-sections -fdata-sections +COMMON_CFLAGS += -Os -Wall -DGEKKO_U -D__wiiu__ -D__WIIU__ -mrvl -mcpu=750 -meabi -mhard-float -fno-common -msdata=none -memb -ffunction-sections -fdata-sections # -x c: compile as c code @@ -81,6 +81,11 @@ ifeq ($(DO_LOGGING), 1) CFLAGS += -D__LOGGING__ CXXFLAGS += -D__LOGGING__ endif + +ifeq ($(USE_WUT), 1) + CFLAGS += -D__WUT__ + CXXFLAGS += -D__WUT__ +endif ASFLAGS += diff --git a/plugins/padcon/makefile.mk b/plugins/padcon/makefile.mk index dd90dbc..970431d 100644 --- a/plugins/padcon/makefile.mk +++ b/plugins/padcon/makefile.mk @@ -4,6 +4,9 @@ DO_LOGGING := 1 # Non WUT plugins need to wrap the malloc functions. WRAP_MALLOC := 1 +# Sets the "-D__WUT__" compiling flag +USE_WUT := 0 + # Target filename TARGET := $(notdir $(CURDIR)).mod diff --git a/plugins/screenshot/Makefile b/plugins/screenshot/Makefile index f52cd9e..a5d6788 100644 --- a/plugins/screenshot/Makefile +++ b/plugins/screenshot/Makefile @@ -66,7 +66,7 @@ include $(WUPSDIR)/plugin_makefile.mk # -memb: enable embedded application specific compilation # -ffunction-sections: split up functions so linker can garbage collect # -fdata-sections: split up data so linker can garbage collect -COMMON_CFLAGS += -Os -Wall -DGEKKO_U -D__wiiu__ -mrvl -mcpu=750 -meabi -mhard-float -fno-common -msdata=none -memb -ffunction-sections -fdata-sections +COMMON_CFLAGS += -Os -Wall -DGEKKO_U -D__wiiu__ -D__WIIU__ -mrvl -mcpu=750 -meabi -mhard-float -fno-common -msdata=none -memb -ffunction-sections -fdata-sections # -x c: compile as c code @@ -81,6 +81,11 @@ ifeq ($(DO_LOGGING), 1) CFLAGS += -D__LOGGING__ CXXFLAGS += -D__LOGGING__ endif + +ifeq ($(USE_WUT), 1) + CFLAGS += -D__WUT__ + CXXFLAGS += -D__WUT__ +endif ASFLAGS += diff --git a/plugins/screenshot/makefile.mk b/plugins/screenshot/makefile.mk index 473e84b..ef43c0e 100644 --- a/plugins/screenshot/makefile.mk +++ b/plugins/screenshot/makefile.mk @@ -4,6 +4,9 @@ DO_LOGGING := 1 # Non WUT plugins need to wrap the malloc functions. WRAP_MALLOC := 1 +# Sets the "-D__WUT__" compiling flag +USE_WUT := 0 + # Target filename TARGET := $(notdir $(CURDIR)).mod diff --git a/plugins/sdcafiine/Makefile b/plugins/sdcafiine/Makefile index f52cd9e..a5d6788 100644 --- a/plugins/sdcafiine/Makefile +++ b/plugins/sdcafiine/Makefile @@ -66,7 +66,7 @@ include $(WUPSDIR)/plugin_makefile.mk # -memb: enable embedded application specific compilation # -ffunction-sections: split up functions so linker can garbage collect # -fdata-sections: split up data so linker can garbage collect -COMMON_CFLAGS += -Os -Wall -DGEKKO_U -D__wiiu__ -mrvl -mcpu=750 -meabi -mhard-float -fno-common -msdata=none -memb -ffunction-sections -fdata-sections +COMMON_CFLAGS += -Os -Wall -DGEKKO_U -D__wiiu__ -D__WIIU__ -mrvl -mcpu=750 -meabi -mhard-float -fno-common -msdata=none -memb -ffunction-sections -fdata-sections # -x c: compile as c code @@ -81,6 +81,11 @@ ifeq ($(DO_LOGGING), 1) CFLAGS += -D__LOGGING__ CXXFLAGS += -D__LOGGING__ endif + +ifeq ($(USE_WUT), 1) + CFLAGS += -D__WUT__ + CXXFLAGS += -D__WUT__ +endif ASFLAGS += diff --git a/plugins/sdcafiine/makefile.mk b/plugins/sdcafiine/makefile.mk index 1d85cd5..d535fb5 100644 --- a/plugins/sdcafiine/makefile.mk +++ b/plugins/sdcafiine/makefile.mk @@ -4,6 +4,9 @@ DO_LOGGING := 1 # Non WUT plugins need to wrap the malloc functions. WRAP_MALLOC := 1 +# Sets the "-D__WUT__" compiling flag +USE_WUT := 0 + # Target filename TARGET := $(notdir $(CURDIR)).mod diff --git a/plugins/swipswapme/Makefile b/plugins/swipswapme/Makefile index f52cd9e..a5d6788 100644 --- a/plugins/swipswapme/Makefile +++ b/plugins/swipswapme/Makefile @@ -66,7 +66,7 @@ include $(WUPSDIR)/plugin_makefile.mk # -memb: enable embedded application specific compilation # -ffunction-sections: split up functions so linker can garbage collect # -fdata-sections: split up data so linker can garbage collect -COMMON_CFLAGS += -Os -Wall -DGEKKO_U -D__wiiu__ -mrvl -mcpu=750 -meabi -mhard-float -fno-common -msdata=none -memb -ffunction-sections -fdata-sections +COMMON_CFLAGS += -Os -Wall -DGEKKO_U -D__wiiu__ -D__WIIU__ -mrvl -mcpu=750 -meabi -mhard-float -fno-common -msdata=none -memb -ffunction-sections -fdata-sections # -x c: compile as c code @@ -81,6 +81,11 @@ ifeq ($(DO_LOGGING), 1) CFLAGS += -D__LOGGING__ CXXFLAGS += -D__LOGGING__ endif + +ifeq ($(USE_WUT), 1) + CFLAGS += -D__WUT__ + CXXFLAGS += -D__WUT__ +endif ASFLAGS += diff --git a/plugins/swipswapme/makefile.mk b/plugins/swipswapme/makefile.mk index eadc504..7ed28d3 100644 --- a/plugins/swipswapme/makefile.mk +++ b/plugins/swipswapme/makefile.mk @@ -4,6 +4,9 @@ DO_LOGGING := 1 # Non WUT plugins need to wrap the malloc functions. WRAP_MALLOC := 1 +# Sets the "-D__WUT__" compiling flag +USE_WUT := 0 + # Target filename TARGET := $(notdir $(CURDIR)).mod