1###############################################################################
2# Makefile for CatLog
3#
4# Copyright 2013 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# This makefile must set the relative depth to the build directory
15# using only "..", without a trailing slash
16
17MODULE_DEPTH    := ../..
18include $(MODULE_DEPTH)/build/make/commondefs.mk
19
20CLR_VERSION := 3.5
21ifeq ($(PROCESSOR_ARCHITECTURE),x86)
22	FRAMEWORK := Framework
23else
24	FRAMEWORK := Framework64
25endif
26MSBUILD := $(shell cygpath --windir)/Microsoft.NET/$(FRAMEWORK)/v$(CLR_VERSION)/msbuild.exe /nologo /verbosity:minimal
27
28CONFIGURATION := Release
29PLATFORM := x86
30BIN_DIR := ./bin/$(CONFIGURATION)
31OBJ_DIR := ./obj/$(CONFIGURATION)
32
33# Default target
34default: install
35
36###############################################################################
37#  install
38###############################################################################
39
40.PHONY: install print_module_install
41
42INSTALL_DIR := $(TOOL_DIR)
43INSTALL_FILE := CatLog.exe
44INSTALLS := $(addprefix $(INSTALL_DIR)/,$(INSTALL_FILE))
45
46$(INSTALL_DIR)/$(INSTALL_FILE): $(BIN_DIR)/$(INSTALL_FILE)
47	$(MACRO_INSTALL_FILE) $< $@
48
49print_module_install:
50	$(call MOD_RULES_PHASE, "Installing $(MODULE_PATH_FROM_SRC)")
51
52install: print_module_install $(INSTALLS)
53
54
55###############################################################################
56#  build
57###############################################################################
58
59.PHONY: build rebuild
60
61MSBUILD_OPTIONS := /tv:$(CLR_VERSION) /p:Configuration=$(CONFIGURATION) /p:Platform=$(PLATFORM)
62
63rebuild: clean build
64
65build: $(BIN_DIR)/$(INSTALL_FILE)
66
67SOURCES := $(wildcard Properties/*.cs)
68
69MSPROJFILE := CatLog.csproj
70
71$(BIN_DIR)/$(INSTALL_FILE): $(SOURCES) $(MSPROJFILE)
72	$(MSBUILD) $(MSBUILD_OPTIONS) /t:Build
73
74###############################################################################
75#  clean / clobber
76###############################################################################
77
78.PHONY: clean clobber
79
80clean:
81	$(MSBUILD) $(MSBUILD_OPTIONS) /t:Clean
82
83clobber: clean
84	$(call MOD_RULES_PHASE, "Clobbering $(MODULE_PATH_FROM_SRC)")
85	rm -fr bin obj
86	rm -f $(INSTALLS)
87
88#======== End of makefile ========#
89