Skip to content

Commit

Permalink
Rename DEBUG_BUILD to DEBUG
Browse files Browse the repository at this point in the history
  • Loading branch information
Nightkingale committed May 19, 2024
1 parent ff1dd05 commit 005c5e1
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Build Binary
run: |
docker build -t builder .
docker run --rm -v ${PWD}:/project builder make DEBUG_BUILD=1
docker run --rm -v ${PWD}:/project builder make DEBUG=1
- name: Upload Wii_U_Time_Sync.wps
uses: actions/upload-artifact@v4
Expand Down
46 changes: 25 additions & 21 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ WUMS_ROOT := $(DEVKITPRO)/wums
WUT_ROOT := $(DEVKITPRO)/wut

#-------------------------------------------------------------------------------
# PLUGIN_NAME sets the name of the plugin
# PLUGIN_DESCRIPTION sets the description of the plugin
# PLUGIN_VERSION sets the version of the plugin
# PLUGIN_AUTHOR sets the author of the plugin
# PLUGIN_LICENSE sets the license of the plugin
# PLUGIN_NAME sets the name of the plugin.
# PLUGIN_DESCRIPTION sets the description of the plugin.
# PLUGIN_VERSION sets the version of the plugin.
# PLUGIN_AUTHOR sets the author of the plugin.
# PLUGIN_LICENSE sets the license of the plugin.
#-------------------------------------------------------------------------------
PLUGIN_NAME := "Wii U Time Sync"
PLUGIN_DESCRIPTION := "A plugin that synchronizes a Wii U\'s clock to the Internet."
Expand All @@ -27,28 +27,32 @@ PLUGIN_AUTHOR := "Nightkingale, Daniel K. O."
PLUGIN_LICENSE := "MIT"

#-------------------------------------------------------------------------------
# DEBUG_BUILD sets the debug flag for the plugin
#-------------------------------------------------------------------------------
DEBUG_BUILD := 0

ifeq ($(DEBUG_BUILD), 1)
GIT_HASH := $(shell git rev-parse --short HEAD)
PLUGIN_VERSION := $(PLUGIN_VERSION)-$(GIT_HASH)
endif

#-------------------------------------------------------------------------------
# TARGET is the name of the output
# BUILD is the directory where object files & intermediate files will be placed
# SOURCES is a list of directories containing source code
# DATA is a list of directories containing data files
# INCLUDES is a list of directories containing header files
# TARGET is the name of the output.
# BUILD is the directory where object files & intermediate files will be placed.
# SOURCES is a list of directories containing source code.
# DATA is a list of directories containing data files.
# INCLUDES is a list of directories containing header files.
#-------------------------------------------------------------------------------
TARGET := Wii_U_Time_Sync
BUILD := build
SOURCES := source source/wupsxx
DATA := data
INCLUDES := include include/wupsxx

#-------------------------------------------------------------------------------
# DEBUG sets the debug flag for the plugin.
# This should be 0 for release builds, and 1 for development/workflow builds.
# * The version string will be appended with the git hash.
# * Compiling will produce verbose logs.
#-------------------------------------------------------------------------------
DEBUG := 0

# This appends the git hash to the version string.
ifeq ($(DEBUG), 1)
GIT_HASH := $(shell git rev-parse --short HEAD)
PLUGIN_VERSION := $(PLUGIN_VERSION)-$(GIT_HASH)
endif

#-------------------------------------------------------------------------------
# options for code generation
#-------------------------------------------------------------------------------
Expand Down Expand Up @@ -136,7 +140,7 @@ all: $(BUILD)

$(BUILD):
@[ -d $@ ] || mkdir -p $@
$(MAKE) -C $(BUILD) -f $(CURDIR)/Makefile V=$(DEBUG_BUILD)
$(MAKE) -C $(BUILD) -f $(CURDIR)/Makefile V=$(DEBUG)

#-------------------------------------------------------------------------------
clean:
Expand Down

0 comments on commit 005c5e1

Please sign in to comment.