mirror of
https://github.com/wiiu-env/wut.git
synced 2024-12-05 03:04:16 +01:00
wut.mk: add stubs, add deprecation warnings
This commit is contained in:
parent
49c0295a84
commit
6e08d7791e
@ -8,6 +8,7 @@
|
||||
- `WUT_ROOT` should no longer be defined in the user's environment, and will be set to `$DEVKITPRO/wut` internally. CMake lists and makefiles that use `$WUT_ROOT/share` to find `wut.mk` or `wut.toolchain.cmake` should be changed to `$DEVKITPRO/wut/share`.
|
||||
- All of wut's static libraries (`-lcoreinit`, `-lwhb`, etc.) have been merged into a single `libwut`, which gets automatically linked in for all builds. While empty static libraries have been provided for CMake builds to ease the transition, these will be removed eventually. Applications should remove the build flags to link any of wut's libraries.
|
||||
- Similarly, wut's build configuration options (devoptab, wutmalloc, newlib) are now integrated into `libwut`. For CMake builds, the `wut_enable_*` macros will now log a deprecation warning, and should be removed as soon as possible.
|
||||
- Use of `wut.mk` as a build system is now deprecated. Applications should move to `wut_rules` and devkitPro-style makefiles, such as those in [the samples](/samples/make). `wut.mk` will not be updated further, and will be removed in a future release.
|
||||
|
||||
###### Other changes
|
||||
- Builds refactored: wut now uses Makefiles to build itself, as well as providing a devkitPro-style `wut_rules` file - see the `samples/make` folder. The cmake samples are now in `samples/cmake`.
|
||||
|
27
share/wut.mk
27
share/wut.mk
@ -8,6 +8,11 @@ ifneq ($(strip $(V)), 1)
|
||||
Q ?= @
|
||||
endif
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# wut 1.0.0-beta9 and later ships wut_rules, in line with normal devkitPro
|
||||
# makefiles - please use that!
|
||||
$(warning "Using wut.mk is deprecated, and will be removed in a future release! Please switch to wut_rules as soon as possible - see https://github.com/devkitPro/wut/blob/master/samples/make/helloworld/Makefile for an example.")
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Toolchain includes and path setup
|
||||
|
||||
@ -45,9 +50,9 @@ WUT_CFLAGS := -mcpu=750 -meabi -mhard-float -isystem $(WUT_ROOT)/include
|
||||
# Defines to tell code about this environment
|
||||
WUT_CFLAGS += -D__WIIU__ -D__WUT__ -D__WUT_MAKEFILE__
|
||||
# keep relocations, use wut linker script
|
||||
WUT_LDFLAGS := -Wl,-q -Wl,-z,nocopyreloc -T $(WUT_ROOT)/share/wut.ld
|
||||
WUT_LDFLAGS := -specs=$(WUT_ROOT)/share/wut.specs
|
||||
# Path for wut libraries, Always link against coreinit
|
||||
WUT_LDFLAGS += -L$(WUT_ROOT)/lib -lcoreinit
|
||||
WUT_LDFLAGS += -L$(WUT_ROOT)/lib -L$(WUT_ROOT)/lib/stubs -lwut
|
||||
|
||||
# Append that to user-provided cflags and others
|
||||
CFLAGS += $(WUT_CFLAGS)
|
||||
@ -67,8 +72,8 @@ ifneq ($(strip $(WUT_NO_LDGROUPS)), 1)
|
||||
endif
|
||||
|
||||
# RPX and RPL need slightly different crts (init code)
|
||||
%.rpx: LDFLAGS += -lwutcrt
|
||||
%.rpl: LDFLAGS += -lwutcrtrpl
|
||||
%.rpx: LDFLAGS += -specs=$(WUT_ROOT)/share/rpx.specs
|
||||
%.rpl: LDFLAGS += -specs=$(WUT_ROOT)/share/rpl.specs
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Linking bits
|
||||
@ -157,24 +162,28 @@ endif
|
||||
# Cafe heap to libc malloc.
|
||||
# To use:
|
||||
# LDFLAGS += $(WUT_NEWLIB_LDFLAGS)
|
||||
WUT_NEWLIB_LDFLAGS := -Wl,--whole-archive -lwutnewlib -Wl,--no-whole-archive
|
||||
#WUT_NEWLIB_LDFLAGS := -Wl,--whole-archive -lwutnewlib -Wl,--no-whole-archive
|
||||
WUT_NEWLIB_LDFLAGS = $(warning "WUT_NEWLIB_LDFLAGS is deprecated and does nothing")
|
||||
|
||||
# Wrap calls to malloc and friends with calls to Cafe's MEMDefaultHeap
|
||||
# functions, effectivley bypassing the libc heap for most allocations. Forces
|
||||
# libc heap to be very small.
|
||||
# To use:
|
||||
# LDFLAGS += $(WUT_MALLOC_LDFLAGS)
|
||||
WUT_MALLOC_LDFLAGS := -Wl,--whole-archive -lwutmalloc -Wl,--no-whole-archive
|
||||
#WUT_MALLOC_LDFLAGS := -Wl,--whole-archive -lwutmalloc -Wl,--no-whole-archive
|
||||
WUT_MALLOC_LDFLAGS = $(warning "WUT_MALLOC_LDFLAGS is deprecated and does nothing")
|
||||
|
||||
# Enable libstdc++ support. Allows use of C++11 threads, along with other C++
|
||||
# functionality. Make sure to use WUT_NEWLIB_LDFLAGS too.
|
||||
# To use:
|
||||
# LDFLAGS += $(WUT_STDCPP_LDFLAGS)
|
||||
WUT_STDCPP_LDFLAGS := -lstdc++
|
||||
WUT_STDCPP_LDFLAGS += -Wl,--whole-archive -lwutstdc++ -Wl,--no-whole-archive
|
||||
#WUT_STDCPP_LDFLAGS := -lstdc++
|
||||
#WUT_STDCPP_LDFLAGS += -Wl,--whole-archive -lwutstdc++ -Wl,--no-whole-archive
|
||||
WUT_STDCPP_LDFLAGS = $(warning "WUT_STDCPP_LDFLAGS is deprecated and does nothing")
|
||||
|
||||
# Simple devoptab to allow filesystem access. Mounts the SD alongside the default
|
||||
# Cafe mounts (/vol/content etc.)
|
||||
# To use:
|
||||
# LDFLAGS += $(WUT_DEVOPTAB_LDFLAGS)
|
||||
WUT_DEVOPTAB_LDFLAGS := -Wl,--whole-archive -lwutdevoptab -Wl,--no-whole-archive
|
||||
#WUT_DEVOPTAB_LDFLAGS := -Wl,--whole-archive -lwutdevoptab -Wl,--no-whole-archive
|
||||
WUT_DEVOPTAB_LDFLAGS = $(warning "WUT_DEVOPTAB_LDFLAGS is deprecated and does nothing")
|
||||
|
Loading…
Reference in New Issue
Block a user