mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 11:44:17 +01:00
Fix Makefiles to account for the $CC and $CXX environment variables
This commit is contained in:
parent
2a0517f0fd
commit
e28cf5406b
15
Makefile
15
Makefile
@ -1,4 +1,17 @@
|
|||||||
TOOLCHAIN := $(DEVKITARM)
|
TOOLCHAIN := $(DEVKITARM)
|
||||||
|
|
||||||
|
ifeq ($(CC),)
|
||||||
|
HOSTCC := gcc
|
||||||
|
else
|
||||||
|
HOSTCC := $(CC)
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(CXX),)
|
||||||
|
HOSTCXX := g++
|
||||||
|
else
|
||||||
|
HOSTCXX := $(CXX)
|
||||||
|
endif
|
||||||
|
|
||||||
ifneq (,$(wildcard $(TOOLCHAIN)/base_tools))
|
ifneq (,$(wildcard $(TOOLCHAIN)/base_tools))
|
||||||
include $(TOOLCHAIN)/base_tools
|
include $(TOOLCHAIN)/base_tools
|
||||||
else
|
else
|
||||||
@ -136,7 +149,7 @@ all: rom
|
|||||||
tools: $(TOOLDIRS)
|
tools: $(TOOLDIRS)
|
||||||
|
|
||||||
$(TOOLDIRS):
|
$(TOOLDIRS):
|
||||||
@$(MAKE) -C $@
|
@$(MAKE) -C $@ CC=$(HOSTCC) CXX=$(HOSTCXX)
|
||||||
|
|
||||||
rom: $(ROM)
|
rom: $(ROM)
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
CC = gcc
|
CC ?= gcc
|
||||||
|
|
||||||
CFLAGS = -Wall -Wextra -Wno-switch -Werror -std=c11 -O2
|
CFLAGS = -Wall -Wextra -Wno-switch -Werror -std=c11 -O2
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
CC = gcc
|
CC ?= gcc
|
||||||
|
|
||||||
CFLAGS = -Wall -Wextra -Werror -std=c11 -O2
|
CFLAGS = -Wall -Wextra -Werror -std=c11 -O2
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
CC = gcc
|
CC ?= gcc
|
||||||
.PHONY: all clean
|
.PHONY: all clean
|
||||||
|
|
||||||
SRCS = gbafix.c
|
SRCS = gbafix.c
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
CC = gcc
|
CC ?= gcc
|
||||||
|
|
||||||
CFLAGS = -Wall -Wextra -Werror -std=c11 -O2 -DPNG_SKIP_SETJMP_CHECK
|
CFLAGS = -Wall -Wextra -Werror -std=c11 -O2 -DPNG_SKIP_SETJMP_CHECK
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
CXX := g++
|
CXX ?= g++
|
||||||
|
|
||||||
CXXFLAGS := -Wall -std=c++11 -O2
|
CXXFLAGS := -Wall -std=c++11 -O2
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
CXX := g++
|
CXX ?= g++
|
||||||
|
|
||||||
CXXFLAGS := -Wall -std=c++11 -O2
|
CXXFLAGS := -Wall -std=c++11 -O2
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
CXX := g++
|
CXX ?= g++
|
||||||
|
|
||||||
CXXFLAGS := -std=c++11 -O2 -Wall -Wno-switch -Werror
|
CXXFLAGS := -std=c++11 -O2 -Wall -Wno-switch -Werror
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
CXX := g++
|
CXX ?= g++
|
||||||
|
|
||||||
CXXFLAGS := -std=c++11 -O2 -Wall -Wno-switch -Werror
|
CXXFLAGS := -std=c++11 -O2 -Wall -Wno-switch -Werror
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
CXX := g++
|
CXX ?= g++
|
||||||
|
|
||||||
CXXFLAGS := -std=c++11 -O2 -Wall -Wno-switch -Werror
|
CXXFLAGS := -std=c++11 -O2 -Wall -Wno-switch -Werror
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
CC = gcc
|
CC ?= gcc
|
||||||
|
|
||||||
CFLAGS = -Wall -Wextra -Werror -std=c11 -O2 -DPNG_SKIP_SETJMP_CHECK
|
CFLAGS = -Wall -Wextra -Werror -std=c11 -O2 -DPNG_SKIP_SETJMP_CHECK
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
CXX = g++
|
CXX ?= g++
|
||||||
|
|
||||||
CXXFLAGS = -Wall -Werror -std=c++11 -O2
|
CXXFLAGS = -Wall -Werror -std=c++11 -O2
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user