@@ -1,11 +1,8 @@ | |||||
MACHINE = $(shell $(CC) -dumpmachine) | MACHINE = $(shell $(CC) -dumpmachine) | ||||
ifneq (,$(findstring x86_64-,$(MACHINE))) | ifneq (,$(findstring x86_64-,$(MACHINE))) | ||||
ARCH_x64 := 1 | |||||
ARCH_X64 := 1 | |||||
ARCH_NAME := x64 | ARCH_NAME := x64 | ||||
else ifneq (,$(findstring i686-,$(MACHINE))) | |||||
ARCH_x86 := 1 | |||||
ARCH_NAME := x86 | |||||
else | else | ||||
$(error Could not determine CPU architecture of $(MACHINE). Try hacking around in arch.mk) | $(error Could not determine CPU architecture of $(MACHINE). Try hacking around in arch.mk) | ||||
endif | endif | ||||
@@ -21,6 +21,10 @@ FLAGS += -Wall -Wextra -Wno-unused-parameter | |||||
CXXFLAGS += -std=c++11 | CXXFLAGS += -std=c++11 | ||||
# Architecture-independent flags | # Architecture-independent flags | ||||
ifdef ARCH_X64 | |||||
FLAGS += -DARCH_X64 | |||||
endif | |||||
ifdef ARCH_LIN | ifdef ARCH_LIN | ||||
FLAGS += -DARCH_LIN | FLAGS += -DARCH_LIN | ||||
CXXFLAGS += -Wsuggest-override | CXXFLAGS += -Wsuggest-override | ||||
@@ -259,6 +259,7 @@ extern const std::string APP_EDITION_NAME; | |||||
extern const std::string APP_VERSION_MAJOR; | extern const std::string APP_VERSION_MAJOR; | ||||
extern const std::string APP_VERSION; | extern const std::string APP_VERSION; | ||||
extern const std::string APP_OS; | extern const std::string APP_OS; | ||||
extern const std::string APP_ARCH; | |||||
extern const std::string API_URL; | extern const std::string API_URL; | ||||
@@ -27,6 +27,9 @@ const std::string APP_VERSION = TOSTRING(_APP_VERSION); | |||||
#elif defined ARCH_LIN | #elif defined ARCH_LIN | ||||
const std::string APP_OS = "lin"; | const std::string APP_OS = "lin"; | ||||
#endif | #endif | ||||
#if defined ARCH_X64 | |||||
const std::string APP_ARCH = "x64"; | |||||
#endif | |||||
const std::string API_URL = "https://api.vcvrack.com"; | const std::string API_URL = "https://api.vcvrack.com"; | ||||