First release with sources
164
Makefile
Normal file
@ -0,0 +1,164 @@
|
||||
#---------------------------------------------------------------------------------
|
||||
# Clear the implicit built in rules
|
||||
#---------------------------------------------------------------------------------
|
||||
.SUFFIXES:
|
||||
#---------------------------------------------------------------------------------
|
||||
ifeq ($(strip $(DEVKITPPC)),)
|
||||
$(error "Please set DEVKITPPC in your environment. export DEVKITPPC=<path to>devkitPPC")
|
||||
endif
|
||||
|
||||
include $(DEVKITPPC)/wii_rules
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# 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
|
||||
# INCLUDES is a list of directories containing extra header files
|
||||
#---------------------------------------------------------------------------------
|
||||
TARGET := $(notdir $(CURDIR))
|
||||
BUILD := build
|
||||
SOURCES := source source/game source/platform
|
||||
DATA := data/fonts data/images data/sounds data/wiimote
|
||||
INCLUDES := source source/game source/platform
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# options for code generation
|
||||
#---------------------------------------------------------------------------------
|
||||
|
||||
CFLAGS = -g -O2 -Wall $(MACHDEP) $(INCLUDE) `freetype-config --cflags`
|
||||
CXXFLAGS = $(CFLAGS)
|
||||
|
||||
LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# any extra libraries we wish to link with the project
|
||||
#---------------------------------------------------------------------------------
|
||||
LIBS := -lgrr `freetype-config --libs` -lpng -ljpeg -lfat -lz -lbz2 -lwiiuse -lbte -lasnd -logc -lm
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# list of directories containing libraries, this must be the top level containing
|
||||
# include and lib
|
||||
#---------------------------------------------------------------------------------
|
||||
LIBDIRS := $(PORTLIBS)
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# 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 VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
|
||||
$(foreach dir,$(DATA),$(CURDIR)/$(dir))
|
||||
|
||||
export DEPSDIR := $(CURDIR)/$(BUILD)
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# automatically build a list of object files for our project
|
||||
#---------------------------------------------------------------------------------
|
||||
CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
|
||||
CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
|
||||
sFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
|
||||
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_SOURCES := $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(sFILES:.s=.o) $(SFILES:.S=.o)
|
||||
export OFILES := $(OFILES_BIN) $(OFILES_SOURCES)
|
||||
|
||||
export HFILES := $(addsuffix .h,$(subst .,_,$(BINFILES)))
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# build a list of include paths
|
||||
#---------------------------------------------------------------------------------
|
||||
INCLUDEDIR := $(foreach dir,$(LIBDIRS),$(dir $(wildcard $(dir)/include/*/)))
|
||||
export INCLUDE := $(foreach dir,$(INCLUDES), -iquote $(CURDIR)/$(dir)) \
|
||||
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
|
||||
$(foreach dir,$(INCLUDEDIR),-I$(dir)) \
|
||||
-I$(CURDIR)/include \
|
||||
-I$(CURDIR)/$(BUILD) \
|
||||
-I$(LIBOGC_INC)
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# build a list of library paths
|
||||
#---------------------------------------------------------------------------------
|
||||
export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib) \
|
||||
$(foreach dir,$(PORTLIBS),-L$(dir)/lib) \
|
||||
-L$(LIBOGC_LIB)
|
||||
|
||||
export OUTPUT := $(CURDIR)/$(TARGET)
|
||||
.PHONY: $(BUILD) clean
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
$(BUILD):
|
||||
@[ -d $@ ] || mkdir -p $@
|
||||
@make --no-print-directory -C $(BUILD) -f $(CURDIR)/Makefile
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
clean:
|
||||
@echo clean ...
|
||||
@rm -fr $(BUILD) $(OUTPUT).elf $(OUTPUT).dol
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
run:
|
||||
wiiload $(TARGET).dol
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
else
|
||||
|
||||
DEPENDS := $(OFILES:.o=.d)
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# main targets
|
||||
#---------------------------------------------------------------------------------
|
||||
$(OUTPUT).dol: $(OUTPUT).elf
|
||||
$(OUTPUT).elf: $(OFILES)
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# This rule links in binary data with the .jpg extension
|
||||
#---------------------------------------------------------------------------------
|
||||
%.jpg.o : %.jpg
|
||||
#---------------------------------------------------------------------------------
|
||||
@echo $(notdir $<)
|
||||
$(bin2o)
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# This rule links in binary data with the .png extension
|
||||
#---------------------------------------------------------------------------------
|
||||
%.png.o : %.png
|
||||
#---------------------------------------------------------------------------------
|
||||
@echo $(notdir $<)
|
||||
$(bin2o)
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# This rule links in binary data with the .ttf extension
|
||||
#---------------------------------------------------------------------------------
|
||||
%.ttf.o : %.ttf
|
||||
#---------------------------------------------------------------------------------
|
||||
@echo $(notdir $<)
|
||||
$(bin2o)
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# This rule links in binary data with the .raw extension
|
||||
#---------------------------------------------------------------------------------
|
||||
%.raw.o : %.raw
|
||||
#---------------------------------------------------------------------------------
|
||||
@echo $(notdir $<)
|
||||
$(bin2o)
|
||||
-include $(DEPENDS)
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
endif
|
||||
#---------------------------------------------------------------------------------
|
BIN
data/fonts/FreeSerif.ttf
Normal file
BIN
data/fonts/xped.ttf
Normal file
BIN
data/images/armorbattle_blipbright.png
Normal file
After Width: | Height: | Size: 346 B |
BIN
data/images/armorbattle_blipdim.png
Normal file
After Width: | Height: | Size: 268 B |
BIN
data/images/armorbattle_digits.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
data/images/armorbattle_poweroff.png
Normal file
After Width: | Height: | Size: 264 B |
BIN
data/images/armorbattle_poweron.png
Normal file
After Width: | Height: | Size: 255 B |
BIN
data/images/armorbattle_screen.png
Normal file
After Width: | Height: | Size: 25 KiB |
BIN
data/images/autorace_aimcenter.png
Normal file
After Width: | Height: | Size: 958 B |
BIN
data/images/autorace_aimleft.png
Normal file
After Width: | Height: | Size: 852 B |
BIN
data/images/autorace_aimright.png
Normal file
After Width: | Height: | Size: 853 B |
BIN
data/images/autorace_gear1.png
Normal file
After Width: | Height: | Size: 219 B |
BIN
data/images/autorace_gear2.png
Normal file
After Width: | Height: | Size: 221 B |
BIN
data/images/autorace_gear3.png
Normal file
After Width: | Height: | Size: 221 B |
BIN
data/images/autorace_gear4.png
Normal file
After Width: | Height: | Size: 225 B |
BIN
data/images/autorace_poweroff.png
Normal file
After Width: | Height: | Size: 204 B |
BIN
data/images/autorace_poweron.png
Normal file
After Width: | Height: | Size: 207 B |
BIN
data/images/autorace_screen.png
Normal file
After Width: | Height: | Size: 9.8 KiB |
BIN
data/images/baseball_blip.png
Normal file
After Width: | Height: | Size: 151 B |
BIN
data/images/baseball_brightdigits.png
Normal file
After Width: | Height: | Size: 339 B |
BIN
data/images/baseball_dimdigits.png
Normal file
After Width: | Height: | Size: 364 B |
BIN
data/images/baseball_poweroff.png
Normal file
After Width: | Height: | Size: 188 B |
BIN
data/images/baseball_pro1.png
Normal file
After Width: | Height: | Size: 188 B |
BIN
data/images/baseball_pro2.png
Normal file
After Width: | Height: | Size: 188 B |
BIN
data/images/baseball_screen.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
data/images/basketball_screen.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
data/images/cover.png
Normal file
After Width: | Height: | Size: 50 KiB |
BIN
data/images/digits_f.png
Normal file
After Width: | Height: | Size: 371 B |
BIN
data/images/football2_poweroff.png
Normal file
After Width: | Height: | Size: 219 B |
BIN
data/images/football2_pro1.png
Normal file
After Width: | Height: | Size: 219 B |
BIN
data/images/football2_pro2.png
Normal file
After Width: | Height: | Size: 218 B |
BIN
data/images/football2_screen.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
data/images/football_poweroff.png
Normal file
After Width: | Height: | Size: 307 B |
BIN
data/images/football_pro1.png
Normal file
After Width: | Height: | Size: 289 B |
BIN
data/images/football_pro2.png
Normal file
After Width: | Height: | Size: 284 B |
BIN
data/images/football_screen.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
data/images/grrlib_logo.png
Normal file
After Width: | Height: | Size: 63 KiB |
BIN
data/images/hockey_screen.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
data/images/hockeyca_screen.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
data/images/nodisp_screen.png
Normal file
After Width: | Height: | Size: 7.3 KiB |
BIN
data/images/o_blip.png
Normal file
After Width: | Height: | Size: 178 B |
BIN
data/images/poweroff_a.png
Normal file
After Width: | Height: | Size: 604 B |
BIN
data/images/skislalom_aimcenter.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
data/images/skislalom_aimleft.png
Normal file
After Width: | Height: | Size: 1014 B |
BIN
data/images/skislalom_aimright.png
Normal file
After Width: | Height: | Size: 1014 B |
BIN
data/images/skislalom_gear1.png
Normal file
After Width: | Height: | Size: 227 B |
BIN
data/images/skislalom_gear2.png
Normal file
After Width: | Height: | Size: 224 B |
BIN
data/images/skislalom_gear3.png
Normal file
After Width: | Height: | Size: 223 B |
BIN
data/images/skislalom_gear4.png
Normal file
After Width: | Height: | Size: 225 B |
BIN
data/images/skislalom_gearknob.png
Normal file
After Width: | Height: | Size: 187 B |
BIN
data/images/skislalom_powerknob.png
Normal file
After Width: | Height: | Size: 187 B |
BIN
data/images/skislalom_poweroff.png
Normal file
After Width: | Height: | Size: 207 B |
BIN
data/images/skislalom_poweron.png
Normal file
After Width: | Height: | Size: 217 B |
BIN
data/images/skislalom_screen.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
data/images/soccer_screen.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
data/images/spacealert_aimcenter.png
Normal file
After Width: | Height: | Size: 387 B |
BIN
data/images/spacealert_aimleft.png
Normal file
After Width: | Height: | Size: 385 B |
BIN
data/images/spacealert_aimright.png
Normal file
After Width: | Height: | Size: 382 B |
BIN
data/images/spacealert_poweroff.png
Normal file
After Width: | Height: | Size: 206 B |
BIN
data/images/spacealert_poweron.png
Normal file
After Width: | Height: | Size: 208 B |
BIN
data/images/spacealert_screen.png
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
data/images/subchase_blipbright.png
Normal file
After Width: | Height: | Size: 174 B |
BIN
data/images/subchase_blipdim.png
Normal file
After Width: | Height: | Size: 188 B |
BIN
data/images/subchase_digits.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
data/images/subchase_poweroff.png
Normal file
After Width: | Height: | Size: 263 B |
BIN
data/images/subchase_poweron.png
Normal file
After Width: | Height: | Size: 261 B |
BIN
data/images/subchase_screen.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
data/images/v_blip.png
Normal file
After Width: | Height: | Size: 198 B |