1############################################################################### 2# Template makefile for new modules 3# 4# Copyright (C) 2005-2006 Nintendo. All rights reserved. 5# 6# These coded instructions, statements, and computer programs contain 7# proprietary information of Nintendo of America Inc. and/or Nintendo 8# Company Ltd., and are protected by Federal copyright law. They may 9# not be disclosed to third parties or copied or duplicated in any form, 10# in whole or in part, without the prior written consent of Nintendo. 11############################################################################### 12 13############################################################################### 14# commondefs must be included near the top so that all common variables 15# will be defined before their use. 16############################################################################### 17 18include $(REVOLUTION_SDK_ROOT)/build/buildtools/commondefs 19 20############################################################################### 21# The following defines force the commondef defines to be directory independent 22############################################################################### 23 24MODULENAME = 25MODULE_ROOT = . 26DEMO = TRUE 27DEMO_ROOT = . 28SAMPLE = 29LINCLUDES = -I./include 30 31############################################################################### 32# Library building 33# LIBNAME specifies the name of the library. No suffix is required, as 34# that will depend on whether this is a DEBUG build or not. 35# The final name of the library will be $(LIBNAME)$(LIBSUFFIX) 36# 37# CLIBSRCS specifies all C files that are built and linked into the library. 38# ASMLIBSRCS are all assembly files that will be built and linked into the lib. 39############################################################################### 40 41LIBNAME = samplelib 42CLIBSRCS = samplelib.c 43ASMLIBSRCS = 44 45############################################################################### 46# Binary building 47# BINNAMES lists all binaries that will be linked. Note that no suffix is 48# required, as that will depend on whether this is a DEBUG build or not. 49# The final name of the binaries will be $(BINNAME)$(BINSUFFIX) 50# 51# CSRCS lists all C files that should be built 52# ASMSRCS lists all assembly files that should be built. 53# The makefile determines which objects are linked into which binaries 54# based on the dependencies you fill in at the bottom of this file 55############################################################################### 56 57BINNAMES = samplebin 58CSRCS = samplebin.c 59ASMSRCS = 60 61############################################################################### 62# All modules have "setup" and "build" as targets. System libraries 63# and demo programs also have an "install" target that copies the compiled 64# binaries to the binary tree (/revolution/$(ARCH_TARGET)). 65############################################################################### 66 67all: 68 $(MAKE) setup 69 $(MAKE) build 70 71############################################################################### 72# Include LCF file 73############################################################################### 74ifdef EPPC 75LCF_FILE = $(INC_ROOT)/revolution/eppc.$(ARCH_TARGET).lcf 76endif 77 78############################################################################### 79# modulerules contains the rules that will use the above variables 80# and dependencies below to construct the library and binaries specified. 81############################################################################### 82include $(REVOLUTION_SDK_ROOT)/build/buildtools/modulerules 83 84############################################################################### 85# Dependencies for the binaries listed in BINNAMES should come here 86# They are your typical makefile rule, with extra variables to ensure 87# that the names and paths match up. 88# $(FULLBIN_ROOT) is the location of the local bin directory 89# $(BINSUFFIX) depends on whether this is a debug build or not 90# $(LOCALLIB_ROOT) points at the local lib directory 91# $(REVOLUTION_LIBS) includes all the Revolution libraries. 92############################################################################### 93$(FULLBIN_ROOT)/samplebin$(BINSUFFIX): samplebin.o \ 94 lib/$(ARCH_TARGET)/samplelib$(LIBSUFFIX) \ 95 $(REVOLUTION_LIBS) 96