diff --git a/makefile b/makefile index 74f5554d8..fea618ca5 100644 --- a/makefile +++ b/makefile @@ -43,7 +43,8 @@ projgen: ## Generate project files for all configurations. $(GENIE) --with-tools --with-combined-examples --vs=winstore100 vs2017 $(GENIE) --with-tools --with-combined-examples --with-shared-lib --gcc=mingw-gcc gmake $(GENIE) --with-tools --with-combined-examples --with-shared-lib --gcc=linux-gcc gmake - $(GENIE) --with-tools --with-combined-examples --with-shared-lib --gcc=osx gmake + $(GENIE) --with-tools --with-combined-examples --with-shared-lib --gcc=osx-x64 gmake + $(GENIE) --with-tools --with-combined-examples --with-shared-lib --gcc=osx-arm64 gmake $(GENIE) --with-tools --with-combined-examples --with-shared-lib --xcode=osx xcode9 $(GENIE) --with-tools --with-combined-examples --with-shared-lib --xcode=ios xcode9 $(GENIE) --with-combined-examples --with-shared-lib --gcc=freebsd gmake @@ -169,23 +170,26 @@ vs2017-winstore100-release64: .build/projects/vs2017-winstore100 ## Build - vs20 devenv .build/projects/vs2017-winstore100/bgfx.sln /Build "Release|x64" vs2017-winstore100: vs2017-winstore100-debug32 vs2017-winstore100-release32 vs2017-winstore100-debug64 vs2017-winstore100-release64 ## Build - vs2017-winstore100 x86/x64 Debug and Release -.build/projects/gmake-osx: - $(GENIE) --with-tools --with-combined-examples --with-shared-lib --gcc=osx gmake -osx-debug64: osx-debug64-x86 osx-debug64-arm64 ## Build - macOS Universal Debug -osx-release64: osx-release64-x86 osx-release64-arm64 ## Build - macOS Universal Release -osx: osx-debug64 osx-release64 ## Build - macOS Universal Debug and Release +.build/projects/gmake-osx-x64: + $(GENIE) --with-tools --with-combined-examples --with-shared-lib --gcc=osx-x64 gmake +.build/projects/gmake-osx-arm64: + $(GENIE) --with-tools --with-combined-examples --with-shared-lib --gcc=osx-arm64 gmake -osx-debug64-x86: .build/projects/gmake-osx ## Build - macOS x64 Debug - $(MAKE) -C .build/projects/gmake-osx config=debug64 -osx-release64-x86: .build/projects/gmake-osx ## Build - macOS x64 Release - $(MAKE) -C .build/projects/gmake-osx config=release64 -osx-x86: osx-debug64 osx-release64 ## Build - macOS x64 Debug and Release +osx-debug: osx-x64-debug osx-arm64-debug ## Build - macOS Universal Debug +osx-release: osx-x64-release osx-arm64-release ## Build - macOS Universal Release +osx: osx-debug osx-release ## Build - macOS Universal Debug and Release -osx-debug64-arm64: .build/projects/gmake-osx ## Build - macOS ARM Debug - $(MAKE) -C .build/projects/gmake-osx config=debug64 ARCH="-arch arm64 -Wno-error=unused-command-line-argument -Wno-unused-command-line-argument" -osx-release64-arm64: .build/projects/gmake-osx ## Build - macOS ARM Release - $(MAKE) -C .build/projects/gmake-osx config=release64 ARCH="-arch arm64 -Wno-error=unused-command-line-argument -Wno-unused-command-line-argument" -osx-arm: osx-debug64-arm64 osx-release64-arm64 ## Build - macOS ARM Debug and Release +osx-x64-debug: .build/projects/gmake-osx-x64 ## Build - macOS x64 Debug + $(MAKE) -C .build/projects/gmake-osx-x64 config=debug +osx-x64-release: .build/projects/gmake-osx-x64 ## Build - macOS x64 Release + $(MAKE) -C .build/projects/gmake-osx-x64 config=release +osx-x64: osx-x64-debug osx-x64-release ## Build - macOS x64 Debug and Release + +osx-arm64-debug: .build/projects/gmake-osx-arm64 ## Build - macOS ARM Debug + $(MAKE) -C .build/projects/gmake-osx-arm64 config=debug +osx-arm64-release: .build/projects/gmake-osx-arm64 ## Build - macOS ARM Release + $(MAKE) -C .build/projects/gmake-osx-arm64 config=release +osx-arm: osx-arm64-debug osx-arm64-release ## Build - macOS ARM Debug and Release .build/projects/gmake-ios-arm: $(GENIE) --gcc=ios-arm gmake @@ -227,7 +231,7 @@ rpi-release: .build/projects/gmake-rpi ## Build - RasberryPi Release $(MAKE) -R -C .build/projects/gmake-rpi config=release rpi: rpi-debug rpi-release ## Build - RasberryPi Debug and Release -build-darwin: osx +build-darwin: osx-x64 build-linux: linux-debug64 linux-release64 @@ -257,9 +261,9 @@ UNAME := $(shell uname) ifeq ($(UNAME),$(filter $(UNAME),Linux Darwin FreeBSD GNU/kFreeBSD)) ifeq ($(UNAME),$(filter $(UNAME),Darwin)) OS=darwin -BUILD_PROJECT_DIR=gmake-osx -BUILD_OUTPUT_DIR=osx64_clang -BUILD_TOOLS_CONFIG=release64 +BUILD_PROJECT_DIR=gmake-osx-x64 +BUILD_OUTPUT_DIR=osx-x64 +BUILD_TOOLS_CONFIG=release BUILD_TOOLS_SUFFIX=Release EXE= else @@ -337,16 +341,16 @@ dist-linux: .build/projects/gmake-linux $(SILENT) $(MAKE) -C .build/projects/gmake-linux config=release64 -j 6 texturev $(SILENT) cp .build/linux64_gcc/bin/texturevRelease tools/bin/linux/texturev -dist-darwin: .build/projects/gmake-osx - $(SILENT) $(MAKE) -C .build/projects/gmake-osx config=release64 -j 6 geometryc - $(SILENT) cp .build/osx64_clang/bin/geometrycRelease tools/bin/darwin/geometryc - $(SILENT) $(MAKE) -C .build/projects/gmake-osx config=release64 -j 6 geometryv - $(SILENT) cp .build/osx64_clang/bin/geometryvRelease tools/bin/darwin/geometryv - $(SILENT) $(MAKE) -C .build/projects/gmake-osx config=release64 -j 6 shaderc - $(SILENT) cp .build/osx64_clang/bin/shadercRelease tools/bin/darwin/shaderc - $(SILENT) $(MAKE) -C .build/projects/gmake-osx config=release64 -j 6 texturec - $(SILENT) cp .build/osx64_clang/bin/texturecRelease tools/bin/darwin/texturec - $(SILENT) $(MAKE) -C .build/projects/gmake-osx config=release64 -j 6 texturev - $(SILENT) cp .build/osx64_clang/bin/texturevRelease tools/bin/darwin/texturev +dist-darwin: .build/projects/gmake-osx-x64 + $(SILENT) $(MAKE) -C .build/projects/gmake-osx-x64 config=release -j 6 geometryc + $(SILENT) cp .build/osx-x64/bin/geometrycRelease tools/bin/darwin/geometryc + $(SILENT) $(MAKE) -C .build/projects/gmake-osx-x64 config=release -j 6 geometryv + $(SILENT) cp .build/osx-x64/bin/geometryvRelease tools/bin/darwin/geometryv + $(SILENT) $(MAKE) -C .build/projects/gmake-osx-x64 config=release -j 6 shaderc + $(SILENT) cp .build/osx-x64/bin/shadercRelease tools/bin/darwin/shaderc + $(SILENT) $(MAKE) -C .build/projects/gmake-osx-x64 config=release -j 6 texturec + $(SILENT) cp .build/osx-x64/bin/texturecRelease tools/bin/darwin/texturec + $(SILENT) $(MAKE) -C .build/projects/gmake-osx-x64 config=release -j 6 texturev + $(SILENT) cp .build/osx-x64/bin/texturevRelease tools/bin/darwin/texturev dist: clean dist-windows dist-linux dist-darwin diff --git a/scripts/bgfx.lua b/scripts/bgfx.lua index 0618c27dc..14b03119b 100644 --- a/scripts/bgfx.lua +++ b/scripts/bgfx.lua @@ -138,7 +138,7 @@ function bgfxProjectBase(_kind, _defines) "-Wno-microsoft-const-init", -- default initialization of an object of const type '' without a user-provided default constructor is a Microsoft extension } - configuration { "osx" } + configuration { "osx*" } buildoptions { "-x objective-c++" } -- additional build option for osx linkoptions { "-framework Cocoa", @@ -232,7 +232,7 @@ function bgfxProjectBase(_kind, _defines) path.join(BGFX_DIR, "src/vertexlayout.cpp"), } - configuration { "xcode* or osx or ios*" } + configuration { "xcode* or osx* or ios*" } files { path.join(BGFX_DIR, "src/amalgamated.mm"), } @@ -243,7 +243,7 @@ function bgfxProjectBase(_kind, _defines) path.join(BGFX_DIR, "src/amalgamated.cpp"), } - configuration { "not (xcode* or osx or ios*)" } + configuration { "not (xcode* or osx* or ios*)" } excludes { path.join(BGFX_DIR, "src/**.mm"), } @@ -251,7 +251,7 @@ function bgfxProjectBase(_kind, _defines) configuration {} else - configuration { "xcode* or osx or ios*" } + configuration { "xcode* or osx* or ios*" } files { path.join(BGFX_DIR, "src/glcontext_**.mm"), path.join(BGFX_DIR, "src/renderer_**.mm"), diff --git a/scripts/example-common.lua b/scripts/example-common.lua index b6fba93fc..9ac5a48d1 100644 --- a/scripts/example-common.lua +++ b/scripts/example-common.lua @@ -77,7 +77,7 @@ project ("example-common") } end - configuration { "osx or ios* or tvos*" } + configuration { "osx* or ios* or tvos*" } files { path.join(BGFX_DIR, "examples/common/**.mm"), } diff --git a/scripts/genie.lua b/scripts/genie.lua index ebe574857..183a27435 100644 --- a/scripts/genie.lua +++ b/scripts/genie.lua @@ -255,7 +255,7 @@ function exampleProjectDefaults() } end - configuration { "osx" } + configuration { "osx*" } libdirs { "$(SDL2_DIR)/lib" } configuration {} @@ -280,7 +280,7 @@ function exampleProjectDefaults() } end - configuration { "osx" } + configuration { "osx*" } linkoptions { "-framework CoreVideo", "-framework IOKit", @@ -401,7 +401,7 @@ function exampleProjectDefaults() "pthread", } - configuration { "osx" } + configuration { "osx*" } linkoptions { "-framework Cocoa", "-framework QuartzCore", diff --git a/scripts/geometryc.lua b/scripts/geometryc.lua index d51dc2ac8..c07ef1f32 100644 --- a/scripts/geometryc.lua +++ b/scripts/geometryc.lua @@ -33,7 +33,7 @@ project "geometryc" "psapi", } - configuration { "osx" } + configuration { "osx*" } links { "Cocoa.framework", } diff --git a/scripts/geometryv.lua b/scripts/geometryv.lua index 328789414..acfa778d0 100644 --- a/scripts/geometryv.lua +++ b/scripts/geometryv.lua @@ -52,7 +52,7 @@ project ("geometryv") "Xcursor", } - configuration { "osx" } + configuration { "osx*" } linkoptions { "-framework CoreVideo", "-framework IOKit", @@ -138,7 +138,7 @@ project ("geometryv") "pthread", } - configuration { "osx" } + configuration { "osx*" } linkoptions { "-framework Cocoa", "-framework Metal", diff --git a/scripts/shaderc.lua b/scripts/shaderc.lua index 30ac3d4e3..50c9c04c6 100644 --- a/scripts/shaderc.lua +++ b/scripts/shaderc.lua @@ -141,7 +141,7 @@ project "spirv-opt" "/wd4706", -- warning C4706: assignment within conditional expression } - configuration { "mingw* or linux or osx" } + configuration { "mingw* or linux* or osx*" } buildoptions { "-Wno-switch", } @@ -197,7 +197,7 @@ project "spirv-cross" "/wd4715", -- warning C4715: '': not all control paths return a value } - configuration { "mingw* or linux or osx" } + configuration { "mingw* or linux* or osx*" } buildoptions { "-Wno-type-limits", } @@ -268,12 +268,17 @@ project "glslang" "/wd4838", -- warning C4838: conversion from 'spv::GroupOperation' to 'unsigned int' requires a narrowing conversion } - configuration { "mingw* or linux or osx" } + configuration { "mingw* or linux*" } buildoptions { - "-Wno-ignored-qualifiers", - "-Wno-implicit-fallthrough", "-Wno-logical-op", "-Wno-maybe-uninitialized", + } + + configuration { "mingw* or linux* or osx*" } + buildoptions { + "-fno-strict-aliasing", -- glslang has bugs if strict aliasing is used. + "-Wno-ignored-qualifiers", + "-Wno-implicit-fallthrough", "-Wno-missing-field-initializers", "-Wno-reorder", "-Wno-return-type", @@ -287,7 +292,7 @@ project "glslang" "-Wno-unused-variable", } - configuration { "osx" } + configuration { "osx*" } buildoptions { "-Wno-c++11-extensions", "-Wno-unused-const-variable", @@ -299,11 +304,6 @@ project "glslang" "-Wno-unused-but-set-variable", } - configuration { "mingw* or linux or osx" } - buildoptions { - "-fno-strict-aliasing", -- glslang has bugs if strict aliasing is used. - } - configuration {} project "glsl-optimizer" @@ -530,7 +530,7 @@ project "glsl-optimizer" "/wd4996", -- warning C4996: 'strdup': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strdup. } - configuration { "mingw* or linux or osx" } + configuration { "mingw* or linux* or osx*" } buildoptions { "-fno-strict-aliasing", -- glsl-optimizer has bugs if strict aliasing is used. @@ -545,7 +545,7 @@ project "glsl-optimizer" "-Wshadow", -- glsl-optimizer is full of -Wshadow warnings ignore it. } - configuration { "osx" } + configuration { "osx*" } buildoptions { "-Wno-deprecated-register", } @@ -641,7 +641,7 @@ project "shaderc" configuration { "mingw-*" } targetextension ".exe" - configuration { "osx" } + configuration { "osx*" } links { "Cocoa.framework", } @@ -656,7 +656,7 @@ project "shaderc" "psapi", } - configuration { "osx or linux*" } + configuration { "osx* or linux*" } links { "pthread", } diff --git a/scripts/texturec.lua b/scripts/texturec.lua index cfa42ff0f..5807b6a6c 100644 --- a/scripts/texturec.lua +++ b/scripts/texturec.lua @@ -31,7 +31,7 @@ project "texturec" "psapi", } - configuration { "osx" } + configuration { "osx*" } links { "Cocoa.framework", } diff --git a/scripts/texturev.lua b/scripts/texturev.lua index dd794f662..7c1c43c5f 100644 --- a/scripts/texturev.lua +++ b/scripts/texturev.lua @@ -52,7 +52,7 @@ project ("texturev") "Xcursor", } - configuration { "osx" } + configuration { "osx*" } linkoptions { "-framework CoreVideo", "-framework IOKit", @@ -138,7 +138,7 @@ project ("texturev") "pthread", } - configuration { "osx" } + configuration { "osx*" } linkoptions { "-framework Cocoa", "-framework Metal",