Skip to content

Commit 082b2bc

Browse files
committed
separate tool & path settings
1 parent 32faa8f commit 082b2bc

2 files changed

Lines changed: 39 additions & 36 deletions

File tree

dkppc/rules/base_rules

Lines changed: 2 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,4 @@
1-
#---------------------------------------------------------------------------------
2-
# change shell on Snow Leopard
3-
#---------------------------------------------------------------------------------
4-
UNAME_S := $(shell uname -s)
5-
UNAME_R := $(shell uname -r)
6-
7-
ifneq (,$(findstring Darwin,$(UNAME_S)))
8-
ifneq (,$(findstring 10.8.0,$(UNAME_R)))
9-
export SHELL=/bin/bash
10-
endif
11-
endif
12-
13-
#---------------------------------------------------------------------------------
14-
# path to tools
15-
#---------------------------------------------------------------------------------
16-
export PORTLIBS := $(DEVKITPRO)/portlibs/ppc
17-
export PATH := $(DEVKITPPC)/bin:$(PORTLIBS)/bin:$(PATH)
18-
19-
#---------------------------------------------------------------------------------
20-
# the prefix on the compiler executables
21-
#---------------------------------------------------------------------------------
22-
PREFIX := powerpc-eabi-
23-
24-
export AS := $(PREFIX)as
25-
export CC := $(PREFIX)gcc
26-
export CXX := $(PREFIX)g++
27-
export AR := $(PREFIX)ar
28-
export OBJCOPY := $(PREFIX)objcopy
29-
30-
31-
ISVC=$(or $(VCBUILDHELPER_COMMAND),$(MSBUILDEXTENSIONSPATH32),$(MSBUILDEXTENSIONSPATH))
32-
33-
ifneq (,$(ISVC))
34-
ERROR_FILTER := 2>&1 | sed -e 's/\(.[a-zA-Z]\+\):\([0-9]\+\):/\1(\2):/g'
35-
endif
1+
include $(DEVKITPPC)/base_tools
362

373
#---------------------------------------------------------------------------------
384
%.a:
@@ -45,7 +11,7 @@ endif
4511
%.o: %.cpp
4612
@echo $(notdir $<)
4713
@$(CXX) -MMD -MP -MF $(DEPSDIR)/$*.d $(CXXFLAGS) -c $< -o $@ $(ERROR_FILTER)
48-
14+
4915
#---------------------------------------------------------------------------------
5016
%.o: %.c
5117
@echo $(notdir $<)

dkppc/rules/base_tools

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#---------------------------------------------------------------------------------
2+
# change shell on Snow Leopard
3+
#---------------------------------------------------------------------------------
4+
UNAME_S := $(shell uname -s)
5+
UNAME_R := $(shell uname -r)
6+
7+
ifneq (,$(findstring Darwin,$(UNAME_S)))
8+
ifneq (,$(findstring 10.8.0,$(UNAME_R)))
9+
export SHELL=/bin/bash
10+
endif
11+
endif
12+
13+
#---------------------------------------------------------------------------------
14+
# path to tools
15+
#---------------------------------------------------------------------------------
16+
DEVKITPATH=$(shell echo "$(DEVKITPRO)" | sed -e 's/^\([a-zA-Z]\):/\/\1/')
17+
18+
export PORTLIBS := $(DEVKITPATH)/portlibs/ppc
19+
export PATH := $(DEVKITPATH)/devkitPPC/bin:$(PORTLIBS)/bin:$(PATH)
20+
21+
#---------------------------------------------------------------------------------
22+
# the prefix on the compiler executables
23+
#---------------------------------------------------------------------------------
24+
PREFIX := powerpc-eabi-
25+
26+
export AS := $(PREFIX)as
27+
export CC := $(PREFIX)gcc
28+
export CXX := $(PREFIX)g++
29+
export AR := $(PREFIX)ar
30+
export OBJCOPY := $(PREFIX)objcopy
31+
32+
33+
ISVC=$(or $(VCBUILDHELPER_COMMAND),$(MSBUILDEXTENSIONSPATH32),$(MSBUILDEXTENSIONSPATH))
34+
35+
ifneq (,$(ISVC))
36+
ERROR_FILTER := 2>&1 | sed -e 's/\(.[a-zA-Z]\+\):\([0-9]\+\):/\1(\2):/g'
37+
endif

0 commit comments

Comments
 (0)