From 082b2bcd23a47538fd88ecfbe643879012bb83fb Mon Sep 17 00:00:00 2001 From: Dave Murphy Date: Tue, 27 Feb 2018 15:57:03 +0000 Subject: [PATCH] separate tool & path settings --- dkppc/rules/base_rules | 38 ++------------------------------------ dkppc/rules/base_tools | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 36 deletions(-) create mode 100644 dkppc/rules/base_tools diff --git a/dkppc/rules/base_rules b/dkppc/rules/base_rules index 5c9ae59..bbbf2bf 100644 --- a/dkppc/rules/base_rules +++ b/dkppc/rules/base_rules @@ -1,38 +1,4 @@ -#--------------------------------------------------------------------------------- -# change shell on Snow Leopard -#--------------------------------------------------------------------------------- -UNAME_S := $(shell uname -s) -UNAME_R := $(shell uname -r) - -ifneq (,$(findstring Darwin,$(UNAME_S))) - ifneq (,$(findstring 10.8.0,$(UNAME_R))) - export SHELL=/bin/bash - endif -endif - -#--------------------------------------------------------------------------------- -# path to tools -#--------------------------------------------------------------------------------- -export PORTLIBS := $(DEVKITPRO)/portlibs/ppc -export PATH := $(DEVKITPPC)/bin:$(PORTLIBS)/bin:$(PATH) - -#--------------------------------------------------------------------------------- -# the prefix on the compiler executables -#--------------------------------------------------------------------------------- -PREFIX := powerpc-eabi- - -export AS := $(PREFIX)as -export CC := $(PREFIX)gcc -export CXX := $(PREFIX)g++ -export AR := $(PREFIX)ar -export OBJCOPY := $(PREFIX)objcopy - - -ISVC=$(or $(VCBUILDHELPER_COMMAND),$(MSBUILDEXTENSIONSPATH32),$(MSBUILDEXTENSIONSPATH)) - -ifneq (,$(ISVC)) - ERROR_FILTER := 2>&1 | sed -e 's/\(.[a-zA-Z]\+\):\([0-9]\+\):/\1(\2):/g' -endif +include $(DEVKITPPC)/base_tools #--------------------------------------------------------------------------------- %.a: @@ -45,7 +11,7 @@ endif %.o: %.cpp @echo $(notdir $<) @$(CXX) -MMD -MP -MF $(DEPSDIR)/$*.d $(CXXFLAGS) -c $< -o $@ $(ERROR_FILTER) - + #--------------------------------------------------------------------------------- %.o: %.c @echo $(notdir $<) diff --git a/dkppc/rules/base_tools b/dkppc/rules/base_tools new file mode 100644 index 0000000..e0582b4 --- /dev/null +++ b/dkppc/rules/base_tools @@ -0,0 +1,37 @@ +#--------------------------------------------------------------------------------- +# change shell on Snow Leopard +#--------------------------------------------------------------------------------- +UNAME_S := $(shell uname -s) +UNAME_R := $(shell uname -r) + +ifneq (,$(findstring Darwin,$(UNAME_S))) + ifneq (,$(findstring 10.8.0,$(UNAME_R))) + export SHELL=/bin/bash + endif +endif + +#--------------------------------------------------------------------------------- +# path to tools +#--------------------------------------------------------------------------------- +DEVKITPATH=$(shell echo "$(DEVKITPRO)" | sed -e 's/^\([a-zA-Z]\):/\/\1/') + +export PORTLIBS := $(DEVKITPATH)/portlibs/ppc +export PATH := $(DEVKITPATH)/devkitPPC/bin:$(PORTLIBS)/bin:$(PATH) + +#--------------------------------------------------------------------------------- +# the prefix on the compiler executables +#--------------------------------------------------------------------------------- +PREFIX := powerpc-eabi- + +export AS := $(PREFIX)as +export CC := $(PREFIX)gcc +export CXX := $(PREFIX)g++ +export AR := $(PREFIX)ar +export OBJCOPY := $(PREFIX)objcopy + + +ISVC=$(or $(VCBUILDHELPER_COMMAND),$(MSBUILDEXTENSIONSPATH32),$(MSBUILDEXTENSIONSPATH)) + +ifneq (,$(ISVC)) + ERROR_FILTER := 2>&1 | sed -e 's/\(.[a-zA-Z]\+\):\([0-9]\+\):/\1(\2):/g' +endif