diff --git a/Makefile b/Makefile index aec0a7b..8b26558 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,15 @@ +export APP_VERSION := v2.0.0 + +.PHONY: clean all nx pc + +all: nx pc + nx: $(MAKE) -f Makefile.nx pc: $(MAKE) -f Makefile.pc -all: nx pc - clean: $(MAKE) -f Makefile.pc clean - $(MAKE) -f Makefile.nx clean \ No newline at end of file + $(MAKE) -f Makefile.nx clean diff --git a/Makefile.nx b/Makefile.nx index 8f382e4..ef06331 100644 --- a/Makefile.nx +++ b/Makefile.nx @@ -44,7 +44,7 @@ ARCH := -march=armv8-a -mtune=cortex-a57 -mtp=soft -fPIE CFLAGS := -g -Wall -O2 -ffunction-sections \ $(ARCH) $(DEFINES) -CFLAGS += $(INCLUDE) -DSWITCH +CFLAGS += $(INCLUDE) -DSWITCH -DVERSION=\"$(APP_VERSION)\" CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++11 diff --git a/Makefile.pc b/Makefile.pc index d2212dc..f8f9b73 100644 --- a/Makefile.pc +++ b/Makefile.pc @@ -15,7 +15,7 @@ test : pc_main/main.cpp pc_main/pc_launch.c \ build_pc/interuiregular14.o build_pc/interuiregular18.o \ build_pc/invalid_icon.bin.o build_pc/folder_icon.bin.o \ build_pc/button_a_light.bin.o build_pc/button_a_dark.bin.o build_pc/button_b_light.bin.o build_pc/button_b_dark.bin.o build_pc/hbmenu_logo_light.bin.o build_pc/hbmenu_logo_dark.bin.o - gcc -Wall -O2 -g0 $^ -lsfml-graphics -lsfml-window -lsfml-system -lstdc++ -lm -I. -Ibuild_pc -o $@ + gcc -Wall -O2 -g0 -DVERSION=\"$(APP_VERSION)\" $^ -lsfml-graphics -lsfml-window -lsfml-system -lstdc++ -lm -I. -Ibuild_pc -o $@ build_pc/tahoma12.o : data/tahoma12.nxfnt mkdir -p $(dir $@) diff --git a/README.md b/README.md index b7b5862..93f0081 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ See [Switchbrew](http://switchbrew.org/index.php?title=Homebrew_Applications) fo The latest release is available from the [releases](https://github.com/switchbrew/nx-hbmenu/releases/latest) page. #### Building -Build with Makefile.nx directly or just run ```make```. +Build with ```make nx``` or just run ```make```. #### Credits diff --git a/common/menu.c b/common/menu.c index 9411c88..9c5650a 100644 --- a/common/menu.c +++ b/common/menu.c @@ -337,7 +337,7 @@ void menuLoop() { timer += 0.05; drawImage(40, 20, 140, 60, themeCurrent.hbmenuLogoImage, IMAGE_MODE_RGBA32); - DrawText(interuiregular14, 180, 46, themeCurrent.textColor, "v2.0.0"); + DrawText(interuiregular14, 180, 46, themeCurrent.textColor, VERSION); DrawTextTruncate(interuiregular18, 40, 720 - 47, themeCurrent.textColor, menu->dirname, 918, "..."); #ifdef PERF_LOG_DRAW//Seperate from the PERF_LOG define since this might affect perf.