summaryrefslogtreecommitdiff
path: root/tools/Makefile
diff options
context:
space:
mode:
authorMegaMech <MegaMech@users.noreply.github.com>2024-04-09 21:29:57 -0600
committerGitHub <noreply@github.com>2024-04-09 21:29:57 -0600
commit3da5a4f343fa708abcc461d83337ef6df9863447 (patch)
tree2ff74ffb532a89e5af9666250c2c60e7f339f9c0 /tools/Makefile
parent2b66867af1975759dc7acfb3bbc2c9063ffa4353 (diff)
Add ymls for Torch code generator (#497)
* Add torch * update jenkinsfile
Diffstat (limited to 'tools/Makefile')
-rw-r--r--tools/Makefile16
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/Makefile b/tools/Makefile
index f9ad01726..5d989acaa 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -2,6 +2,7 @@
# Compilation flags
CC := gcc
+MAKE = make
CFLAGS := -I . -Wall -Wextra -Wno-unused-parameter -pedantic -std=c99 -O2 -s
# Tools to compile
@@ -28,6 +29,19 @@ n64cksum_CFLAGS := -DN64CKSUM_STANDALONE
extract_data_for_mio_SOURCES := extract_data_for_mio.c
+ifeq ($(OS),Windows_NT)
+ DETECTED_OS=windows
+ # Set Windows temporary directory to its environment variable
+ export TMPDIR=$(TEMP)
+else
+ UNAME_S := $(shell uname -s)
+ ifeq ($(UNAME_S),Linux)
+ DETECTED_OS=linux
+ else ifeq ($(UNAME_S),Darwin)
+ DETECTED_OS=macos
+ endif
+endif
+
# Build tools and recomp
all: $(PROGRAMS)
@@ -48,3 +62,5 @@ $(1): $($1_SOURCES)
endef
$(foreach p,$(PROGRAMS),$(eval $(call COMPILE,$(p))))
+
+.PHONY: all clean default \ No newline at end of file