@@ -38,13 +38,18 @@ include $(DEVKITPRO)/libnx/switch_rules
3838# NACP building is skipped as well.
3939# ---------------------------------------------------------------------------------
4040APP_TITLE := ShareNX
41- APP_VERSION := 1.0.0
41+ APP_VERSION := 1.0.1
4242
4343TARGET := ovlShareNX
4444BUILD := build
4545SOURCES := source
4646DATA := data
47- INCLUDES := include
47+ INCLUDES := libs/include
48+ APP_VERSION := 1.1.0
49+
50+ ifeq ($(RELEASE ) ,)
51+ APP_VERSION := $(APP_VERSION)-$(shell git describe --dirty --always)
52+ endif
4853
4954NO_ICON := 1
5055
@@ -53,23 +58,23 @@ NO_ICON := 1
5358# ---------------------------------------------------------------------------------
5459ARCH := -march=armv8-a+crc+crypto -mtune=cortex-a57 -mtp=soft -fPIE
5560
56- CFLAGS := -g -Wall -O2 -ffunction-sections \
61+ CFLAGS := -g -Wall -O3 -ffunction-sections \
5762 $(ARCH ) $(DEFINES )
5863
59- CFLAGS += $(INCLUDE ) -D__SWITCH__
64+ CFLAGS += $(INCLUDE ) -D__SWITCH__ -DVERSION=\"v $( APP_VERSION ) \"
6065
61- CXXFLAGS := $(CFLAGS ) -fno-rtti -fno- exceptions -std=c++17
66+ CXXFLAGS := $(CFLAGS ) -fno-exceptions -std=c++17
6267
6368ASFLAGS := -g $(ARCH )
6469LDFLAGS = -specs=$(DEVKITPRO ) /libnx/switch.specs -g $(ARCH ) -Wl,-Map,$(notdir $* .map)
6570
66- LIBS := -lcurl -lmbedtls -lmbedx509 -lz -lmbedcrypto -lnx -ltesla -lnx
71+ LIBS := -lcurl -lmbedtls -lmbedx509 -lz -lmbedcrypto -lnx
6772
6873# ---------------------------------------------------------------------------------
6974# list of directories containing libraries, this must be the top level containing
7075# include and lib
7176# ---------------------------------------------------------------------------------
72- LIBDIRS := $(PORTLIBS ) $(LIBNX ) $( TOPDIR ) /libs/libtesla
77+ LIBDIRS := $(PORTLIBS ) $(LIBNX )
7378
7479
7580# ---------------------------------------------------------------------------------
@@ -171,7 +176,6 @@ $(BUILD):
171176
172177# ---------------------------------------------------------------------------------
173178clean :
174- @$(MAKE ) --no-print-directory -C $(TOPDIR ) /libs/libtesla -f Makefile clean
175179 @rm -fr $(BUILD ) $(TARGET ) .ovl $(TARGET ) .nro $(TARGET ) .nacp $(TARGET ) .elf
176180
177181
@@ -190,17 +194,10 @@ $(OUTPUT).ovl : $(OUTPUT).elf $(OUTPUT).nacp
190194 @elf2nro $< $@ $(NROFLAGS )
191195 @echo " built ... $( notdir $( OUTPUT) .ovl) "
192196
193- $(OUTPUT ) .elf : $(OFILES ) libs/libtesla/lib/libtesla.a
197+ $(OUTPUT ) .elf : $(OFILES )
194198
195199$(OFILES_SRC ) : $(HFILES_BIN )
196200
197- libs/libtesla/lib/libtesla.a :
198- @$(MAKE ) --no-print-directory -C $(TOPDIR ) /libs/libtesla -f Makefile
199-
200- clean :
201- @$(MAKE ) --no-print-directory -C $(TOPDIR ) /libs/libtesla -f Makefile clean
202- @rm -fr $(BUILD ) $(TARGET ) .ovl $(TARGET ) .nro $(TARGET ) .nacp $(TARGET ) .elf
203-
204201# ---------------------------------------------------------------------------------
205202# you need a rule like this for each extension you use as binary data
206203# ---------------------------------------------------------------------------------
0 commit comments