aboutsummaryrefslogtreecommitdiff
path: root/examples/examples-setup.mk
blob: 0692d89e96d470a882f7b603837c12d1e60ca2ea (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# PSn00bSDK examples setup file
# Part of the PSn00bSDK Project
# 2019 - 2020 Lameguy64 / Meido-Tek Productions
#
# This is only for the PSn00bSDK example programs, not recommended
# for use with user projects

PREFIX		= mipsel-unknown-elf-

ifndef GCC_VERSION

GCC_VERSION	= 7.4.0

endif	# GCC_VERSION

# PSn00bSDK library/include path setup
ifndef PSN00BSDK_LIBS

# Default assumes libpsn00b is just in the parent dir of the examples dir

LIBDIRS		= -L../../../libpsn00b
INCLUDE	 	= -I../../../libpsn00b/include

else

LIBDIRS		= -L$(PSN00BSDK_LIBS)
INCLUDE		= -I$(PSN00BSDK_LIBS)/include

endif 		# PSN00BSDK_LIBS

# PSn00bSDK toolchain path setup
ifndef GCC_BASE

ifndef PSN00BSDK_TC

# Default assumes GCC toolchain is in root of C drive or /usr/local

ifeq "$(OS)" "Windows_NT"

GCC_BASE	= /c/mipsel-unknown-elf
GCC_BIN		=

else

GCC_BASE	= /usr/local/mipsel-unknown-elf
GCC_BIN		=

endif

else

GCC_BASE	= $(PSN00BSDK_TC)
GCC_BIN		= $(PSN00BSDK_TC)/bin/

endif		# PSN00BSDK_TC

endif		# GCC_BASE

CC			= $(GCC_BIN)$(PREFIX)gcc
CXX			= $(GCC_BIN)$(PREFIX)g++
AS			= $(GCC_BIN)$(PREFIX)as
AR			= $(GCC_BIN)$(PREFIX)ar
LD			= $(GCC_BIN)$(PREFIX)ld
RANLIB		= $(GCC_BIN)$(PREFIX)ranlib