aboutsummaryrefslogtreecommitdiff
path: root/template/psn00bsdk-setup.mk
diff options
context:
space:
mode:
authorJohn Wilbert M. Villamor <lameguy64@gmail.com>2021-02-18 13:31:17 +0800
committerJohn Wilbert M. Villamor <lameguy64@gmail.com>2021-02-18 13:31:17 +0800
commit63419d9cc07c56234d0f61a80f32105b192aec8e (patch)
tree827cf4d134cf3b4618d0167cc912f3efd47c3aac /template/psn00bsdk-setup.mk
parent1625072293c40ba3cb819f8f48aeb4b64e93b133 (diff)
downloadpsn00bsdk-63419d9cc07c56234d0f61a80f32105b192aec8e.tar.gz
Lots of makefile corrections, improved build and toolchain instructions, added elf2cpe converter, fixed typo in plasma_tbl.h of n00bdemo example
Diffstat (limited to 'template/psn00bsdk-setup.mk')
-rw-r--r--template/psn00bsdk-setup.mk68
1 files changed, 68 insertions, 0 deletions
diff --git a/template/psn00bsdk-setup.mk b/template/psn00bsdk-setup.mk
new file mode 100644
index 0000000..6ba23ae
--- /dev/null
+++ b/template/psn00bsdk-setup.mk
@@ -0,0 +1,68 @@
+# PSn00bSDK project setup file
+# Part of the PSn00bSDK Project
+# 2019 - 2020 Lameguy64 / Meido-Tek Productions
+#
+# This file may be copied for use with your projects, see the template
+# directory for a makefile template
+
+ifndef PREFIX
+
+PREFIX = mipsel-unknown-elf
+
+endif # PREFIX
+
+ifndef GCC_VERSION
+
+GCC_VERSION = 7.4.0
+
+endif # GCC_VERSION
+
+# PSn00bSDK library/include path setup
+ifndef PSN00BSDK_LIBS
+
+# Default assumes PSn00bSDK is in the same parent dir as this project
+
+LIBDIRS = -L../psn00bsdk/libpsn00b
+INCLUDE = -I../psn00bsdk/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 \ No newline at end of file