1###############################################################################
2# Makefile for KBD demo
3#
4# Copyright 2007 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# QUICK START INSTRUCTIONS
15# Type "make NDEBUG=TRUE" to build OPTIMIZED versions of all tests
16#
17# To add another demo
18# 1. add the .c files to CSRCS to make sure they are built
19# 2. add the binary name (no suffix) to BINNAMES
20# 3. add a dependency rule for this executable at the bottom of this file
21##################################
22
23
24# All modules have "setup" and "build" as targets.  System libraries
25# and demo programs also have an "install" target that copies the compiled
26# binaries to the binary tree (/$(ARCH_TARGET)).
27
28all: 	setup build install
29
30
31# commondefs must be included near the top so that all common variables
32# will be defined before their use.
33
34include $(REVOLUTION_SDK_ROOT)/build/buildtools/commondefs
35
36
37# module name should be set to the name of this subdirectory
38# DEMO = TRUE indicates that this module resides under the "demos" subtree.
39# The list of selectable paths can be found in modulerules.
40
41MODULENAME	= kbddemo
42DEMO		= TRUE
43
44# Add KBD into REVOLUTION_LIBS; add hid and usbcmn for PPC HID driver
45
46REVOLUTION_LIBS	+=  $(INSTALL_ROOT)/lib/kbd$(LIBSUFFIX) \
47		    $(INSTALL_ROOT)/lib/usbkbd$(LIBSUFFIX)
48#		    $(INSTALL_ROOT)/lib/hid$(LIBSUFFIX) \
49#		    $(INSTALL_ROOT)/lib/usbcmn$(LIBSUFFIX)
50
51# CSRCS lists all C files that should be built
52# The makefile determines which objects are linked into which binaries
53# based on the dependencies you fill in at the bottom of this file
54
55CSRCS		= kbdLowLevel.c \
56		  kbdUTF8.c \
57		  kbdLowLevelSync.c \
58		  kbdUTF8Sync.c
59
60# BINNAMES lists all binaries that will be linked.  Note that no suffix is
61# required, as that will depend on whether this is a DEBUG build or not.
62# The final name of the binaries will be $(BINNAME)$(BINSUFFIX)
63
64BINNAMES 	= kbdLowLevel \
65		  kbdUTF8 \
66		  kbdLowLevelSync \
67		  kbdUTF8Sync
68
69# defining a linker command file will have the build system generate it
70# automatically and include it on the linker invocation line
71
72LCF_FILE	= $(INC_ROOT)/revolution/eppc.$(ARCH_TARGET).lcf
73
74# modulerules contains the rules that will use the above variables
75# and dependencies below to construct the binaries specified.
76
77include $(REVOLUTION_SDK_ROOT)/build/buildtools/modulerules
78
79# Dependencies for the binaries listed in BINNAMES should come here
80# They are your typical makefile rule, with extra variables to ensure
81# that the names and paths match up.
82# $(FULLBIN_ROOT) is the location of the local bin directory
83# $(BINSUFFIX) depends on whether this is a debug build or not
84# $(REVOLUTION_LIBS) includes all the Revolution libraries.
85
86$(FULLBIN_ROOT)/kbdLowLevel$(BINSUFFIX):	kbdLowLevel.o \
87					$(REVOLUTION_LIBS)
88
89$(FULLBIN_ROOT)/kbdUTF8$(BINSUFFIX):	kbdUTF8.o \
90					$(REVOLUTION_LIBS)
91
92$(FULLBIN_ROOT)/kbdLowLevelSync$(BINSUFFIX):	kbdLowLevelSync.o \
93					$(REVOLUTION_LIBS)
94
95$(FULLBIN_ROOT)/kbdUTF8Sync$(BINSUFFIX):	kbdUTF8Sync.o \
96					$(REVOLUTION_LIBS)
97
98#======== End of makefile ========#
99