2011-09-15 20:45:48 +00:00
|
|
|
--
|
|
|
|
-- tests/actions/make/test_wiidev.lua
|
|
|
|
-- Tests for Wii homebrew support in makefiles.
|
|
|
|
-- Copyright (c) 2011 Jason Perkins and the Premake project
|
|
|
|
--
|
|
|
|
|
|
|
|
T.make_wiidev = { }
|
|
|
|
local suite = T.make_wiidev
|
|
|
|
local make = premake.make
|
|
|
|
local cpp = premake.make.cpp
|
|
|
|
|
|
|
|
local sln, prj, cfg
|
|
|
|
|
|
|
|
function suite.setup()
|
|
|
|
_ACTION = "gmake"
|
|
|
|
|
|
|
|
sln = solution("MySolution")
|
|
|
|
configurations { "Debug", "Release" }
|
|
|
|
platforms { "WiiDev" }
|
|
|
|
|
|
|
|
prj = project("MyProject")
|
|
|
|
|
|
|
|
premake.bake.buildconfigs()
|
|
|
|
cfg = premake.getconfig(prj, "Debug", "WiiDev")
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Make sure that the Wii-specific flags are passed to the tools.
|
|
|
|
--
|
|
|
|
|
|
|
|
function suite.writesCorrectFlags()
|
|
|
|
cpp.flags(cfg, premake.gcc)
|
|
|
|
test.capture [[
|
|
|
|
CPPFLAGS += -MMD -MP -I$(LIBOGC_INC) $(MACHDEP) -MP $(DEFINES) $(INCLUDES)
|
|
|
|
CFLAGS += $(CPPFLAGS) $(ARCH)
|
|
|
|
CXXFLAGS += $(CFLAGS)
|
2011-09-19 20:45:49 +00:00
|
|
|
LDFLAGS += -s -L$(LIBOGC_LIB) $(MACHDEP)
|
2011-09-15 20:45:48 +00:00
|
|
|
RESFLAGS += $(DEFINES) $(INCLUDES)
|
|
|
|
]]
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Make sure the dev kit include is written to each Wii build configuration.
|
|
|
|
--
|
|
|
|
|
|
|
|
function suite.writesIncludeBlock()
|
|
|
|
make.settings(cfg, premake.gcc)
|
|
|
|
test.capture [[
|
|
|
|
ifeq ($(strip $(DEVKITPPC)),)
|
|
|
|
$(error "DEVKITPPC environment variable is not set")'
|
|
|
|
endif
|
|
|
|
include $(DEVKITPPC)/wii_rules'
|
|
|
|
]]
|
|
|
|
end
|