RLM_SDK = rlm.v14.2BL5

RG_REPOS_DIR = ../../../..
FUSE_PROJECTS = ../../../projects
FUSE_CONTRIBS = ../../../contrib
RGFRAMEWORK_REPO_DIR = $(RG_REPOS_DIR)/foundation
RGFRAMEWORK_CONTRIB_DIR = $(RGFRAMEWORK_REPO_DIR)/contrib
BOOST_DIR = $(RGFRAMEWORK_CONTRIB_DIR)/boost/mac
OPENSSL_DIR = $(RGFRAMEWORK_CONTRIB_DIR)/openssl/mac
SQLCIPHER_DIR = $(RGFRAMEWORK_CONTRIB_DIR)/sqlcipher
TINYXML_DIR = $(RGFRAMEWORK_CONTRIB_DIR)/tinyxml
ZIPUTILS_DIR = $(RGFRAMEWORK_CONTRIB_DIR)/ziputils
ZLIB_DIR = $(RGFRAMEWORK_CONTRIB_DIR)/zlib
RGLICENSING_DIR = $(RG_REPOS_DIR)/rglicensing
RGLICENSING_CONTRIB_DIR = $(RGLICENSING_DIR)/contrib
LOG4CPP_DIR = $(RGLICENSING_CONTRIB_DIR)/log4cpp/mac
MXO_DIR = $(RG_REPOS_DIR)/maxon-one-api
MXPACKAGES_DIR = $(FUSE_PROJECTS)/mxpackages
RLM_DIR = $(FUSE_CONTRIBS)/rlm-sdk/$(RLM_SDK)
REVENERA_DIR = $(RGFRAMEWORK_CONTRIB_DIR)/revenera

// Build output paths ----------------
SYMROOT = ../../../outputs
OBJROOT = $(SYMROOT)/intermediate

// Header and Libs search paths ------
HEADER_SEARCH_PATHS = $(RGFRAMEWORK_REPO_DIR) $(RGFRAMEWORK_REPO_DIR)/RGFramework $(BOOST_DIR) $(OPENSSL_DIR)/include $(RGLICENSING_CONTRIB_DIR) $(RGLICENSING_DIR)/src $(LOG4CPP_DIR)/include $(TINYXML_DIR) $(ZLIB_DIR)/minizip $(ZIPUTILS_DIR) $(SQLCIPHER_DIR) $(MXO_DIR)/include $(MXPACKAGES_DIR) $(FUSE_PROJECTS) $(RLM_DIR)/include
LIBRARY_SEARCH_PATHS = $(RGFRAMEWORK_REPO_DIR)/outputs/RGFramework64/$(CONFIGURATION) $(LOG4CPP_DIR)/lib $(BOOST_DIR)/lib $(OPENSSL_DIR)/lib $(RLM_DIR)/mac $(REVENERA_DIR)/mac/lib
OTHER_CFLAGS = -DMAXON_TARGET_MACOS=1 -DOS_MACOSX=1 -DFUSE_LICENSING_ENABLED=1 -DRGL_HAS_LOG4CPP=1 -DLOG4CPP_FIX_ERROR_COLLISION=1 -DFUSE_SUPPORT_ENABLED=1 -DFUSE_SERVER_HOSTED=1 -DANALYTICS_DISABLE_JOURNAL_INGEST=1 -DANALYTICS_USES_CURL=1
OTHER_LDFLAGS = -lboost_date_time -lboost_system -lboost_filesystem -lboost_thread -lboost_regex -lcrypto -lRGFramework64 -headerpad_max_install_names
OTHER_LIBTOOLFLAGS = $(OTHER_LDFLAGS)

// Language and platform settings ----
ALWAYS_SEARCH_USER_PATHS = NO
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon
GCC_C_LANGUAGE_STANDARD = gnu11
GCC_INLINES_ARE_PRIVATE_EXTERN = YES
CLANG_ANALYZER_NONNULL = YES
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE
CLANG_CXX_LANGUAGE_STANDARD=gnu++14
CLANG_CXX_LIBRARY = libc++
CLANG_ENABLE_MODULES = YES
CLANG_ENABLE_OBJC_ARC = YES
CLANG_ENABLE_OBJC_WEAK = YES
COMBINE_HIDPI_IMAGES = YES
COPY_PHASE_STRIP = NO
ENABLE_STRICT_OBJC_MSGSEND = YES
GCC_NO_COMMON_BLOCKS = YES
MACOSX_DEPLOYMENT_TARGET = 10.14
MTL_FAST_MATH = YES
SDKROOT = macosx
PRODUCT_NAME = $(TARGET_NAME)
VALID_ARCHS=x86_64 arm64

// All warnings
CLANG_WARN_ASSIGN_ENUM = YES;
CLANG_WARN_ATOMIC_IMPLICIT_SEQ_CST = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES_ERROR;
CLANG_WARN_BOOL_CONVERSION = YES_ERROR;
CLANG_WARN_COMMA = YES_ERROR;
CLANG_WARN_COMPLETION_HANDLER_MISUSE = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES_ERROR;
CLANG_WARN_CXX0X_EXTENSIONS = YES;
CLANG_WARN_DELETE_NON_VIRTUAL_DTOR = YES_ERROR;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES_ERROR;
CLANG_WARN_FLOAT_CONVERSION = YES_ERROR;
CLANG_WARN_FRAMEWORK_INCLUDE_PRIVATE_FROM_PUBLIC = YES;
CLANG_WARN_IMPLICIT_SIGN_CONVERSION = NO;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES_ERROR;
CLANG_WARN_MISSING_NOESCAPE = YES_ERROR;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES_ERROR;
CLANG_WARN_OBJC_EXPLICIT_OWNERSHIP_TYPE = YES;
CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_INTERFACE_IVARS = YES_ERROR;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES_ERROR;
CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS = YES;
CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES_AGGRESSIVE;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_PRAGMA_PACK = YES_ERROR;
CLANG_WARN_PRIVATE_MODULE = YES;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_SEMICOLON_BEFORE_METHOD_BODY = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES_AGGRESSIVE;
CLANG_WARN_VEXING_PARSE = YES_ERROR;
CLANG_WARN__ARC_BRIDGE_CAST_NONARC = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CLANG_WARN__EXIT_TIME_DESTRUCTORS = NO;
GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES_ERROR;
GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS = NO;
GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO = YES;
GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES;
GCC_WARN_ABOUT_MISSING_NEWLINE = YES;
GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO;
GCC_WARN_ABOUT_POINTER_SIGNEDNESS = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL = YES;
GCC_WARN_CHECK_SWITCH_STATEMENTS = YES;
GCC_WARN_FOUR_CHARACTER_CONSTANTS = NO;
GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES;
GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES;
GCC_WARN_MISSING_PARENTHESES = YES;
GCC_WARN_NON_VIRTUAL_DESTRUCTOR = YES;
GCC_WARN_SHADOW = YES;
GCC_WARN_SIGN_COMPARE = YES;
GCC_WARN_STRICT_SELECTOR_MATCH = YES;
GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNKNOWN_PRAGMAS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_LABEL = YES;
GCC_WARN_UNUSED_PARAMETER = NO;
GCC_WARN_UNUSED_VALUE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
