Makefile: Whitespace & Style nits

This commit is contained in:
GammaTendonNine 2020-11-23 03:15:50 -06:00
parent 9e9215c4b0
commit d2e51e41d9
1 changed files with 43 additions and 51 deletions

View File

@ -1,14 +1,14 @@
################################################################################
############################### SM64PC Makefile ################################
################################################################################
# Makefile to rebuild SM64 split image ## Default target ##
### Default target ###
default: all default: all
### Build Options ### ################################ Build Options #################################
# These options can either be changed by modifying the makefile, or ## These options can either be changed by modifying the makefile, or
# by building with 'make SETTING=value'. 'make clean' may be required. ## by building with 'make SETTING=value'. 'make clean' may be required.
# Build debug version # Build debug version
DEBUG ?= 0 DEBUG ?= 0
@ -18,20 +18,15 @@ VERSION ?= us
GRUCODE ?= f3dex2e GRUCODE ?= f3dex2e
# If NON_MATCHING is 1, define the NON_MATCHING and AVOID_UB macros when building (recommended) # If NON_MATCHING is 1, define the NON_MATCHING and AVOID_UB macros when building (recommended)
NON_MATCHING ?= 1 NON_MATCHING ?= 1
# Build and optimize for Raspberry Pi(s) # Build and optimize for Raspberry Pi(s)
TARGET_RPI ?= 0 TARGET_RPI ?= 0
# Build for Emscripten/WebGL # Build for Emscripten/WebGL
TARGET_WEB ?= 0 TARGET_WEB ?= 0
# Makeflag to enable OSX fixes # Makeflag to enable OSX fixes
OSX_BUILD ?= 0 OSX_BUILD ?= 0
# Specify the target you are building for, TARGET_BITS=0 means native # Specify the target you are building for, TARGET_BITS=0 means native
TARGET_ARCH ?= native TARGET_ARCH ?= native
TARGET_BITS ?= 0 TARGET_BITS ?= 0
# Disable better camera by default # Disable better camera by default
BETTERCAMERA ?= 0 BETTERCAMERA ?= 0
# Disable no drawing distance by default # Disable no drawing distance by default
@ -42,12 +37,11 @@ TEXTURE_FIX ?= 0
EXT_OPTIONS_MENU ?= 1 EXT_OPTIONS_MENU ?= 1
# Enable Discord Rich Presence # Enable Discord Rich Presence
DISCORDRPC ?= 0 DISCORDRPC ?= 0
# Various workarounds for weird toolchains # Various workarounds for weird toolchains
NO_BZERO_BCOPY ?= 0 NO_BZERO_BCOPY ?= 0
NO_LDIV ?= 0 NO_LDIV ?= 0
# Backend selection ## Backend selection
# Renderers: GL, GL_LEGACY, D3D11, D3D12 # Renderers: GL, GL_LEGACY, D3D11, D3D12
RENDER_API ?= GL RENDER_API ?= GL
@ -58,18 +52,19 @@ AUDIO_API ?= SDL2
# Controller backends (can have multiple, space separated): SDL2 # Controller backends (can have multiple, space separated): SDL2
CONTROLLER_API ?= SDL2 CONTROLLER_API ?= SDL2
LEGACY_RES ?= 0 ## External assets
BASEDIR ?= res
# Asset directory
BASEDIR ?= res
# Create zip file with legacy assets
LEGACY_RES ?= 0
# Copy assets to BASEDIR? (useful for iterative debugging) # Copy assets to BASEDIR? (useful for iterative debugging)
NO_COPY ?= 0 NO_COPY ?= 0
# Automatic settings for PC port(s) ################################# OS Detection #################################
WINDOWS_BUILD ?= 0 WINDOWS_BUILD ?= 0
# Attempt to detect OS
ifeq ($(OS),Windows_NT) ifeq ($(OS),Windows_NT)
HOST_OS ?= Windows HOST_OS ?= Windows
else else
@ -87,7 +82,6 @@ ifeq ($(TARGET_WEB),0)
endif endif
# MXE overrides # MXE overrides
ifeq ($(WINDOWS_BUILD),1) ifeq ($(WINDOWS_BUILD),1)
ifeq ($(CROSS),i686-w64-mingw32.static-) ifeq ($(CROSS),i686-w64-mingw32.static-)
TARGET_ARCH = i386pe TARGET_ARCH = i386pe
@ -184,7 +178,7 @@ else
endif endif
endif endif
################### Universal Dependencies ################### ############################ Universal Dependencies ############################
# (This is a bit hacky, but a lot of rules implicitly depend # (This is a bit hacky, but a lot of rules implicitly depend
# on tools and assets, and we use directory globs further down # on tools and assets, and we use directory globs further down
@ -213,7 +207,7 @@ endif
endif endif
endif endif
################ Target Executable and Sources ############### ######################### Target Executable and Sources ########################
# BUILD_DIR is location where all build artifacts are placed # BUILD_DIR is location where all build artifacts are placed
BUILD_DIR_BASE := build BUILD_DIR_BASE := build
@ -380,7 +374,8 @@ DEP_FILES := $(O_FILES:.o=.d) $(ULTRA_O_FILES:.o=.d) $(GODDARD_O_FILES:.o=.d) $(
# Segment elf files # Segment elf files
SEG_FILES := $(SEGMENT_ELF_FILES) $(ACTOR_ELF_FILES) $(LEVEL_ELF_FILES) SEG_FILES := $(SEGMENT_ELF_FILES) $(ACTOR_ELF_FILES) $(LEVEL_ELF_FILES)
##################### Compiler Options ####################### ############################ Compiler Options ##################################
INCLUDE_CFLAGS := $(PLATFORM_CFLAGS) -I include -I $(BUILD_DIR) -I $(BUILD_DIR)/include -I src -I . INCLUDE_CFLAGS := $(PLATFORM_CFLAGS) -I include -I $(BUILD_DIR) -I $(BUILD_DIR)/include -I src -I .
ENDIAN_BITWIDTH := $(BUILD_DIR)/endian-and-bitwidth ENDIAN_BITWIDTH := $(BUILD_DIR)/endian-and-bitwidth
@ -543,8 +538,6 @@ ifeq ($(LEGACY_GL),1)
CFLAGS += -DLEGACY_GL CFLAGS += -DLEGACY_GL
endif endif
# TODO: Remove -DEXTERNAL_DATA
# Load external textures # Load external textures
CC_CHECK += -DFS_BASEDIR="\"$(BASEDIR)\"" CC_CHECK += -DFS_BASEDIR="\"$(BASEDIR)\""
CFLAGS += -DFS_BASEDIR="\"$(BASEDIR)\"" CFLAGS += -DFS_BASEDIR="\"$(BASEDIR)\""
@ -582,8 +575,7 @@ endif # End of LDFLAGS
# Prevent a crash with -sopt # Prevent a crash with -sopt
export LANG := C export LANG := C
####################### Other Tools ######################### ################################# Other Tools ##################################
# N64 conversion tools # N64 conversion tools
TOOLS_DIR = tools TOOLS_DIR = tools
AIFF_EXTRACT_CODEBOOK = $(TOOLS_DIR)/aiff_extract_codebook AIFF_EXTRACT_CODEBOOK = $(TOOLS_DIR)/aiff_extract_codebook
@ -591,11 +583,11 @@ VADPCM_ENC = $(TOOLS_DIR)/vadpcm_enc
EXTRACT_DATA_FOR_MIO = $(TOOLS_DIR)/extract_data_for_mio EXTRACT_DATA_FOR_MIO = $(TOOLS_DIR)/extract_data_for_mio
ZEROTERM = $(PYTHON) $(TOOLS_DIR)/zeroterm.py ZEROTERM = $(PYTHON) $(TOOLS_DIR)/zeroterm.py
###################### Dependency Check ##################### ############################### Dependency Check ###############################
# Stubbed # Stubbed
######################## Targets ############################# #################################### Targets ###################################
all: $(EXE) all: $(EXE)