From cbe4a1e3e3af7915ae2b3e0471f6932d8ab6153c Mon Sep 17 00:00:00 2001 From: CrispyBuns <57575774+CrispyBuns@users.noreply.github.com> Date: Tue, 14 Jul 2020 14:50:40 -0600 Subject: [PATCH 1/4] Made some modifcations so That CPP can be changed + extras Added a clang build script for MinGW and Linux --- Build_clang.sh | 2 ++ Makefile | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 Build_clang.sh diff --git a/Build_clang.sh b/Build_clang.sh new file mode 100644 index 00000000..9b61955d --- /dev/null +++ b/Build_clang.sh @@ -0,0 +1,2 @@ +make CC=clang CXX=clang++ CPP=clang-cpp + diff --git a/Makefile b/Makefile index bc82c2cb..6b1c7f84 100644 --- a/Makefile +++ b/Makefile @@ -356,7 +356,7 @@ CXX_FILES := $(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.cpp)) S_FILES := $(foreach dir,$(ASM_DIRS),$(wildcard $(dir)/*.s)) GODDARD_C_FILES := $(foreach dir,$(GODDARD_SRC_DIRS),$(wildcard $(dir)/*.c)) -GENERATED_C_FILES := $(BUILD_DIR)/assets/mario_anim_data.c $(BUILD_DIR)/assets/demo_data.c \ +GENERATED_C_FILES := $(BUILD_DIR)/assets/mario_anim_data.c $(BUILD_DIR)/assets/demo_data.c $(addprefix $(BUILD_DIR)/bin/,$(addsuffix _skybox.c,$(notdir $(basename $(wildcard textures/skyboxes/*.png))))) ULTRA_C_FILES := \ @@ -426,7 +426,7 @@ DEP_FILES := $(O_FILES:.o=.d) $(ULTRA_O_FILES:.o=.d) $(GODDARD_O_FILES:.o=.d) $( SEG_FILES := $(SEGMENT_ELF_FILES) $(ACTOR_ELF_FILES) $(LEVEL_ELF_FILES) ##################### Compiler Options ####################### -INCLUDE_CFLAGS := -I include -I $(BUILD_DIR) -I $(BUILD_DIR)/include -I src -I . +INCLUDE_CFLAGS := -I include -I $(BUILD_DIR) -I $(BUILD_DIR)/include -I src -I ENDIAN_BITWIDTH := $(BUILD_DIR)/endian-and-bitwidth # Huge deleted N64 section was here @@ -460,7 +460,7 @@ else ifeq ($(WINDOWS_BUILD),1) endif ifeq ($(WINDOWS_BUILD),1) # fixes compilation in MXE on Linux and WSL - CPP := cpp -P + CPP ?= cpp -P OBJCOPY := objcopy OBJDUMP := $(CROSS)objdump else ifeq ($(OSX_BUILD),1) @@ -468,7 +468,7 @@ else ifeq ($(OSX_BUILD),1) OBJDUMP := i686-w64-mingw32-objdump OBJCOPY := i686-w64-mingw32-objcopy else # Linux & other builds - CPP := $(CROSS)cpp -P + CPP ?= $(CROSS)cpp -P OBJCOPY := $(CROSS)objcopy OBJDUMP := $(CROSS)objdump endif From 9b02add46b911b416ba5cae04bf80e2324a19944 Mon Sep 17 00:00:00 2001 From: CrispyBuns <57575774+CrispyBuns@users.noreply.github.com> Date: Tue, 14 Jul 2020 14:51:22 -0600 Subject: [PATCH 2/4] CPP can now be changed via a Make flag + more Added a clang build script for MinGW and Linux From 67113276d31e387425e52ccc97e5bda459ae4918 Mon Sep 17 00:00:00 2001 From: CrispyBuns <57575774+CrispyBuns@users.noreply.github.com> Date: Tue, 14 Jul 2020 14:53:58 -0600 Subject: [PATCH 3/4] Add files via upload --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6b1c7f84..a5f0d413 100644 --- a/Makefile +++ b/Makefile @@ -426,7 +426,7 @@ DEP_FILES := $(O_FILES:.o=.d) $(ULTRA_O_FILES:.o=.d) $(GODDARD_O_FILES:.o=.d) $( SEG_FILES := $(SEGMENT_ELF_FILES) $(ACTOR_ELF_FILES) $(LEVEL_ELF_FILES) ##################### Compiler Options ####################### -INCLUDE_CFLAGS := -I include -I $(BUILD_DIR) -I $(BUILD_DIR)/include -I src -I +INCLUDE_CFLAGS := -I include -I $(BUILD_DIR) -I $(BUILD_DIR)/include -I src -I . ENDIAN_BITWIDTH := $(BUILD_DIR)/endian-and-bitwidth # Huge deleted N64 section was here From 60e552e73e3b331e349f4a9158403fdb2ab6471f Mon Sep 17 00:00:00 2001 From: CrispyBuns <57575774+CrispyBuns@users.noreply.github.com> Date: Wed, 15 Jul 2020 08:04:07 -0600 Subject: [PATCH 4/4] Add files via upload --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a5f0d413..3b4b43eb 100644 --- a/Makefile +++ b/Makefile @@ -356,7 +356,7 @@ CXX_FILES := $(foreach dir,$(SRC_DIRS),$(wildcard $(dir)/*.cpp)) S_FILES := $(foreach dir,$(ASM_DIRS),$(wildcard $(dir)/*.s)) GODDARD_C_FILES := $(foreach dir,$(GODDARD_SRC_DIRS),$(wildcard $(dir)/*.c)) -GENERATED_C_FILES := $(BUILD_DIR)/assets/mario_anim_data.c $(BUILD_DIR)/assets/demo_data.c +GENERATED_C_FILES := $(BUILD_DIR)/assets/mario_anim_data.c $(BUILD_DIR)/assets/demo_data.c \ $(addprefix $(BUILD_DIR)/bin/,$(addsuffix _skybox.c,$(notdir $(basename $(wildcard textures/skyboxes/*.png))))) ULTRA_C_FILES := \