#! make -f #---------------------------------------------------------------------------- # Project: RVLDWC - Library - build - buildtools # File: modulerules.VC # # Copyright 2005 Nintendo. All rights reserved. # # These coded instructions, statements, and computer programs contain # proprietary information of Nintendo of America Inc. and/or Nintendo # Company Ltd., and are protected by Federal copyright law. They may # not be disclosed to third parties or copied or duplicated in any form, # in whole or in part, without the prior written consent of Nintendo. # # $Revision: 1.6 $ #---------------------------------------------------------------------------- ifndef RVLDWC_MODULERULES_VC_ RVLDWC_MODULERULES_VC_ = TRUE #---------------------------------------------------------------------------- # MAKE TARGETS #---------------------------------------------------------------------------- .PHONY: default build do-build install do-install clean clobber BUILDCMDS = default build .PHONY: $(TARGETS) $(TARGETS): @rm -f $(VC_LOGFILE) -$(DEVENV) $(SOLUTION) $(BUILD_OPT) $(RVLDWC_BUILDNAME) /out $(VC_LOGFILE) $(RVLDWC_STDOUT) ifdef RVLDWC_STDOUT @gawk -f $(RVLDWC_BUILDTOOLSDIR)/script/vclogcvtr.awk $(VC_LOGFILE) endif #---------------------------------------------------------------------------- define MAKE_SUBDIR $(foreach DIR, $(SUBDIRS), $(REMAKE) -C $(DIR) $@ $(AND)) true endef define ECHO_CURDIR echo "" echo "==== $(CURDIR)"; endef #---------------------------------------------------------------------------- # install_files #---------------------------------------------------------------------------- define install_files @$(INSTALL) -d $(INSTALL_DIR) @$(foreach FILE, $(INSTALL_TARGETS), \ echo " install: $(FILE) -> $(INSTALL_DIR)" $(AND) \ $(INSTALL) $(FILE) $(INSTALL_DIR) $(AND)) true endef #---------------------------------------------------------------------------- # make build #---------------------------------------------------------------------------- build: @$(MAKE_SUBDIR) @$(ECHO_CURDIR) @+$(REMAKE) do-build ifdef INSTALL_TARGETS ifndef INSTALL_IGNORE $(call install_files) @$(REMAKE) do-install endif endif #---------------------------------------------------------------------------- # make install #---------------------------------------------------------------------------- install: @$(MAKE_SUBDIR) @$(ECHO_CURDIR) ifdef INSTALL_TARGETS ifndef INSTALL_IGNORE $(call install_files) @$(REMAKE) do-install endif endif #---------------------------------------------------------------------------- # make full #---------------------------------------------------------------------------- define makefull @echo [[[ make full $(1) $(CURDIR) ]]] @+unset RVLDWC_TOOL_DEBUG RVLDWC_TOOL_RELEASE; \ $(foreach a,RELEASE DEBUG, \ $(REMAKE) RVLDWC_TOOL_$a=TRUE $(1) $(AND) \ ) true endef full: $(call makefull,build) full-install: $(call makefull,install) #---------------------------------------------------------------------------- # make clean #---------------------------------------------------------------------------- clean: @$(MAKE_SUBDIR) @$(ECHO_CURDIR) ifdef SOLUTION $(DEVENV) $(SOLUTION) /clean $(RVLDWC_BUILDNAME) -$(RM) $(CLEAN_DIRS) endif #---------------------------------------------------------------------------- # make clobber #---------------------------------------------------------------------------- clobber: @$(MAKE_SUBDIR) @$(ECHO_CURDIR) ifdef SOLUTION $(DEVENV) $(SOLUTION) /clean Debug $(DEVENV) $(SOLUTION) /clean Release ifneq ($(CLOBBER_INSTALLED),) -$(RM) $(CLOBBER_INSTALLED) endif -$(RM) $(CLOBBER_DIRS) endif endif # RVLDWC_MODULERULES_VC_ #----- End of modulerules -----