mirror of
https://github.com/holub/mame
synced 2025-04-25 09:50:04 +03:00
Merge remote-tracking branch 'refs/remotes/mamedev/master'
This commit is contained in:
commit
56c06fd42d
@ -10,6 +10,7 @@ build:
|
||||
- SUBTARGET=tiny
|
||||
- MINGW32=/c/msys32/mingw32
|
||||
- MAME_EXE=mametiny.exe
|
||||
- IGNORE_GIT=1
|
||||
# - SOURCES=src/mame/drivers/pacman.cpp
|
||||
commands:
|
||||
# - pacman -S -q --noprogressbar --noconfirm winpty
|
||||
|
@ -23,8 +23,8 @@ env:
|
||||
script:
|
||||
- if [ $TRAVIS_OS_NAME == 'linux' ]; then
|
||||
if [ $CC == 'clang' ]; then
|
||||
make -j2 OVERRIDE_CXX="clang++-3.6" OVERRIDE_CC="clang-3.6" && ./$MAME -validate;
|
||||
else make -j4 OPTIMIZE=0 OVERRIDE_CC="gcc-5" OVERRIDE_CXX="g++-5" && ./$MAME -validate;
|
||||
make -j2 IGNORE_GIT=1 OVERRIDE_CXX="clang++-3.6" OVERRIDE_CC="clang-3.6" && ./$MAME -validate;
|
||||
else make -j4 IGNORE_GIT=1 OPTIMIZE=0 OVERRIDE_CC="gcc-5" OVERRIDE_CXX="g++-5" && ./$MAME -validate;
|
||||
fi
|
||||
elif [ $TRAVIS_OS_NAME == 'osx' ]; then
|
||||
unset LDOPTS && make -j2 OPTIMIZE=0 USE_LIBSDL=1 && ./$MAME -validate;
|
||||
@ -43,4 +43,4 @@ branches:
|
||||
- master
|
||||
notifications:
|
||||
email: false
|
||||
|
||||
|
||||
|
4
3rdparty/bgfx/3rdparty/.editorconfig
vendored
4
3rdparty/bgfx/3rdparty/.editorconfig
vendored
@ -20,6 +20,10 @@ indent_size = 4
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
[ocornut-imgui/*.inl]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
[pvrtc/*]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
@ -1,98 +0,0 @@
|
||||
//
|
||||
// File: vk_lunarg_debug_marker.h
|
||||
//
|
||||
/*
|
||||
* Copyright (c) 2015-2016 The Khronos Group Inc.
|
||||
* Copyright (c) 2015-2016 Valve Corporation
|
||||
* Copyright (c) 2015-2016 LunarG, Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and/or associated documentation files (the "Materials"), to
|
||||
* deal in the Materials without restriction, including without limitation the
|
||||
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
* sell copies of the Materials, and to permit persons to whom the Materials are
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice(s) and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Materials.
|
||||
*
|
||||
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
*
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE
|
||||
* USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
*
|
||||
* Authors:
|
||||
* Jon Ashburn <jon@lunarg.com>
|
||||
* Courtney Goeltzenleuchter <courtney@lunarg.com>
|
||||
*/
|
||||
|
||||
#ifndef __VK_DEBUG_MARKER_H__
|
||||
#define __VK_DEBUG_MARKER_H__
|
||||
|
||||
#include "vulkan.h"
|
||||
|
||||
#define VK_DEBUG_MARKER_EXTENSION_NUMBER 6
|
||||
#define VK_DEBUG_MARKER_EXTENSION_REVISION 1
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif // __cplusplus
|
||||
|
||||
/*
|
||||
***************************************************************************************************
|
||||
* DebugMarker Vulkan Extension API
|
||||
***************************************************************************************************
|
||||
*/
|
||||
|
||||
#define DEBUG_MARKER_EXTENSION_NAME "VK_LUNARG_DEBUG_MARKER"
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Enumerations
|
||||
|
||||
#define VK_DEBUG_MARKER_ENUM_EXTEND(type, id) \
|
||||
((type)(VK_DEBUG_MARKER_EXTENSION_NUMBER * -1000 + (id)))
|
||||
|
||||
#define VK_OBJECT_INFO_TYPE_DBG_OBJECT_TAG \
|
||||
VK_DEBUG_MARKER_ENUM_EXTEND(VkDbgObjectInfoType, 0)
|
||||
#define VK_OBJECT_INFO_TYPE_DBG_OBJECT_NAME \
|
||||
VK_DEBUG_MARKER_ENUM_EXTEND(VkDbgObjectInfoType, 1)
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// API functions
|
||||
|
||||
typedef void(VKAPI_PTR *PFN_vkCmdDbgMarkerBegin)(VkCommandBuffer commandBuffer,
|
||||
const char *pMarker);
|
||||
typedef void(VKAPI_PTR *PFN_vkCmdDbgMarkerEnd)(VkCommandBuffer commandBuffer);
|
||||
typedef VkResult(VKAPI_PTR *PFN_vkDbgSetObjectTag)(
|
||||
VkDevice device, VkDebugReportObjectTypeEXT objType, uint64_t object,
|
||||
size_t tagSize, const void *pTag);
|
||||
typedef VkResult(VKAPI_PTR *PFN_vkDbgSetObjectName)(
|
||||
VkDevice device, VkDebugReportObjectTypeEXT objType, uint64_t object,
|
||||
size_t nameSize, const char *pName);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
|
||||
// DebugMarker extension entrypoints
|
||||
VKAPI_ATTR void VKAPI_CALL
|
||||
vkCmdDbgMarkerBegin(VkCommandBuffer commandBuffer, const char *pMarker);
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkCmdDbgMarkerEnd(VkCommandBuffer commandBuffer);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL
|
||||
vkDbgSetObjectTag(VkDevice device, VkDebugReportObjectTypeEXT objType,
|
||||
uint64_t object, size_t tagSize, const void *pTag);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL
|
||||
vkDbgSetObjectName(VkDevice device, VkDebugReportObjectTypeEXT objType,
|
||||
uint64_t object, size_t nameSize, const char *pName);
|
||||
|
||||
#endif // VK_NO_PROTOTYPES
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif // __cplusplus
|
||||
|
||||
#endif // __VK_DEBUG_MARKER_H__
|
@ -4,24 +4,17 @@
|
||||
/*
|
||||
** Copyright (c) 2014-2015 The Khronos Group Inc.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||
** copy of this software and/or associated documentation files (the
|
||||
** "Materials"), to deal in the Materials without restriction, including
|
||||
** without limitation the rights to use, copy, modify, merge, publish,
|
||||
** distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
** permit persons to whom the Materials are furnished to do so, subject to
|
||||
** the following conditions:
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** The above copyright notice and this permission notice shall be included
|
||||
** in all copies or substantial portions of the Materials.
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
|
123
3rdparty/bgfx/3rdparty/khronos/vulkan/vulkan.h
vendored
123
3rdparty/bgfx/3rdparty/khronos/vulkan/vulkan.h
vendored
@ -8,24 +8,17 @@ extern "C" {
|
||||
/*
|
||||
** Copyright (c) 2015-2016 The Khronos Group Inc.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||
** copy of this software and/or associated documentation files (the
|
||||
** "Materials"), to deal in the Materials without restriction, including
|
||||
** without limitation the rights to use, copy, modify, merge, publish,
|
||||
** distribute, sublicense, and/or sell copies of the Materials, and to
|
||||
** permit persons to whom the Materials are furnished to do so, subject to
|
||||
** the following conditions:
|
||||
** Licensed under the Apache License, Version 2.0 (the "License");
|
||||
** you may not use this file except in compliance with the License.
|
||||
** You may obtain a copy of the License at
|
||||
**
|
||||
** The above copyright notice and this permission notice shall be included
|
||||
** in all copies or substantial portions of the Materials.
|
||||
** http://www.apache.org/licenses/LICENSE-2.0
|
||||
**
|
||||
** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
** Unless required by applicable law or agreed to in writing, software
|
||||
** distributed under the License is distributed on an "AS IS" BASIS,
|
||||
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
** See the License for the specific language governing permissions and
|
||||
** limitations under the License.
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -50,7 +43,7 @@ extern "C" {
|
||||
#define VK_VERSION_MINOR(version) (((uint32_t)(version) >> 12) & 0x3ff)
|
||||
#define VK_VERSION_PATCH(version) ((uint32_t)(version) & 0xfff)
|
||||
// Version of this file
|
||||
#define VK_HEADER_VERSION 8
|
||||
#define VK_HEADER_VERSION 13
|
||||
|
||||
|
||||
#define VK_NULL_HANDLE 0
|
||||
@ -217,6 +210,10 @@ typedef enum VkStructureType {
|
||||
VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR = 1000008000,
|
||||
VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR = 1000009000,
|
||||
VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT = 1000011000,
|
||||
VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_RASTERIZATION_ORDER_AMD = 1000018000,
|
||||
VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT = 1000022000,
|
||||
VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_TAG_INFO_EXT = 1000022001,
|
||||
VK_STRUCTURE_TYPE_DEBUG_MARKER_MARKER_INFO_EXT = 1000022002,
|
||||
VK_STRUCTURE_TYPE_BEGIN_RANGE = VK_STRUCTURE_TYPE_APPLICATION_INFO,
|
||||
VK_STRUCTURE_TYPE_END_RANGE = VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO,
|
||||
VK_STRUCTURE_TYPE_RANGE_SIZE = (VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO - VK_STRUCTURE_TYPE_APPLICATION_INFO + 1),
|
||||
@ -3175,13 +3172,14 @@ VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSurfaceKHR)
|
||||
|
||||
#define VK_KHR_SURFACE_SPEC_VERSION 25
|
||||
#define VK_KHR_SURFACE_EXTENSION_NAME "VK_KHR_surface"
|
||||
#define VK_COLORSPACE_SRGB_NONLINEAR_KHR VK_COLOR_SPACE_SRGB_NONLINEAR_KHR
|
||||
|
||||
|
||||
typedef enum VkColorSpaceKHR {
|
||||
VK_COLORSPACE_SRGB_NONLINEAR_KHR = 0,
|
||||
VK_COLOR_SPACE_BEGIN_RANGE_KHR = VK_COLORSPACE_SRGB_NONLINEAR_KHR,
|
||||
VK_COLOR_SPACE_END_RANGE_KHR = VK_COLORSPACE_SRGB_NONLINEAR_KHR,
|
||||
VK_COLOR_SPACE_RANGE_SIZE_KHR = (VK_COLORSPACE_SRGB_NONLINEAR_KHR - VK_COLORSPACE_SRGB_NONLINEAR_KHR + 1),
|
||||
VK_COLOR_SPACE_SRGB_NONLINEAR_KHR = 0,
|
||||
VK_COLOR_SPACE_BEGIN_RANGE_KHR = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR,
|
||||
VK_COLOR_SPACE_END_RANGE_KHR = VK_COLOR_SPACE_SRGB_NONLINEAR_KHR,
|
||||
VK_COLOR_SPACE_RANGE_SIZE_KHR = (VK_COLOR_SPACE_SRGB_NONLINEAR_KHR - VK_COLOR_SPACE_SRGB_NONLINEAR_KHR + 1),
|
||||
VK_COLOR_SPACE_MAX_ENUM_KHR = 0x7FFFFFFF
|
||||
} VkColorSpaceKHR;
|
||||
|
||||
@ -3278,7 +3276,7 @@ VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfacePresentModesKHR(
|
||||
#define VK_KHR_swapchain 1
|
||||
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSwapchainKHR)
|
||||
|
||||
#define VK_KHR_SWAPCHAIN_SPEC_VERSION 67
|
||||
#define VK_KHR_SWAPCHAIN_SPEC_VERSION 68
|
||||
#define VK_KHR_SWAPCHAIN_EXTENSION_NAME "VK_KHR_swapchain"
|
||||
|
||||
typedef VkFlags VkSwapchainCreateFlagsKHR;
|
||||
@ -3434,7 +3432,7 @@ typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceDisplayPropertiesKHR)(VkPhys
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR)(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkDisplayPlanePropertiesKHR* pProperties);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetDisplayPlaneSupportedDisplaysKHR)(VkPhysicalDevice physicalDevice, uint32_t planeIndex, uint32_t* pDisplayCount, VkDisplayKHR* pDisplays);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetDisplayModePropertiesKHR)(VkPhysicalDevice physicalDevice, VkDisplayKHR display, uint32_t* pPropertyCount, VkDisplayModePropertiesKHR* pProperties);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateDisplayModeKHR)(VkPhysicalDevice physicalDevice, VkDisplayKHR display, const VkDisplayModeCreateInfoKHR*pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDisplayModeKHR* pMode);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateDisplayModeKHR)(VkPhysicalDevice physicalDevice, VkDisplayKHR display, const VkDisplayModeCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDisplayModeKHR* pMode);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkGetDisplayPlaneCapabilitiesKHR)(VkPhysicalDevice physicalDevice, VkDisplayModeKHR mode, uint32_t planeIndex, VkDisplayPlaneCapabilitiesKHR* pCapabilities);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkCreateDisplayPlaneSurfaceKHR)(VkInstance instance, const VkDisplaySurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
|
||||
|
||||
@ -3835,6 +3833,85 @@ VKAPI_ATTR void VKAPI_CALL vkDebugReportMessageEXT(
|
||||
#define VK_IMG_FILTER_CUBIC_EXTENSION_NAME "VK_IMG_filter_cubic"
|
||||
|
||||
|
||||
#define VK_AMD_rasterization_order 1
|
||||
#define VK_AMD_RASTERIZATION_ORDER_SPEC_VERSION 1
|
||||
#define VK_AMD_RASTERIZATION_ORDER_EXTENSION_NAME "VK_AMD_rasterization_order"
|
||||
|
||||
|
||||
typedef enum VkRasterizationOrderAMD {
|
||||
VK_RASTERIZATION_ORDER_STRICT_AMD = 0,
|
||||
VK_RASTERIZATION_ORDER_RELAXED_AMD = 1,
|
||||
VK_RASTERIZATION_ORDER_BEGIN_RANGE_AMD = VK_RASTERIZATION_ORDER_STRICT_AMD,
|
||||
VK_RASTERIZATION_ORDER_END_RANGE_AMD = VK_RASTERIZATION_ORDER_RELAXED_AMD,
|
||||
VK_RASTERIZATION_ORDER_RANGE_SIZE_AMD = (VK_RASTERIZATION_ORDER_RELAXED_AMD - VK_RASTERIZATION_ORDER_STRICT_AMD + 1),
|
||||
VK_RASTERIZATION_ORDER_MAX_ENUM_AMD = 0x7FFFFFFF
|
||||
} VkRasterizationOrderAMD;
|
||||
|
||||
typedef struct VkPipelineRasterizationStateRasterizationOrderAMD {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkRasterizationOrderAMD rasterizationOrder;
|
||||
} VkPipelineRasterizationStateRasterizationOrderAMD;
|
||||
|
||||
|
||||
|
||||
#define VK_EXT_debug_marker 1
|
||||
#define VK_EXT_DEBUG_MARKER_SPEC_VERSION 3
|
||||
#define VK_EXT_DEBUG_MARKER_EXTENSION_NAME "VK_EXT_debug_marker"
|
||||
|
||||
typedef struct VkDebugMarkerObjectNameInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkDebugReportObjectTypeEXT objectType;
|
||||
uint64_t object;
|
||||
const char* pObjectName;
|
||||
} VkDebugMarkerObjectNameInfoEXT;
|
||||
|
||||
typedef struct VkDebugMarkerObjectTagInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
VkDebugReportObjectTypeEXT objectType;
|
||||
uint64_t object;
|
||||
uint64_t tagName;
|
||||
size_t tagSize;
|
||||
const void* pTag;
|
||||
} VkDebugMarkerObjectTagInfoEXT;
|
||||
|
||||
typedef struct VkDebugMarkerMarkerInfoEXT {
|
||||
VkStructureType sType;
|
||||
const void* pNext;
|
||||
const char* pMarkerName;
|
||||
float color[4];
|
||||
} VkDebugMarkerMarkerInfoEXT;
|
||||
|
||||
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkDebugMarkerSetObjectTagEXT)(VkDevice device, VkDebugMarkerObjectTagInfoEXT* pTagInfo);
|
||||
typedef VkResult (VKAPI_PTR *PFN_vkDebugMarkerSetObjectNameEXT)(VkDevice device, VkDebugMarkerObjectNameInfoEXT* pNameInfo);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdDebugMarkerBeginEXT)(VkCommandBuffer commandBuffer, VkDebugMarkerMarkerInfoEXT* pMarkerInfo);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdDebugMarkerEndEXT)(VkCommandBuffer commandBuffer);
|
||||
typedef void (VKAPI_PTR *PFN_vkCmdDebugMarkerInsertEXT)(VkCommandBuffer commandBuffer, VkDebugMarkerMarkerInfoEXT* pMarkerInfo);
|
||||
|
||||
#ifndef VK_NO_PROTOTYPES
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkDebugMarkerSetObjectTagEXT(
|
||||
VkDevice device,
|
||||
VkDebugMarkerObjectTagInfoEXT* pTagInfo);
|
||||
|
||||
VKAPI_ATTR VkResult VKAPI_CALL vkDebugMarkerSetObjectNameEXT(
|
||||
VkDevice device,
|
||||
VkDebugMarkerObjectNameInfoEXT* pNameInfo);
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkCmdDebugMarkerBeginEXT(
|
||||
VkCommandBuffer commandBuffer,
|
||||
VkDebugMarkerMarkerInfoEXT* pMarkerInfo);
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkCmdDebugMarkerEndEXT(
|
||||
VkCommandBuffer commandBuffer);
|
||||
|
||||
VKAPI_ATTR void VKAPI_CALL vkCmdDebugMarkerInsertEXT(
|
||||
VkCommandBuffer commandBuffer,
|
||||
VkDebugMarkerMarkerInfoEXT* pMarkerInfo);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
10
3rdparty/bgfx/3rdparty/lodepng/README.md
vendored
Normal file
10
3rdparty/bgfx/3rdparty/lodepng/README.md
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
LodePNG
|
||||
-------
|
||||
|
||||
PNG encoder and decoder in C and C++.
|
||||
|
||||
Home page: http://lodev.org/lodepng/
|
||||
|
||||
Only two files are needed to allow your program to read and write PNG files: lodepng.cpp and lodepng.h.
|
||||
|
||||
The other files in the project are just examples, unit tests, etc...
|
6224
3rdparty/bgfx/3rdparty/lodepng/lodepng.cpp
vendored
Normal file
6224
3rdparty/bgfx/3rdparty/lodepng/lodepng.cpp
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1759
3rdparty/bgfx/3rdparty/lodepng/lodepng.h
vendored
Normal file
1759
3rdparty/bgfx/3rdparty/lodepng/lodepng.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@ -24,10 +24,10 @@
|
||||
#define IMGUI_DISABLE_STB_TRUETYPE_IMPLEMENTATION
|
||||
|
||||
//---- Include imgui_user.inl at the end of imgui.cpp so you can include code that extends ImGui using its private data/functions.
|
||||
//#define IMGUI_INCLUDE_IMGUI_USER_INL
|
||||
#define IMGUI_INCLUDE_IMGUI_USER_INL
|
||||
|
||||
//---- Include imgui_user.h at the end of imgui.h
|
||||
//#define IMGUI_INCLUDE_IMGUI_USER_H
|
||||
#define IMGUI_INCLUDE_IMGUI_USER_H
|
||||
|
||||
//---- Don't implement default handlers for Windows (so as not to link with OpenClipboard() and others Win32 functions)
|
||||
#define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS
|
||||
|
650
3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.cpp
vendored
650
3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.cpp
vendored
File diff suppressed because it is too large
Load Diff
70
3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.h
vendored
70
3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.h
vendored
@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.49 WIP
|
||||
// dear imgui, v1.50 WIP
|
||||
// (headers)
|
||||
|
||||
// See imgui.cpp file for documentation.
|
||||
@ -16,7 +16,7 @@
|
||||
#include <stddef.h> // ptrdiff_t, NULL
|
||||
#include <string.h> // memset, memmove, memcpy, strlen, strchr, strcpy, strcmp
|
||||
|
||||
#define IMGUI_VERSION "1.49 WIP"
|
||||
#define IMGUI_VERSION "1.50 WIP"
|
||||
|
||||
// Define attributes of all API symbols declarations, e.g. for DLL under Windows.
|
||||
#ifndef IMGUI_API
|
||||
@ -36,6 +36,11 @@
|
||||
#define IM_PRINTFARGS(FMT)
|
||||
#endif
|
||||
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wold-style-cast"
|
||||
#endif
|
||||
|
||||
// Forward declarations
|
||||
struct ImDrawChannel; // Temporary storage for outputting drawing commands out of order, used by ImDrawList::ChannelsSplit()
|
||||
struct ImDrawCmd; // A single draw command within a parent ImDrawList (generally maps to 1 GPU draw call)
|
||||
@ -140,15 +145,15 @@ namespace ImGui
|
||||
IMGUI_API void SetNextWindowPos(const ImVec2& pos, ImGuiSetCond cond = 0); // set next window position. call before Begin()
|
||||
IMGUI_API void SetNextWindowPosCenter(ImGuiSetCond cond = 0); // set next window position to be centered on screen. call before Begin()
|
||||
IMGUI_API void SetNextWindowSize(const ImVec2& size, ImGuiSetCond cond = 0); // set next window size. set axis to 0.0f to force an auto-fit on this axis. call before Begin()
|
||||
IMGUI_API void SetNextWindowSizeConstraint(const ImVec2& size_min, const ImVec2& size_max, ImGuiSizeConstraintCallback custom_callback = NULL, void* custom_callback_data = NULL); // set next window size limits. use -1,-1 on either X/Y axis to preserve the current size. Use callback to apply non-trivial programmatic constraints.
|
||||
IMGUI_API void SetNextWindowSizeConstraints(const ImVec2& size_min, const ImVec2& size_max, ImGuiSizeConstraintCallback custom_callback = NULL, void* custom_callback_data = NULL); // set next window size limits. use -1,-1 on either X/Y axis to preserve the current size. Use callback to apply non-trivial programmatic constraints.
|
||||
IMGUI_API void SetNextWindowContentSize(const ImVec2& size); // set next window content size (enforce the range of scrollbars). set axis to 0.0f to leave it automatic. call before Begin()
|
||||
IMGUI_API void SetNextWindowContentWidth(float width); // set next window content width (enforce the range of horizontal scrollbar). call before Begin()
|
||||
IMGUI_API void SetNextWindowCollapsed(bool collapsed, ImGuiSetCond cond = 0); // set next window collapsed state. call before Begin()
|
||||
IMGUI_API void SetNextWindowFocus(); // set next window to be focused / front-most. call before Begin()
|
||||
IMGUI_API void SetWindowPos(const ImVec2& pos, ImGuiSetCond cond = 0); // set current window position - call within Begin()/End(). may incur tearing
|
||||
IMGUI_API void SetWindowSize(const ImVec2& size, ImGuiSetCond cond = 0); // set current window size. set to ImVec2(0,0) to force an auto-fit. may incur tearing
|
||||
IMGUI_API void SetWindowCollapsed(bool collapsed, ImGuiSetCond cond = 0); // set current window collapsed state
|
||||
IMGUI_API void SetWindowFocus(); // set current window to be focused / front-most
|
||||
IMGUI_API void SetWindowPos(const ImVec2& pos, ImGuiSetCond cond = 0); // (not recommended) set current window position - call within Begin()/End(). prefer using SetNextWindowPos(), as this may incur tearing and side-effects.
|
||||
IMGUI_API void SetWindowSize(const ImVec2& size, ImGuiSetCond cond = 0); // (not recommended) set current window size - call within Begin()/End(). set to ImVec2(0,0) to force an auto-fit. prefer using SetNextWindowSize(), as this may incur tearing and minor side-effects.
|
||||
IMGUI_API void SetWindowCollapsed(bool collapsed, ImGuiSetCond cond = 0); // (not recommended) set current window collapsed state. prefer using SetNextWindowCollapsed().
|
||||
IMGUI_API void SetWindowFocus(); // (not recommended) set current window to be focused / front-most. prefer using SetNextWindowFocus().
|
||||
IMGUI_API void SetWindowPos(const char* name, const ImVec2& pos, ImGuiSetCond cond = 0); // set named window position.
|
||||
IMGUI_API void SetWindowSize(const char* name, const ImVec2& size, ImGuiSetCond cond = 0); // set named window size. set axis to 0.0f to force an auto-fit on this axis.
|
||||
IMGUI_API void SetWindowCollapsed(const char* name, bool collapsed, ImGuiSetCond cond = 0); // set named window collapsed state
|
||||
@ -195,10 +200,10 @@ namespace ImGui
|
||||
IMGUI_API void Separator(); // horizontal line
|
||||
IMGUI_API void SameLine(float pos_x = 0.0f, float spacing_w = -1.0f); // call between widgets or groups to layout them horizontally
|
||||
IMGUI_API void NewLine(); // undo a SameLine()
|
||||
IMGUI_API void Spacing(); // add spacing
|
||||
IMGUI_API void Spacing(); // add vertical spacing
|
||||
IMGUI_API void Dummy(const ImVec2& size); // add a dummy item of given size
|
||||
IMGUI_API void Indent(); // move content position toward the right by style.IndentSpacing pixels
|
||||
IMGUI_API void Unindent(); // move content position back to the left (cancel Indent)
|
||||
IMGUI_API void Indent(float indent_w = 0.0f); // move content position toward the right, by style.IndentSpacing or indent_w if >0
|
||||
IMGUI_API void Unindent(float indent_w = 0.0f); // move content position back to the left, by style.IndentSpacing or indent_w if >0
|
||||
IMGUI_API void BeginGroup(); // lock horizontal starting position + capture group bounding box into one "item" (so you can use IsItemHovered() or layout primitives such as SameLine() on whole group, etc.)
|
||||
IMGUI_API void EndGroup();
|
||||
IMGUI_API ImVec2 GetCursorPos(); // cursor position is relative to window position
|
||||
@ -208,7 +213,7 @@ namespace ImGui
|
||||
IMGUI_API void SetCursorPosX(float x); // "
|
||||
IMGUI_API void SetCursorPosY(float y); // "
|
||||
IMGUI_API ImVec2 GetCursorStartPos(); // initial cursor position
|
||||
IMGUI_API ImVec2 GetCursorScreenPos(); // cursor position in absolute screen coordinates [0..io.DisplaySize]
|
||||
IMGUI_API ImVec2 GetCursorScreenPos(); // cursor position in absolute screen coordinates [0..io.DisplaySize] (useful to work with ImDrawList API)
|
||||
IMGUI_API void SetCursorScreenPos(const ImVec2& pos); // cursor position in absolute screen coordinates [0..io.DisplaySize]
|
||||
IMGUI_API void AlignFirstTextHeightToWidgets(); // call once if the first item on the line is a Text() item and you want to vertically lower it to match subsequent (bigger) widgets
|
||||
IMGUI_API float GetTextLineHeight(); // height of font == GetWindowFontSize()
|
||||
@ -216,7 +221,7 @@ namespace ImGui
|
||||
IMGUI_API float GetItemsLineHeightWithSpacing(); // distance (in pixels) between 2 consecutive lines of standard height widgets == GetWindowFontSize() + GetStyle().FramePadding.y*2 + GetStyle().ItemSpacing.y
|
||||
|
||||
// Columns
|
||||
// You can also use SameLine(pos_x) for simplified columning. The columns API is still work-in-progress.
|
||||
// You can also use SameLine(pos_x) for simplified columning. The columns API is still work-in-progress and rather lacking.
|
||||
IMGUI_API void Columns(int count = 1, const char* id = NULL, bool border = true); // setup number of columns. use an identifier to distinguish multiple column sets. close with Columns(1).
|
||||
IMGUI_API void NextColumn(); // next column
|
||||
IMGUI_API int GetColumnIndex(); // get current column index
|
||||
@ -249,10 +254,10 @@ namespace ImGui
|
||||
IMGUI_API void TextUnformatted(const char* text, const char* text_end = NULL); // doesn't require null terminated string if 'text_end' is specified. no copy done to any bounded stack buffer, recommended for long chunks of text
|
||||
IMGUI_API void LabelText(const char* label, const char* fmt, ...) IM_PRINTFARGS(2); // display text+label aligned the same way as value+label widgets
|
||||
IMGUI_API void LabelTextV(const char* label, const char* fmt, va_list args);
|
||||
IMGUI_API void Bullet(); // draw a small circle and keep the cursor on the same line. advance you by the same distance as an empty TreeNode() call.
|
||||
IMGUI_API void BulletText(const char* fmt, ...) IM_PRINTFARGS(1);
|
||||
IMGUI_API void Bullet(); // draw a small circle and keep the cursor on the same line. advance cursor x position by GetTreeNodeToLabelSpacing(), same distance that TreeNode() uses
|
||||
IMGUI_API void BulletText(const char* fmt, ...) IM_PRINTFARGS(1); // shortcut for Bullet()+Text()
|
||||
IMGUI_API void BulletTextV(const char* fmt, va_list args);
|
||||
IMGUI_API bool Button(const char* label, const ImVec2& size = ImVec2(0,0));
|
||||
IMGUI_API bool Button(const char* label, const ImVec2& size = ImVec2(0,0)); // button
|
||||
IMGUI_API bool SmallButton(const char* label); // button with FramePadding=(0,0)
|
||||
IMGUI_API bool InvisibleButton(const char* str_id, const ImVec2& size);
|
||||
IMGUI_API void Image(ImTextureID user_texture_id, const ImVec2& size, const ImVec2& uv0 = ImVec2(0,0), const ImVec2& uv1 = ImVec2(1,1), const ImVec4& tint_col = ImVec4(1,1,1,1), const ImVec4& border_col = ImVec4(0,0,0,0));
|
||||
@ -267,7 +272,7 @@ namespace ImGui
|
||||
IMGUI_API bool ColorButton(const ImVec4& col, bool small_height = false, bool outline_border = true);
|
||||
IMGUI_API bool ColorEdit3(const char* label, float col[3]); // Hint: 'float col[3]' function argument is same as 'float* col'. You can pass address of first element out of a contiguous set, e.g. &myvector.x
|
||||
IMGUI_API bool ColorEdit4(const char* label, float col[4], bool show_alpha = true); // "
|
||||
IMGUI_API void ColorEditMode(ImGuiColorEditMode mode); // FIXME-OBSOLETE: This is inconsistent with most of the API and should be obsoleted.
|
||||
IMGUI_API void ColorEditMode(ImGuiColorEditMode mode); // FIXME-OBSOLETE: This is inconsistent with most of the API and will be obsoleted/replaced.
|
||||
IMGUI_API void PlotLines(const char* label, const float* values, int values_count, int values_offset = 0, const char* overlay_text = NULL, float scale_min = FLT_MAX, float scale_max = FLT_MAX, ImVec2 graph_size = ImVec2(0,0), int stride = sizeof(float));
|
||||
IMGUI_API void PlotLines(const char* label, float (*values_getter)(void* data, int idx), void* data, int values_count, int values_offset = 0, const char* overlay_text = NULL, float scale_min = FLT_MAX, float scale_max = FLT_MAX, ImVec2 graph_size = ImVec2(0,0));
|
||||
IMGUI_API void PlotHistogram(const char* label, const float* values, int values_count, int values_offset = 0, const char* overlay_text = NULL, float scale_min = FLT_MAX, float scale_max = FLT_MAX, ImVec2 graph_size = ImVec2(0,0), int stride = sizeof(float));
|
||||
@ -323,12 +328,13 @@ namespace ImGui
|
||||
IMGUI_API bool TreeNodeEx(const void* ptr_id, ImGuiTreeNodeFlags flags, const char* fmt, ...) IM_PRINTFARGS(3);
|
||||
IMGUI_API bool TreeNodeExV(const char* str_id, ImGuiTreeNodeFlags flags, const char* fmt, va_list args);
|
||||
IMGUI_API bool TreeNodeExV(const void* ptr_id, ImGuiTreeNodeFlags flags, const char* fmt, va_list args);
|
||||
IMGUI_API void TreePush(const char* str_id = NULL); // already called by TreeNode(), but you can call Push/Pop yourself for layout purpose
|
||||
IMGUI_API void TreePush(const char* str_id = NULL); // ~ Indent()+PushId(). Already called by TreeNode() when returning true, but you can call Push/Pop yourself for layout purpose
|
||||
IMGUI_API void TreePush(const void* ptr_id = NULL); // "
|
||||
IMGUI_API void TreePop();
|
||||
IMGUI_API void TreePop(); // ~ Unindent()+PopId()
|
||||
IMGUI_API void TreeAdvanceToLabelPos(); // advance cursor x position by GetTreeNodeToLabelSpacing()
|
||||
IMGUI_API float GetTreeNodeToLabelSpacing(); // horizontal distance preceeding label when using TreeNode*() or Bullet() == (g.FontSize + style.FramePadding.x*2) for a regular unframed TreeNode
|
||||
IMGUI_API void SetNextTreeNodeOpen(bool is_open, ImGuiSetCond cond = 0); // set next TreeNode/CollapsingHeader open state.
|
||||
IMGUI_API float GetTreeNodeToLabelSpacing(ImGuiTreeNodeFlags flags = 0); // return horizontal distance between cursor and text label due to collapsing node. == (g.FontSize + style.FramePadding.x*2) for a regular unframed TreeNode
|
||||
IMGUI_API bool CollapsingHeader(const char* label, ImGuiTreeNodeFlags flags = 0); // if returning 'true' the header is open. user doesn't have to call TreePop().
|
||||
IMGUI_API bool CollapsingHeader(const char* label, ImGuiTreeNodeFlags flags = 0); // if returning 'true' the header is open. doesn't indent nor push on ID stack. user doesn't have to call TreePop().
|
||||
IMGUI_API bool CollapsingHeader(const char* label, bool* p_open, ImGuiTreeNodeFlags flags = 0); // when 'p_open' isn't NULL, display an additional small close button on upper right of the header
|
||||
|
||||
// Widgets: Selectable / Lists
|
||||
@ -458,7 +464,7 @@ namespace ImGui
|
||||
|
||||
// Obsolete (will be removed)
|
||||
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
|
||||
static inline bool CollapsingHeader(const char* label, const char* str_id, bool display_frame = true, bool default_open = false) { (void)str_id; (void)display_frame; ImGuiTreeNodeFlags default_open_flags = 1<<5; return CollapsingHeader(label, (default_open ? default_open_flags : 0)); } // OBSOLETE 1.49+
|
||||
static inline bool CollapsingHeader(const char* label, const char* str_id, bool framed = true, bool default_open = false) { (void)str_id; (void)framed; ImGuiTreeNodeFlags default_open_flags = 1<<5; return CollapsingHeader(label, (default_open ? default_open_flags : 0)); } // OBSOLETE 1.49+
|
||||
static inline ImFont* GetWindowFont() { return GetFont(); } // OBSOLETE 1.48+
|
||||
static inline float GetWindowFontSize() { return GetFontSize(); } // OBSOLETE 1.48+
|
||||
static inline void OpenNextNode(bool open) { ImGui::SetNextTreeNodeOpen(open, 0); } // OBSOLETE 1.34+
|
||||
@ -530,7 +536,7 @@ enum ImGuiInputTextFlags_
|
||||
ImGuiInputTextFlags_Multiline = 1 << 20 // For internal use by InputTextMultiline()
|
||||
};
|
||||
|
||||
// Flags for ImGui::TreeNode*(), ImGui::CollapsingHeader*()
|
||||
// Flags for ImGui::TreeNodeEx(), ImGui::CollapsingHeader*()
|
||||
enum ImGuiTreeNodeFlags_
|
||||
{
|
||||
ImGuiTreeNodeFlags_Selected = 1 << 0, // Draw as selected
|
||||
@ -541,10 +547,10 @@ enum ImGuiTreeNodeFlags_
|
||||
ImGuiTreeNodeFlags_DefaultOpen = 1 << 5, // Default node to be open
|
||||
ImGuiTreeNodeFlags_OpenOnDoubleClick = 1 << 6, // Need double-click to open node
|
||||
ImGuiTreeNodeFlags_OpenOnArrow = 1 << 7, // Only open when clicking on the arrow part. If ImGuiTreeNodeFlags_OpenOnDoubleClick is also set, single-click arrow or double-click all box to open.
|
||||
ImGuiTreeNodeFlags_AlwaysOpen = 1 << 8, // No collapsing, no arrow (use as a convenience for leaf nodes).
|
||||
//ImGuiTreeNodeFlags_UnindentArrow = 1 << 9, // FIXME: TODO: Unindent tree so that Label is aligned to current X position
|
||||
ImGuiTreeNodeFlags_Leaf = 1 << 8, // No collapsing, no arrow (use as a convenience for leaf nodes).
|
||||
ImGuiTreeNodeFlags_Bullet = 1 << 9, // Display a bullet instead of arrow
|
||||
//ImGuITreeNodeFlags_SpanAllAvailWidth = 1 << 10, // FIXME: TODO: Extend hit box horizontally even if not framed
|
||||
//ImGuiTreeNodeFlags_NoScrollOnOpen = 1 << 11, // FIXME: TODO: Automatically scroll on TreePop() if node got just open and contents is not visible
|
||||
//ImGuiTreeNodeFlags_NoScrollOnOpen = 1 << 11, // FIXME: TODO: Disable automatic scroll on TreePop() if node got just open and contents is not visible
|
||||
ImGuiTreeNodeFlags_CollapsingHeader = ImGuiTreeNodeFlags_Framed | ImGuiTreeNodeFlags_NoAutoOpenOnLog
|
||||
};
|
||||
|
||||
@ -660,6 +666,7 @@ enum ImGuiAlign_
|
||||
};
|
||||
|
||||
// Enumeration for ColorEditMode()
|
||||
// FIXME-OBSOLETE: Will be replaced by future color/picker api
|
||||
enum ImGuiColorEditMode_
|
||||
{
|
||||
ImGuiColorEditMode_UserSelect = -2,
|
||||
@ -880,6 +887,7 @@ public:
|
||||
{
|
||||
if (new_capacity <= Capacity) return;
|
||||
T* new_data = (value_type*)ImGui::MemAlloc((size_t)new_capacity * sizeof(value_type));
|
||||
memset(&new_data[Size], 0, (size_t)(new_capacity - Size) * sizeof(value_type)); // BK - clear garbage so that 0 initialized ImString works properly.
|
||||
memcpy(new_data, Data, (size_t)Size * sizeof(value_type));
|
||||
ImGui::MemFree(Data);
|
||||
Data = new_data;
|
||||
@ -1034,11 +1042,11 @@ struct ImGuiTextEditCallbackData
|
||||
bool HasSelection() const { return SelectionStart != SelectionEnd; }
|
||||
};
|
||||
|
||||
// Resizing callback data to apply custom constraint. As enabled by SetNextWindowSizeConstraint(). Callback is called during the next Begin().
|
||||
// NB: For basic min/max size constraint on each axis you don't need to use the callback! The SetNextWindowSizeConstraint() parameters are enough.
|
||||
// Resizing callback data to apply custom constraint. As enabled by SetNextWindowSizeConstraints(). Callback is called during the next Begin().
|
||||
// NB: For basic min/max size constraint on each axis you don't need to use the callback! The SetNextWindowSizeConstraints() parameters are enough.
|
||||
struct ImGuiSizeConstraintCallbackData
|
||||
{
|
||||
void* UserData; // Read-only. What user passed to SetNextWindowSizeConstraint()
|
||||
void* UserData; // Read-only. What user passed to SetNextWindowSizeConstraints()
|
||||
ImVec2 Pos; // Read-only. Window position, for reference.
|
||||
ImVec2 CurrentSize; // Read-only. Current window size.
|
||||
ImVec2 DesiredSize; // Read-write. Desired size, based on user's mouse position. Write to this field to restrain resizing.
|
||||
@ -1353,7 +1361,7 @@ struct ImFont
|
||||
ImVec2 DisplayOffset; // = (0.f,1.f) // Offset font rendering by xx pixels
|
||||
ImVector<Glyph> Glyphs; // // All glyphs.
|
||||
ImVector<float> IndexXAdvance; // // Sparse. Glyphs->XAdvance in a directly indexable way (more cache-friendly, for CalcTextSize functions which are often bottleneck in large UI).
|
||||
ImVector<short> IndexLookup; // // Sparse. Index glyphs by Unicode code-point.
|
||||
ImVector<unsigned short> IndexLookup; // // Sparse. Index glyphs by Unicode code-point.
|
||||
const Glyph* FallbackGlyph; // == FindGlyph(FontFallbackChar)
|
||||
float FallbackXAdvance; // == FallbackGlyph->XAdvance
|
||||
ImWchar FallbackChar; // = '?' // Replacement glyph if one isn't found. Only set via SetFallbackChar()
|
||||
@ -1386,6 +1394,10 @@ struct ImFont
|
||||
IMGUI_API void AddRemapChar(ImWchar dst, ImWchar src, bool overwrite_dst = true); // Makes 'dst' character/glyph points to 'src' character/glyph. Currently needs to be called AFTER fonts have been built.
|
||||
};
|
||||
|
||||
#if defined(__clang__)
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
//---- Include imgui_user.h at the end of imgui.h
|
||||
//---- So you can include code that extends ImGui using any of the types declared above.
|
||||
//---- (also convenient for user to only explicitly include vanilla imgui.h)
|
||||
|
117
3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_demo.cpp
vendored
117
3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_demo.cpp
vendored
@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.49 WIP
|
||||
// dear imgui, v1.50 WIP
|
||||
// (demo code)
|
||||
|
||||
// Don't remove this file from your project! It is useful reference code that you can execute.
|
||||
@ -11,7 +11,7 @@
|
||||
|
||||
#include "imgui.h"
|
||||
#include <ctype.h> // toupper, isprint
|
||||
#include <math.h> // sqrtf, fabsf, fmodf, powf, cosf, sinf, floorf, ceilf
|
||||
#include <math.h> // sqrtf, powf, cosf, sinf, floorf, ceilf
|
||||
#include <stdio.h> // vsnprintf, sscanf, printf
|
||||
#include <stdlib.h> // NULL, malloc, free, qsort, atoi
|
||||
#if defined(_MSC_VER) && _MSC_VER <= 1500 // MSVC 2008 or earlier
|
||||
@ -251,34 +251,53 @@ void ImGui::ShowTestWindow(bool* p_open)
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
if (ImGui::TreeNode("With selectable nodes"))
|
||||
if (ImGui::TreeNode("Advanced, with Selectable nodes"))
|
||||
{
|
||||
ShowHelpMarker("Click to select, CTRL+Click to toggle, click on arrows to open");
|
||||
static int selection_mask = 0x02; // Dumb representation of what may be user-side selection state. You may carry selection state inside or outside your objects in whatever format you see fit.
|
||||
int node_clicked = -1;
|
||||
ShowHelpMarker("This is a more standard looking tree with selectable nodes.\nClick to select, CTRL+Click to toggle, click on arrows or double-click to open.");
|
||||
static bool align_label_with_current_x_position = false;
|
||||
ImGui::Checkbox("Align label with current X position)", &align_label_with_current_x_position);
|
||||
ImGui::Text("Hello!");
|
||||
if (align_label_with_current_x_position)
|
||||
ImGui::Unindent(ImGui::GetTreeNodeToLabelSpacing());
|
||||
|
||||
static int selection_mask = (1 << 2); // Dumb representation of what may be user-side selection state. You may carry selection state inside or outside your objects in whatever format you see fit.
|
||||
int node_clicked = -1; // Temporary storage of what node we have clicked to process selection at the end of the loop. May be a pointer to your own node type, etc.
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_IndentSpacing, ImGui::GetFontSize()*3); // Increase spacing to differentiate leaves from expanded contents.
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
ImGuiTreeNodeFlags node_flags = ((selection_mask & (1 << i)) ? ImGuiTreeNodeFlags_Selected : 0) | ImGuiTreeNodeFlags_OpenOnArrow | ImGuiTreeNodeFlags_OpenOnDoubleClick;
|
||||
if (i >= 3)
|
||||
node_flags |= ImGuiTreeNodeFlags_AlwaysOpen;
|
||||
bool node_open = ImGui::TreeNodeEx((void*)(intptr_t)i, node_flags, "Selectable %s %d", (i >= 3) ? "Leaf" : "Node", i);
|
||||
if (ImGui::IsItemClicked())
|
||||
node_clicked = i;
|
||||
if (node_open)
|
||||
// Disable the default open on single-click behavior and pass in Selected flag according to our selection state.
|
||||
ImGuiTreeNodeFlags node_flags = ImGuiTreeNodeFlags_OpenOnArrow | ImGuiTreeNodeFlags_OpenOnDoubleClick | ((selection_mask & (1 << i)) ? ImGuiTreeNodeFlags_Selected : 0);
|
||||
if (i < 3)
|
||||
{
|
||||
ImGui::Text("Selectable Blah blah");
|
||||
ImGui::Text("Blah blah");
|
||||
ImGui::TreePop();
|
||||
// Node
|
||||
bool node_open = ImGui::TreeNodeEx((void*)(intptr_t)i, node_flags, "Selectable Node %d", i);
|
||||
if (ImGui::IsItemClicked())
|
||||
node_clicked = i;
|
||||
if (node_open)
|
||||
{
|
||||
ImGui::Text("Blah blah\nBlah Blah");
|
||||
ImGui::TreePop();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Leaf: The only reason we have a TreeNode at all is to allow selection of the leaf. Otherwise we can use BulletText() or TreeAdvanceToLabelPos()+Text().
|
||||
ImGui::TreeNodeEx((void*)(intptr_t)i, node_flags | ImGuiTreeNodeFlags_Leaf | ImGuiTreeNodeFlags_NoTreePushOnOpen, "Selectable Leaf %d", i);
|
||||
if (ImGui::IsItemClicked())
|
||||
node_clicked = i;
|
||||
}
|
||||
}
|
||||
if (node_clicked != -1)
|
||||
{
|
||||
// Update selection state. Process outside of tree loop to avoid visual inconsistencies during the clicking-frame.
|
||||
if (ImGui::GetIO().KeyCtrl)
|
||||
selection_mask ^= (1 << node_clicked); // CTRL+click to toggle
|
||||
else
|
||||
selection_mask = (1 << node_clicked); // Click to single-select
|
||||
selection_mask ^= (1 << node_clicked); // CTRL+click to toggle
|
||||
else //if (!(selection_mask & (1 << node_clicked))) // Depending on selection behavior you want, this commented bit preserve selection when clicking on item that is part of the selection
|
||||
selection_mask = (1 << node_clicked); // Click to single-select
|
||||
}
|
||||
ImGui::PopStyleVar();
|
||||
if (align_label_with_current_x_position)
|
||||
ImGui::Indent(ImGui::GetTreeNodeToLabelSpacing());
|
||||
ImGui::TreePop();
|
||||
}
|
||||
ImGui::TreePop();
|
||||
@ -423,6 +442,19 @@ void ImGui::ShowTestWindow(bool* p_open)
|
||||
ImGui::Selectable("Hello.h", &selected[2]); ImGui::SameLine(300); ImGui::Text(" 2,345 bytes");
|
||||
ImGui::TreePop();
|
||||
}
|
||||
if (ImGui::TreeNode("In columns"))
|
||||
{
|
||||
ImGui::Columns(3, NULL, false);
|
||||
static bool selected[16] = { 0 };
|
||||
for (int i = 0; i < 16; i++)
|
||||
{
|
||||
char label[32]; sprintf(label, "Item %d", i);
|
||||
if (ImGui::Selectable(label, &selected[i])) {}
|
||||
ImGui::NextColumn();
|
||||
}
|
||||
ImGui::Columns(1);
|
||||
ImGui::TreePop();
|
||||
}
|
||||
if (ImGui::TreeNode("Grid"))
|
||||
{
|
||||
static bool selected[16] = { true, false, false, false, false, true, false, false, false, false, true, false, false, false, false, true };
|
||||
@ -1293,7 +1325,22 @@ void ImGui::ShowTestWindow(bool* p_open)
|
||||
// Basic columns
|
||||
if (ImGui::TreeNode("Basic"))
|
||||
{
|
||||
ImGui::Columns(4, "mycolumns");
|
||||
ImGui::Text("Without border:");
|
||||
ImGui::Columns(3, "mycolumns3", false); // 3-ways, no border
|
||||
ImGui::Separator();
|
||||
for (int n = 0; n < 14; n++)
|
||||
{
|
||||
char label[32];
|
||||
sprintf(label, "Item %d", n);
|
||||
if (ImGui::Selectable(label)) {}
|
||||
//if (ImGui::Button(label, ImVec2(-1,0))) {}
|
||||
ImGui::NextColumn();
|
||||
}
|
||||
ImGui::Columns(1);
|
||||
ImGui::Separator();
|
||||
|
||||
ImGui::Text("With border:");
|
||||
ImGui::Columns(4, "mycolumns"); // 4-ways, with border
|
||||
ImGui::Separator();
|
||||
ImGui::Text("ID"); ImGui::NextColumn();
|
||||
ImGui::Text("Name"); ImGui::NextColumn();
|
||||
@ -1368,9 +1415,9 @@ void ImGui::ShowTestWindow(bool* p_open)
|
||||
ImGui::InputFloat("blue", &bar, 0.05f, 0, 3);
|
||||
ImGui::NextColumn();
|
||||
|
||||
if (ImGui::CollapsingHeader("Category A")) ImGui::Text("Blah blah blah"); ImGui::NextColumn();
|
||||
if (ImGui::CollapsingHeader("Category B")) ImGui::Text("Blah blah blah"); ImGui::NextColumn();
|
||||
if (ImGui::CollapsingHeader("Category C")) ImGui::Text("Blah blah blah"); ImGui::NextColumn();
|
||||
if (ImGui::CollapsingHeader("Category A")) { ImGui::Text("Blah blah blah"); } ImGui::NextColumn();
|
||||
if (ImGui::CollapsingHeader("Category B")) { ImGui::Text("Blah blah blah"); } ImGui::NextColumn();
|
||||
if (ImGui::CollapsingHeader("Category C")) { ImGui::Text("Blah blah blah"); } ImGui::NextColumn();
|
||||
ImGui::Columns(1);
|
||||
ImGui::Separator();
|
||||
ImGui::TreePop();
|
||||
@ -1807,12 +1854,12 @@ static void ShowExampleAppConstrainedResize(bool* p_open)
|
||||
};
|
||||
|
||||
static int type = 0;
|
||||
if (type == 0) ImGui::SetNextWindowSizeConstraint(ImVec2(-1, 0), ImVec2(-1, FLT_MAX)); // Vertical only
|
||||
if (type == 1) ImGui::SetNextWindowSizeConstraint(ImVec2(0, -1), ImVec2(FLT_MAX, -1)); // Horizontal only
|
||||
if (type == 2) ImGui::SetNextWindowSizeConstraint(ImVec2(100, 100), ImVec2(FLT_MAX, FLT_MAX)); // Width > 100, Height > 100
|
||||
if (type == 3) ImGui::SetNextWindowSizeConstraint(ImVec2(300, 0), ImVec2(400, FLT_MAX)); // Width 300-400
|
||||
if (type == 4) ImGui::SetNextWindowSizeConstraint(ImVec2(0, 0), ImVec2(FLT_MAX, FLT_MAX), CustomConstraints::Square); // Always Square
|
||||
if (type == 5) ImGui::SetNextWindowSizeConstraint(ImVec2(0, 0), ImVec2(FLT_MAX, FLT_MAX), CustomConstraints::Step, (void*)100);// Fixed Step
|
||||
if (type == 0) ImGui::SetNextWindowSizeConstraints(ImVec2(-1, 0), ImVec2(-1, FLT_MAX)); // Vertical only
|
||||
if (type == 1) ImGui::SetNextWindowSizeConstraints(ImVec2(0, -1), ImVec2(FLT_MAX, -1)); // Horizontal only
|
||||
if (type == 2) ImGui::SetNextWindowSizeConstraints(ImVec2(100, 100), ImVec2(FLT_MAX, FLT_MAX)); // Width > 100, Height > 100
|
||||
if (type == 3) ImGui::SetNextWindowSizeConstraints(ImVec2(300, 0), ImVec2(400, FLT_MAX)); // Width 300-400
|
||||
if (type == 4) ImGui::SetNextWindowSizeConstraints(ImVec2(0, 0), ImVec2(FLT_MAX, FLT_MAX), CustomConstraints::Square); // Always Square
|
||||
if (type == 5) ImGui::SetNextWindowSizeConstraints(ImVec2(0, 0), ImVec2(FLT_MAX, FLT_MAX), CustomConstraints::Step, (void*)100);// Fixed Step
|
||||
|
||||
if (ImGui::Begin("Example: Constrained Resize", p_open))
|
||||
{
|
||||
@ -1826,9 +1873,9 @@ static void ShowExampleAppConstrainedResize(bool* p_open)
|
||||
"Custom: Fixed Steps (100)",
|
||||
};
|
||||
ImGui::Combo("Constraint", &type, desc, IM_ARRAYSIZE(desc));
|
||||
if (ImGui::Button("200x200")) ImGui::SetWindowSize(ImVec2(200,200)); ImGui::SameLine();
|
||||
if (ImGui::Button("500x500")) ImGui::SetWindowSize(ImVec2(500,500)); ImGui::SameLine();
|
||||
if (ImGui::Button("800x200")) ImGui::SetWindowSize(ImVec2(800,200));
|
||||
if (ImGui::Button("200x200")) { ImGui::SetWindowSize(ImVec2(200,200)); } ImGui::SameLine();
|
||||
if (ImGui::Button("500x500")) { ImGui::SetWindowSize(ImVec2(500,500)); } ImGui::SameLine();
|
||||
if (ImGui::Button("800x200")) { ImGui::SetWindowSize(ImVec2(800,200)); }
|
||||
for (int i = 0; i < 10; i++)
|
||||
ImGui::Text("Hello, sailor! Making this line long enough for the example.");
|
||||
}
|
||||
@ -2041,8 +2088,8 @@ struct ExampleAppConsole
|
||||
// TODO: display items starting from the bottom
|
||||
|
||||
if (ImGui::SmallButton("Add Dummy Text")) { AddLog("%d some text", Items.Size); AddLog("some more text"); AddLog("display very important message here!"); } ImGui::SameLine();
|
||||
if (ImGui::SmallButton("Add Dummy Error")) AddLog("[error] something went wrong"); ImGui::SameLine();
|
||||
if (ImGui::SmallButton("Clear")) ClearLog(); ImGui::SameLine();
|
||||
if (ImGui::SmallButton("Add Dummy Error")) { AddLog("[error] something went wrong"); } ImGui::SameLine();
|
||||
if (ImGui::SmallButton("Clear")) { ClearLog(); } ImGui::SameLine();
|
||||
if (ImGui::SmallButton("Scroll to bottom")) ScrollToBottom = true;
|
||||
//static float t = 0.0f; if (ImGui::GetTime() - t > 0.02f) { t = ImGui::GetTime(); AddLog("Spam %f", t); }
|
||||
|
||||
@ -2096,7 +2143,7 @@ struct ExampleAppConsole
|
||||
if (ImGui::InputText("Input", InputBuf, IM_ARRAYSIZE(InputBuf), ImGuiInputTextFlags_EnterReturnsTrue|ImGuiInputTextFlags_CallbackCompletion|ImGuiInputTextFlags_CallbackHistory, &TextEditCallbackStub, (void*)this))
|
||||
{
|
||||
char* input_end = InputBuf+strlen(InputBuf);
|
||||
while (input_end > InputBuf && input_end[-1] == ' ') input_end--; *input_end = 0;
|
||||
while (input_end > InputBuf && input_end[-1] == ' ') { input_end--; } *input_end = 0;
|
||||
if (InputBuf[0])
|
||||
ExecCommand(InputBuf);
|
||||
strcpy(InputBuf, "");
|
||||
|
@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.49 WIP
|
||||
// dear imgui, v1.50 WIP
|
||||
// (drawing and font code)
|
||||
|
||||
// Contains implementation for
|
||||
@ -1697,7 +1697,7 @@ void ImFont::BuildLookupTable()
|
||||
for (int i = 0; i != Glyphs.Size; i++)
|
||||
max_codepoint = ImMax(max_codepoint, (int)Glyphs[i].Codepoint);
|
||||
|
||||
IM_ASSERT(Glyphs.Size < 32*1024);
|
||||
IM_ASSERT(Glyphs.Size < 0xFFFF); // -1 is reserved
|
||||
IndexXAdvance.clear();
|
||||
IndexLookup.clear();
|
||||
GrowIndex(max_codepoint + 1);
|
||||
@ -1705,7 +1705,7 @@ void ImFont::BuildLookupTable()
|
||||
{
|
||||
int codepoint = (int)Glyphs[i].Codepoint;
|
||||
IndexXAdvance[codepoint] = Glyphs[i].XAdvance;
|
||||
IndexLookup[codepoint] = (short)i;
|
||||
IndexLookup[codepoint] = (unsigned short)i;
|
||||
}
|
||||
|
||||
// Create a glyph to handle TAB
|
||||
@ -1719,7 +1719,7 @@ void ImFont::BuildLookupTable()
|
||||
tab_glyph.Codepoint = '\t';
|
||||
tab_glyph.XAdvance *= 4;
|
||||
IndexXAdvance[(int)tab_glyph.Codepoint] = (float)tab_glyph.XAdvance;
|
||||
IndexLookup[(int)tab_glyph.Codepoint] = (short)(Glyphs.Size-1);
|
||||
IndexLookup[(int)tab_glyph.Codepoint] = (unsigned short)(Glyphs.Size-1);
|
||||
}
|
||||
|
||||
FallbackGlyph = NULL;
|
||||
@ -1747,7 +1747,7 @@ void ImFont::GrowIndex(int new_size)
|
||||
for (int i = old_size; i < new_size; i++)
|
||||
{
|
||||
IndexXAdvance[i] = -1.0f;
|
||||
IndexLookup[i] = (short)-1;
|
||||
IndexLookup[i] = (unsigned short)-1;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1756,13 +1756,13 @@ void ImFont::AddRemapChar(ImWchar dst, ImWchar src, bool overwrite_dst)
|
||||
IM_ASSERT(IndexLookup.Size > 0); // Currently this can only be called AFTER the font has been built, aka after calling ImFontAtlas::GetTexDataAs*() function.
|
||||
int index_size = IndexLookup.Size;
|
||||
|
||||
if (dst < index_size && IndexLookup.Data[dst] == -1 && !overwrite_dst) // 'dst' already exists
|
||||
if (dst < index_size && IndexLookup.Data[dst] == (unsigned short)-1 && !overwrite_dst) // 'dst' already exists
|
||||
return;
|
||||
if (src >= index_size && dst >= index_size) // both 'dst' and 'src' don't exist -> no-op
|
||||
return;
|
||||
|
||||
GrowIndex(dst + 1);
|
||||
IndexLookup[dst] = (src < index_size) ? IndexLookup.Data[src] : -1;
|
||||
IndexLookup[dst] = (src < index_size) ? IndexLookup.Data[src] : (unsigned short)-1;
|
||||
IndexXAdvance[dst] = (src < index_size) ? IndexXAdvance.Data[src] : 1.0f;
|
||||
}
|
||||
|
||||
@ -1770,8 +1770,8 @@ const ImFont::Glyph* ImFont::FindGlyph(unsigned short c) const
|
||||
{
|
||||
if (c < IndexLookup.Size)
|
||||
{
|
||||
const short i = IndexLookup[c];
|
||||
if (i != -1)
|
||||
const unsigned short i = IndexLookup[c];
|
||||
if (i != (unsigned short)-1)
|
||||
return &Glyphs.Data[i];
|
||||
}
|
||||
return FallbackGlyph;
|
||||
|
@ -1,4 +1,4 @@
|
||||
// dear imgui, v1.49 WIP
|
||||
// dear imgui, v1.50 WIP
|
||||
// (internals)
|
||||
|
||||
// You may use this file to debug, understand or extend ImGui features but we don't provide any guarantee of forward compatibility!
|
||||
@ -12,13 +12,20 @@
|
||||
#endif
|
||||
|
||||
#include <stdio.h> // FILE*
|
||||
#include <math.h> // sqrtf()
|
||||
#include <math.h> // sqrtf, fabsf, fmodf, powf, floorf, ceilf, cosf, sinf
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning (push)
|
||||
#pragma warning (disable: 4251) // class 'xxx' needs to have dll-interface to be used by clients of struct 'xxx' // when IMGUI_API is set to__declspec(dllexport)
|
||||
#endif
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wunused-function" // for stb_textedit.h
|
||||
#pragma clang diagnostic ignored "-Wmissing-prototypes" // for stb_textedit.h
|
||||
#pragma clang diagnostic ignored "-Wold-style-cast"
|
||||
#endif
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Forward Declarations
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -47,12 +54,6 @@ typedef int ImGuiSliderFlags; // enum ImGuiSliderFlags_
|
||||
namespace ImGuiStb
|
||||
{
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wunused-function"
|
||||
#pragma clang diagnostic ignored "-Wmissing-prototypes"
|
||||
#endif
|
||||
|
||||
#undef STB_TEXTEDIT_STRING
|
||||
#undef STB_TEXTEDIT_CHARTYPE
|
||||
#define STB_TEXTEDIT_STRING ImGuiTextEditState
|
||||
@ -60,10 +61,6 @@ namespace ImGuiStb
|
||||
#define STB_TEXTEDIT_GETWIDTH_NEWLINE -1.0f
|
||||
#include "stb_textedit.h"
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
} // namespace ImGuiStb
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@ -607,6 +604,7 @@ struct IMGUI_API ImGuiWindow
|
||||
ImVec2 SizeFull; // Size when non collapsed
|
||||
ImVec2 SizeContents; // Size of contents (== extents reach of the drawing cursor) from previous frame
|
||||
ImVec2 SizeContentsExplicit; // Size of contents explicitly set by the user via SetNextWindowContentSize()
|
||||
ImRect ContentsRegionRect; // Maximum visible content position in window coordinates. ~~ (SizeContentsExplicit ? SizeContentsExplicit : Size - ScrollbarSizes) - CursorStartPos, per axis
|
||||
ImVec2 WindowPadding; // Window padding at the time of begin. We need to lock it, in particular manipulation of the ShowBorder would have an effect
|
||||
ImGuiID MoveID; // == window->GetID("#MOVE")
|
||||
ImVec2 Scroll;
|
||||
@ -745,7 +743,11 @@ namespace ImGui
|
||||
IMGUI_API int ParseFormatPrecision(const char* fmt, int default_value);
|
||||
IMGUI_API float RoundScalar(float value, int decimal_precision);
|
||||
|
||||
} // namespace ImGuiP
|
||||
} // namespace ImGui
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning (pop)
|
||||
|
46
3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_user.h
vendored
Normal file
46
3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_user.h
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
#include <stdint.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
namespace ImGui
|
||||
{
|
||||
struct Font
|
||||
{
|
||||
enum Enum
|
||||
{
|
||||
Regular,
|
||||
Mono,
|
||||
|
||||
Count
|
||||
};
|
||||
};
|
||||
|
||||
void PushFont(Font::Enum _font);
|
||||
|
||||
// BK - simple string class for convenience.
|
||||
class ImString
|
||||
{
|
||||
public:
|
||||
ImString();
|
||||
ImString(const ImString& rhs);
|
||||
ImString(const char* rhs);
|
||||
~ImString();
|
||||
|
||||
ImString& operator=(const ImString& rhs);
|
||||
ImString& operator=(const char* rhs);
|
||||
|
||||
void Clear();
|
||||
bool IsEmpty() const;
|
||||
|
||||
const char* CStr() const
|
||||
{
|
||||
return NULL == Ptr ? "" : Ptr;
|
||||
}
|
||||
|
||||
private:
|
||||
char* Ptr;
|
||||
};
|
||||
|
||||
} // namespace ImGui
|
||||
|
||||
#include "widgets/file_list.h"
|
||||
#include "widgets/memory_editor.h"
|
76
3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_user.inl
vendored
Normal file
76
3rdparty/bgfx/3rdparty/ocornut-imgui/imgui_user.inl
vendored
Normal file
@ -0,0 +1,76 @@
|
||||
namespace ImGui
|
||||
{
|
||||
ImString::ImString()
|
||||
: Ptr(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
ImString::ImString(const ImString& rhs)
|
||||
: Ptr(NULL)
|
||||
{
|
||||
if (NULL != rhs.Ptr
|
||||
&& 0 != strcmp(rhs.Ptr, ""))
|
||||
{
|
||||
Ptr = ImStrdup(rhs.Ptr);
|
||||
}
|
||||
}
|
||||
|
||||
ImString::ImString(const char* rhs)
|
||||
: Ptr(NULL)
|
||||
{
|
||||
if (NULL != rhs
|
||||
&& 0 != strcmp(rhs, ""))
|
||||
{
|
||||
Ptr = ImStrdup(rhs);
|
||||
}
|
||||
}
|
||||
|
||||
ImString::~ImString()
|
||||
{
|
||||
Clear();
|
||||
}
|
||||
|
||||
ImString& ImString::operator=(const ImString& rhs)
|
||||
{
|
||||
if (this != &rhs)
|
||||
{
|
||||
*this = rhs.Ptr;
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
ImString& ImString::operator=(const char* rhs)
|
||||
{
|
||||
if (Ptr != rhs)
|
||||
{
|
||||
Clear();
|
||||
|
||||
if (NULL != rhs
|
||||
&& 0 != strcmp(rhs, ""))
|
||||
{
|
||||
Ptr = ImStrdup(rhs);
|
||||
}
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
void ImString::Clear()
|
||||
{
|
||||
if (NULL != Ptr)
|
||||
{
|
||||
MemFree(Ptr);
|
||||
Ptr = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
bool ImString::IsEmpty() const
|
||||
{
|
||||
return NULL == Ptr;
|
||||
}
|
||||
} // namespace
|
||||
|
||||
|
||||
#include "widgets/file_list.inl"
|
||||
#include "widgets/memory_editor.inl"
|
210
3rdparty/bgfx/3rdparty/ocornut-imgui/memory_editor.h
vendored
210
3rdparty/bgfx/3rdparty/ocornut-imgui/memory_editor.h
vendored
@ -1,210 +0,0 @@
|
||||
// Mini memory editor for ImGui (to embed in your game/tools)
|
||||
// v0.10
|
||||
//
|
||||
// You can adjust the keyboard repeat delay/rate in ImGuiIO.
|
||||
// The code assume a mono-space font for simplicity! If you don't use the default font, use ImGui::PushFont()/PopFont() to switch to a mono-space font before caling this.
|
||||
//
|
||||
// Usage:
|
||||
// static MemoryEditor memory_editor; // save your state somewhere
|
||||
// memory_editor.Draw("Memory Editor", mem_block, mem_block_size, (size_t)mem_block); // run
|
||||
//
|
||||
// TODO: better resizing policy (ImGui doesn't have flexible window resizing constraints yet)
|
||||
|
||||
struct MemoryEditor
|
||||
{
|
||||
bool Open;
|
||||
bool AllowEdits;
|
||||
int Rows;
|
||||
int DataEditingAddr;
|
||||
bool DataEditingTakeFocus;
|
||||
char DataInput[32];
|
||||
char AddrInput[32];
|
||||
|
||||
MemoryEditor()
|
||||
{
|
||||
Open = true;
|
||||
Rows = 16;
|
||||
DataEditingAddr = -1;
|
||||
DataEditingTakeFocus = false;
|
||||
strcpy(DataInput, "");
|
||||
strcpy(AddrInput, "");
|
||||
AllowEdits = true;
|
||||
}
|
||||
|
||||
void Draw(const char* title, unsigned char* mem_data, int mem_size, size_t base_display_addr = 0)
|
||||
{
|
||||
if (ImGui::Begin(title, &Open))
|
||||
{
|
||||
ImGui::BeginChild("##scrolling", ImVec2(0, -ImGui::GetItemsLineHeightWithSpacing()));
|
||||
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(0,0));
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(0,0));
|
||||
|
||||
int addr_digits_count = 0;
|
||||
for (int n = base_display_addr + mem_size - 1; n > 0; n >>= 4)
|
||||
addr_digits_count++;
|
||||
|
||||
float glyph_width = ImGui::CalcTextSize("F").x;
|
||||
float cell_width = glyph_width * 3; // "FF " we include trailing space in the width to easily catch clicks everywhere
|
||||
|
||||
float line_height = ImGui::GetTextLineHeight();
|
||||
int line_total_count = (int)((mem_size + Rows-1) / Rows);
|
||||
ImGuiListClipper clipper(line_total_count, line_height);
|
||||
int visible_start_addr = clipper.DisplayStart * Rows;
|
||||
int visible_end_addr = clipper.DisplayEnd * Rows;
|
||||
|
||||
bool data_next = false;
|
||||
|
||||
if (!AllowEdits || DataEditingAddr >= mem_size)
|
||||
DataEditingAddr = -1;
|
||||
|
||||
int data_editing_addr_backup = DataEditingAddr;
|
||||
if (DataEditingAddr != -1)
|
||||
{
|
||||
if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_UpArrow)) && DataEditingAddr >= Rows) { DataEditingAddr -= Rows; DataEditingTakeFocus = true; }
|
||||
else if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_DownArrow)) && DataEditingAddr < mem_size - Rows) { DataEditingAddr += Rows; DataEditingTakeFocus = true; }
|
||||
else if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_LeftArrow)) && DataEditingAddr > 0) { DataEditingAddr -= 1; DataEditingTakeFocus = true; }
|
||||
else if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_RightArrow)) && DataEditingAddr < mem_size - 1) { DataEditingAddr += 1; DataEditingTakeFocus = true; }
|
||||
}
|
||||
if ((DataEditingAddr / Rows) != (data_editing_addr_backup / Rows))
|
||||
{
|
||||
// Track cursor movements
|
||||
float scroll_offset = ((DataEditingAddr / Rows) - (data_editing_addr_backup / Rows)) * line_height;
|
||||
bool scroll_desired = (scroll_offset < 0.0f && DataEditingAddr < visible_start_addr + Rows*2) || (scroll_offset > 0.0f && DataEditingAddr > visible_end_addr - Rows*2);
|
||||
if (scroll_desired)
|
||||
ImGui::SetScrollY(ImGui::GetScrollY() + scroll_offset);
|
||||
}
|
||||
|
||||
bool draw_separator = true;
|
||||
for (int line_i = clipper.DisplayStart; line_i < clipper.DisplayEnd; line_i++) // display only visible items
|
||||
{
|
||||
int addr = line_i * Rows;
|
||||
ImGui::Text("%0*X: ", addr_digits_count, base_display_addr+addr);
|
||||
ImGui::SameLine();
|
||||
|
||||
// Draw Hexadecimal
|
||||
float line_start_x = ImGui::GetCursorPosX();
|
||||
for (int n = 0; n < Rows && addr < mem_size; n++, addr++)
|
||||
{
|
||||
ImGui::SameLine(line_start_x + cell_width * n);
|
||||
|
||||
if (DataEditingAddr == addr)
|
||||
{
|
||||
// Display text input on current byte
|
||||
ImGui::PushID(addr);
|
||||
struct FuncHolder
|
||||
{
|
||||
// FIXME: We should have a way to retrieve the text edit cursor position more easily in the API, this is rather tedious.
|
||||
static int Callback(ImGuiTextEditCallbackData* data)
|
||||
{
|
||||
int* p_cursor_pos = (int*)data->UserData;
|
||||
if (!data->HasSelection())
|
||||
*p_cursor_pos = data->CursorPos;
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
int cursor_pos = -1;
|
||||
bool data_write = false;
|
||||
if (DataEditingTakeFocus)
|
||||
{
|
||||
ImGui::SetKeyboardFocusHere();
|
||||
sprintf(AddrInput, "%0*X", addr_digits_count, base_display_addr+addr);
|
||||
sprintf(DataInput, "%02X", mem_data[addr]);
|
||||
}
|
||||
ImGui::PushItemWidth(ImGui::CalcTextSize("FF").x);
|
||||
ImGuiInputTextFlags flags = ImGuiInputTextFlags_CharsHexadecimal|ImGuiInputTextFlags_EnterReturnsTrue|ImGuiInputTextFlags_AutoSelectAll|ImGuiInputTextFlags_NoHorizontalScroll|ImGuiInputTextFlags_AlwaysInsertMode|ImGuiInputTextFlags_CallbackAlways;
|
||||
if (ImGui::InputText("##data", DataInput, 32, flags, FuncHolder::Callback, &cursor_pos))
|
||||
data_write = data_next = true;
|
||||
else if (!DataEditingTakeFocus && !ImGui::IsItemActive())
|
||||
DataEditingAddr = -1;
|
||||
DataEditingTakeFocus = false;
|
||||
ImGui::PopItemWidth();
|
||||
if (cursor_pos >= 2)
|
||||
data_write = data_next = true;
|
||||
if (data_write)
|
||||
{
|
||||
int data;
|
||||
if (sscanf(DataInput, "%X", &data) == 1)
|
||||
mem_data[addr] = (unsigned char)data;
|
||||
}
|
||||
ImGui::PopID();
|
||||
}
|
||||
else
|
||||
{
|
||||
ImGui::Text("%02X ", mem_data[addr]);
|
||||
if (AllowEdits && ImGui::IsItemHovered() && ImGui::IsMouseClicked(0))
|
||||
{
|
||||
DataEditingTakeFocus = true;
|
||||
DataEditingAddr = addr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ImGui::SameLine(line_start_x + cell_width * Rows + glyph_width * 2);
|
||||
|
||||
if (draw_separator)
|
||||
{
|
||||
ImVec2 screen_pos = ImGui::GetCursorScreenPos();
|
||||
ImGui::GetWindowDrawList()->AddLine(ImVec2(screen_pos.x - glyph_width, screen_pos.y - 9999), ImVec2(screen_pos.x - glyph_width, screen_pos.y + 9999), ImColor(ImGui::GetStyle().Colors[ImGuiCol_Border]));
|
||||
draw_separator = false;
|
||||
}
|
||||
|
||||
// Draw ASCII values
|
||||
addr = line_i * Rows;
|
||||
for (int n = 0; n < Rows && addr < mem_size; n++, addr++)
|
||||
{
|
||||
if (n > 0) ImGui::SameLine();
|
||||
int c = mem_data[addr];
|
||||
ImGui::Text("%c", (c >= 32 && c < 128) ? c : '.');
|
||||
}
|
||||
}
|
||||
clipper.End();
|
||||
ImGui::PopStyleVar(2);
|
||||
|
||||
ImGui::EndChild();
|
||||
|
||||
if (data_next && DataEditingAddr < mem_size)
|
||||
{
|
||||
DataEditingAddr = DataEditingAddr + 1;
|
||||
DataEditingTakeFocus = true;
|
||||
}
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
ImGui::AlignFirstTextHeightToWidgets();
|
||||
ImGui::PushItemWidth(50);
|
||||
ImGui::PushAllowKeyboardFocus(false);
|
||||
int rows_backup = Rows;
|
||||
if (ImGui::DragInt("##rows", &Rows, 0.2f, 4, 32, "%.0f rows"))
|
||||
{
|
||||
ImVec2 new_window_size = ImGui::GetWindowSize();
|
||||
new_window_size.x += (Rows - rows_backup) * (cell_width + glyph_width);
|
||||
ImGui::SetWindowSize(new_window_size);
|
||||
}
|
||||
ImGui::PopAllowKeyboardFocus();
|
||||
ImGui::PopItemWidth();
|
||||
ImGui::SameLine();
|
||||
ImGui::Text("Range %0*X..%0*X", addr_digits_count, (int)base_display_addr, addr_digits_count, (int)base_display_addr+mem_size-1);
|
||||
ImGui::SameLine();
|
||||
ImGui::PushItemWidth(70);
|
||||
if (ImGui::InputText("##addr", AddrInput, 32, ImGuiInputTextFlags_CharsHexadecimal | ImGuiInputTextFlags_EnterReturnsTrue))
|
||||
{
|
||||
int goto_addr;
|
||||
if (sscanf(AddrInput, "%X", &goto_addr) == 1)
|
||||
{
|
||||
goto_addr -= base_display_addr;
|
||||
if (goto_addr >= 0 && goto_addr < mem_size)
|
||||
{
|
||||
ImGui::BeginChild("##scrolling");
|
||||
ImGui::SetScrollFromPosY(ImGui::GetCursorStartPos().y + (goto_addr / Rows) * ImGui::GetTextLineHeight());
|
||||
ImGui::EndChild();
|
||||
DataEditingAddr = goto_addr;
|
||||
DataEditingTakeFocus = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
ImGui::PopItemWidth();
|
||||
}
|
||||
ImGui::End();
|
||||
}
|
||||
};
|
28
3rdparty/bgfx/3rdparty/ocornut-imgui/widgets/file_list.h
vendored
Normal file
28
3rdparty/bgfx/3rdparty/ocornut-imgui/widgets/file_list.h
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
namespace ImGui
|
||||
{
|
||||
struct ImFileInfo
|
||||
{
|
||||
ImFileInfo(const char* name, int64_t size);
|
||||
~ImFileInfo();
|
||||
|
||||
ImString Name;
|
||||
int64_t Size;
|
||||
};
|
||||
|
||||
struct ImFileList
|
||||
{
|
||||
typedef ImVector<ImFileInfo> FileInfoArray;
|
||||
FileInfoArray FileList;
|
||||
int Pos;
|
||||
|
||||
ImFileList(const char* path = ".")
|
||||
: Pos(0)
|
||||
{
|
||||
ChDir(path);
|
||||
}
|
||||
|
||||
void ChDir(const char* path);
|
||||
void Draw();
|
||||
};
|
||||
|
||||
} // namespace ImGui
|
119
3rdparty/bgfx/3rdparty/ocornut-imgui/widgets/file_list.inl
vendored
Normal file
119
3rdparty/bgfx/3rdparty/ocornut-imgui/widgets/file_list.inl
vendored
Normal file
@ -0,0 +1,119 @@
|
||||
#include <dirent.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
namespace ImGui
|
||||
{
|
||||
ImFileInfo::ImFileInfo(const char* name, int64_t size)
|
||||
: Name(name)
|
||||
, Size(size)
|
||||
{
|
||||
}
|
||||
|
||||
ImFileInfo::~ImFileInfo()
|
||||
{
|
||||
}
|
||||
|
||||
void ImFileList::ChDir(const char* path)
|
||||
{
|
||||
DIR* dir = opendir(path);
|
||||
if (NULL != dir)
|
||||
{
|
||||
FileList.clear();
|
||||
|
||||
for (dirent* item = readdir(dir); NULL != item; item = readdir(dir) )
|
||||
{
|
||||
if (0 == ImStricmp(item->d_name, "..") )
|
||||
{
|
||||
FileList.push_back(ImFileInfo(item->d_name, -1) );
|
||||
}
|
||||
else if (0 != ImStricmp(item->d_name, ".") )
|
||||
{
|
||||
if (item->d_type & DT_DIR)
|
||||
{
|
||||
FileList.push_back(ImFileInfo(item->d_name, -1) );
|
||||
}
|
||||
else
|
||||
{
|
||||
struct stat statbuf;
|
||||
stat(item->d_name, &statbuf);
|
||||
FileList.push_back(ImFileInfo(item->d_name, statbuf.st_size) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
closedir(dir);
|
||||
}
|
||||
}
|
||||
|
||||
void ImFileList::Draw()
|
||||
{
|
||||
BeginChild("##file_list", ImVec2(0.0f, 0.0f) );
|
||||
PushFont(Font::Mono);
|
||||
|
||||
PushItemWidth(-1);
|
||||
if (ListBoxHeader("##empty", ImVec2(0.0f, 0.0f) ) )
|
||||
{
|
||||
const float lineHeight = GetTextLineHeightWithSpacing();
|
||||
|
||||
ImString chdir;
|
||||
|
||||
int pos = 0;
|
||||
ImGuiListClipper clipper(FileList.size(), lineHeight);
|
||||
for (FileInfoArray::const_iterator it = FileList.begin(), itEnd = FileList.end()
|
||||
; it != itEnd
|
||||
; ++it
|
||||
)
|
||||
{
|
||||
if (pos >= clipper.DisplayStart
|
||||
&& pos < clipper.DisplayEnd)
|
||||
{
|
||||
PushID(pos);
|
||||
|
||||
const bool isDir = -1 == it->Size;
|
||||
bool isSelected = Pos == pos;
|
||||
|
||||
bool clicked = Selectable(it->Name.CStr(), &isSelected);
|
||||
SameLine(150);
|
||||
if (isDir)
|
||||
{
|
||||
Text("%10s", "<DIR>");
|
||||
}
|
||||
else
|
||||
{
|
||||
Text("%10" PRId64, it->Size);
|
||||
}
|
||||
|
||||
if (clicked)
|
||||
{
|
||||
if (0 == strcmp(it->Name.CStr(), "..") )
|
||||
{
|
||||
chdir = it->Name;
|
||||
}
|
||||
|
||||
Pos = pos;
|
||||
|
||||
if (isDir)
|
||||
{
|
||||
chdir = it->Name;
|
||||
}
|
||||
}
|
||||
|
||||
PopID();
|
||||
}
|
||||
++pos;
|
||||
}
|
||||
clipper.End();
|
||||
|
||||
ListBoxFooter();
|
||||
|
||||
if (!chdir.IsEmpty() )
|
||||
{
|
||||
ChDir(chdir.CStr() );
|
||||
}
|
||||
}
|
||||
|
||||
PopFont();
|
||||
EndChild();
|
||||
}
|
||||
|
||||
} // namespace ImGui
|
27
3rdparty/bgfx/3rdparty/ocornut-imgui/widgets/memory_editor.h
vendored
Normal file
27
3rdparty/bgfx/3rdparty/ocornut-imgui/widgets/memory_editor.h
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
namespace ImGui
|
||||
{
|
||||
struct MemoryEditor
|
||||
{
|
||||
bool AllowEdits;
|
||||
bool HexII;
|
||||
int Rows;
|
||||
int DataEditingAddr;
|
||||
bool DataEditingTakeFocus;
|
||||
char DataInput[32];
|
||||
char AddrInput[32];
|
||||
|
||||
MemoryEditor()
|
||||
{
|
||||
AllowEdits = true;
|
||||
HexII = true;
|
||||
Rows = 16;
|
||||
DataEditingAddr = -1;
|
||||
DataEditingTakeFocus = false;
|
||||
strcpy(DataInput, "");
|
||||
strcpy(AddrInput, "");
|
||||
}
|
||||
|
||||
void Draw(void* mem_data, int mem_size, int base_display_addr = 0);
|
||||
void Draw(const void* mem_data, int mem_size, int base_display_addr = 0);
|
||||
};
|
||||
} // namespace ImGui
|
249
3rdparty/bgfx/3rdparty/ocornut-imgui/widgets/memory_editor.inl
vendored
Normal file
249
3rdparty/bgfx/3rdparty/ocornut-imgui/widgets/memory_editor.inl
vendored
Normal file
@ -0,0 +1,249 @@
|
||||
#ifdef _MSC_VER
|
||||
# define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
namespace ImGui
|
||||
{
|
||||
// const char* title;
|
||||
// if (Begin(title, &Open))
|
||||
// {
|
||||
// End();
|
||||
// }
|
||||
|
||||
void MemoryEditor::Draw(void* mem_data_void, int mem_size, int base_display_addr)
|
||||
{
|
||||
PushFont(Font::Mono);
|
||||
|
||||
unsigned char* mem_data = (unsigned char*)mem_data_void;
|
||||
|
||||
BeginChild("##scrolling", ImVec2(0, -GetItemsLineHeightWithSpacing()));
|
||||
|
||||
if (ImGui::BeginPopupContextWindow() )
|
||||
{
|
||||
ImGui::Checkbox("HexII", &HexII);
|
||||
ImGui::EndPopup();
|
||||
}
|
||||
|
||||
PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(0.0f, 0.0f) );
|
||||
PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(0.0f, 0.0f) );
|
||||
|
||||
int addr_digits_count = 0;
|
||||
for (int n = base_display_addr + mem_size - 1; n > 0; n >>= 4)
|
||||
{
|
||||
addr_digits_count++;
|
||||
}
|
||||
|
||||
float glyph_width = CalcTextSize("F").x;
|
||||
float cell_width = glyph_width * 3; // "FF " we include trailing space in the width to easily catch clicks everywhere
|
||||
|
||||
float line_height = GetTextLineHeight();
|
||||
int line_total_count = (int)((mem_size + Rows-1) / Rows);
|
||||
ImGuiListClipper clipper(line_total_count, line_height);
|
||||
int visible_start_addr = clipper.DisplayStart * Rows;
|
||||
int visible_end_addr = clipper.DisplayEnd * Rows;
|
||||
|
||||
bool data_next = false;
|
||||
|
||||
if (!AllowEdits || DataEditingAddr >= mem_size)
|
||||
{
|
||||
DataEditingAddr = -1;
|
||||
}
|
||||
|
||||
int data_editing_addr_backup = DataEditingAddr;
|
||||
if (DataEditingAddr != -1)
|
||||
{
|
||||
if (IsKeyPressed(GetKeyIndex(ImGuiKey_UpArrow)) && DataEditingAddr >= Rows) { DataEditingAddr -= Rows; DataEditingTakeFocus = true; }
|
||||
else if (IsKeyPressed(GetKeyIndex(ImGuiKey_DownArrow)) && DataEditingAddr < mem_size - Rows) { DataEditingAddr += Rows; DataEditingTakeFocus = true; }
|
||||
else if (IsKeyPressed(GetKeyIndex(ImGuiKey_LeftArrow)) && DataEditingAddr > 0) { DataEditingAddr -= 1; DataEditingTakeFocus = true; }
|
||||
else if (IsKeyPressed(GetKeyIndex(ImGuiKey_RightArrow)) && DataEditingAddr < mem_size - 1) { DataEditingAddr += 1; DataEditingTakeFocus = true; }
|
||||
}
|
||||
|
||||
if ((DataEditingAddr / Rows) != (data_editing_addr_backup / Rows))
|
||||
{
|
||||
// Track cursor movements
|
||||
float scroll_offset = ((DataEditingAddr / Rows) - (data_editing_addr_backup / Rows)) * line_height;
|
||||
bool scroll_desired = (scroll_offset < 0.0f && DataEditingAddr < visible_start_addr + Rows*2) || (scroll_offset > 0.0f && DataEditingAddr > visible_end_addr - Rows*2);
|
||||
if (scroll_desired)
|
||||
{
|
||||
SetScrollY(GetScrollY() + scroll_offset);
|
||||
}
|
||||
}
|
||||
|
||||
bool draw_separator = true;
|
||||
for (int line_i = clipper.DisplayStart; line_i < clipper.DisplayEnd; line_i++) // display only visible items
|
||||
{
|
||||
int addr = line_i * Rows;
|
||||
Text("%0*x: ", addr_digits_count, base_display_addr+addr);
|
||||
SameLine();
|
||||
|
||||
// Draw Hexadecimal
|
||||
float line_start_x = GetCursorPosX();
|
||||
for (int n = 0; n < Rows && addr < mem_size; n++, addr++)
|
||||
{
|
||||
SameLine(line_start_x + cell_width * n);
|
||||
|
||||
if (DataEditingAddr == addr)
|
||||
{
|
||||
// Display text input on current byte
|
||||
PushID(addr);
|
||||
struct FuncHolder
|
||||
{
|
||||
// FIXME: We should have a way to retrieve the text edit cursor position more easily in the API, this is rather tedious.
|
||||
static int Callback(ImGuiTextEditCallbackData* data)
|
||||
{
|
||||
int* p_cursor_pos = (int*)data->UserData;
|
||||
if (!data->HasSelection())
|
||||
{
|
||||
*p_cursor_pos = data->CursorPos;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
int cursor_pos = -1;
|
||||
bool data_write = false;
|
||||
if (DataEditingTakeFocus)
|
||||
{
|
||||
SetKeyboardFocusHere();
|
||||
snprintf(AddrInput, sizeof(AddrInput), "%0*x", addr_digits_count, base_display_addr+addr);
|
||||
snprintf(DataInput, sizeof(DataInput), "%02x", mem_data[addr]);
|
||||
}
|
||||
|
||||
PushItemWidth(CalcTextSize("FF").x);
|
||||
ImGuiInputTextFlags flags = ImGuiInputTextFlags_CharsHexadecimal|ImGuiInputTextFlags_EnterReturnsTrue|ImGuiInputTextFlags_AutoSelectAll|ImGuiInputTextFlags_NoHorizontalScroll|ImGuiInputTextFlags_AlwaysInsertMode|ImGuiInputTextFlags_CallbackAlways;
|
||||
if (InputText("##data", DataInput, 32, flags, FuncHolder::Callback, &cursor_pos))
|
||||
{
|
||||
data_write = data_next = true;
|
||||
}
|
||||
else if (!DataEditingTakeFocus && !IsItemActive())
|
||||
{
|
||||
DataEditingAddr = -1;
|
||||
}
|
||||
|
||||
DataEditingTakeFocus = false;
|
||||
PopItemWidth();
|
||||
if (cursor_pos >= 2)
|
||||
{
|
||||
data_write = data_next = true;
|
||||
}
|
||||
|
||||
if (data_write)
|
||||
{
|
||||
int data;
|
||||
if (sscanf(DataInput, "%X", &data) == 1)
|
||||
{
|
||||
mem_data[addr] = (unsigned char)data;
|
||||
}
|
||||
}
|
||||
PopID();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (HexII)
|
||||
{
|
||||
unsigned char byte = mem_data[addr];
|
||||
if (isprint(byte) )
|
||||
{
|
||||
Text(".%c ", byte);
|
||||
}
|
||||
else if (0x00 == byte)
|
||||
{
|
||||
Text(" ");
|
||||
}
|
||||
else if (0xff == byte)
|
||||
{
|
||||
Text("## ");
|
||||
}
|
||||
else
|
||||
{
|
||||
Text("%02x ", byte);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Text("%02x ", mem_data[addr]);
|
||||
}
|
||||
|
||||
if (AllowEdits && IsItemHovered() && IsMouseClicked(0))
|
||||
{
|
||||
DataEditingTakeFocus = true;
|
||||
DataEditingAddr = addr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SameLine(line_start_x + cell_width * Rows + glyph_width * 2);
|
||||
|
||||
if (draw_separator)
|
||||
{
|
||||
ImVec2 screen_pos = GetCursorScreenPos();
|
||||
GetWindowDrawList()->AddLine(ImVec2(screen_pos.x - glyph_width, screen_pos.y - 9999), ImVec2(screen_pos.x - glyph_width, screen_pos.y + 9999), ImColor(GetStyle().Colors[ImGuiCol_Border]));
|
||||
draw_separator = false;
|
||||
}
|
||||
|
||||
// Draw ASCII values
|
||||
addr = line_i * Rows;
|
||||
for (int n = 0; n < Rows && addr < mem_size; n++, addr++)
|
||||
{
|
||||
if (n > 0) { SameLine(); }
|
||||
int c = mem_data[addr];
|
||||
Text("%c", (c >= 32 && c < 128) ? c : '.');
|
||||
}
|
||||
}
|
||||
clipper.End();
|
||||
PopStyleVar(2);
|
||||
|
||||
EndChild();
|
||||
|
||||
if (data_next && DataEditingAddr < mem_size)
|
||||
{
|
||||
DataEditingAddr = DataEditingAddr + 1;
|
||||
DataEditingTakeFocus = true;
|
||||
}
|
||||
|
||||
Separator();
|
||||
|
||||
AlignFirstTextHeightToWidgets();
|
||||
PushItemWidth(50);
|
||||
PushAllowKeyboardFocus(false);
|
||||
int rows_backup = Rows;
|
||||
if (DragInt("##rows", &Rows, 0.2f, 4, 32, "%.0f rows"))
|
||||
{
|
||||
ImVec2 new_window_size = GetWindowSize();
|
||||
new_window_size.x += (Rows - rows_backup) * (cell_width + glyph_width);
|
||||
SetWindowSize(new_window_size);
|
||||
}
|
||||
|
||||
PopAllowKeyboardFocus();
|
||||
PopItemWidth();
|
||||
SameLine();
|
||||
Text("Range %0*x..%0*x", addr_digits_count, (int)base_display_addr, addr_digits_count, (int)base_display_addr+mem_size-1);
|
||||
SameLine();
|
||||
PushItemWidth(70);
|
||||
if (InputText("##addr", AddrInput, 32, ImGuiInputTextFlags_CharsHexadecimal | ImGuiInputTextFlags_EnterReturnsTrue))
|
||||
{
|
||||
int goto_addr;
|
||||
if (sscanf(AddrInput, "%X", &goto_addr) == 1)
|
||||
{
|
||||
goto_addr -= base_display_addr;
|
||||
if (goto_addr >= 0 && goto_addr < mem_size)
|
||||
{
|
||||
BeginChild("##scrolling");
|
||||
SetScrollFromPosY(GetCursorStartPos().y + (goto_addr / Rows) * GetTextLineHeight());
|
||||
EndChild();
|
||||
DataEditingAddr = goto_addr;
|
||||
DataEditingTakeFocus = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PopItemWidth();
|
||||
|
||||
PopFont();
|
||||
}
|
||||
|
||||
void MemoryEditor::Draw(const void* mem_data, int mem_size, int base_display_addr)
|
||||
{
|
||||
Draw(const_cast<void*>(mem_data), mem_size, base_display_addr);
|
||||
}
|
||||
|
||||
} // namespace ImGui
|
50
3rdparty/bgfx/3rdparty/stb/stb_image.c
vendored
50
3rdparty/bgfx/3rdparty/stb/stb_image.c
vendored
@ -1375,18 +1375,18 @@ static unsigned char *stbi__convert_format(unsigned char *data, int img_n, int r
|
||||
// convert source image with img_n components to one with req_comp components;
|
||||
// avoid switch per pixel, so use switch per scanline and massive macros
|
||||
switch (COMBO(img_n, req_comp)) {
|
||||
CASE(1,2) dest[0]=src[0], dest[1]=255; break;
|
||||
CASE(1,3) dest[0]=dest[1]=dest[2]=src[0]; break;
|
||||
CASE(1,4) dest[0]=dest[1]=dest[2]=src[0], dest[3]=255; break;
|
||||
CASE(2,1) dest[0]=src[0]; break;
|
||||
CASE(2,3) dest[0]=dest[1]=dest[2]=src[0]; break;
|
||||
CASE(2,4) dest[0]=dest[1]=dest[2]=src[0], dest[3]=src[1]; break;
|
||||
CASE(3,4) dest[0]=src[0],dest[1]=src[1],dest[2]=src[2],dest[3]=255; break;
|
||||
CASE(3,1) dest[0]=stbi__compute_y(src[0],src[1],src[2]); break;
|
||||
CASE(3,2) dest[0]=stbi__compute_y(src[0],src[1],src[2]), dest[1] = 255; break;
|
||||
CASE(4,1) dest[0]=stbi__compute_y(src[0],src[1],src[2]); break;
|
||||
CASE(4,2) dest[0]=stbi__compute_y(src[0],src[1],src[2]), dest[1] = src[3]; break;
|
||||
CASE(4,3) dest[0]=src[0],dest[1]=src[1],dest[2]=src[2]; break;
|
||||
CASE(1,2) { dest[0]=src[0]; dest[1]=255; } break;
|
||||
CASE(1,3) { dest[0]=dest[1]=dest[2]=src[0]; } break;
|
||||
CASE(1,4) { dest[0]=dest[1]=dest[2]=src[0]; dest[3]=255; } break;
|
||||
CASE(2,1) { dest[0]=src[0]; } break;
|
||||
CASE(2,3) { dest[0]=dest[1]=dest[2]=src[0]; } break;
|
||||
CASE(2,4) { dest[0]=dest[1]=dest[2]=src[0]; dest[3]=src[1]; } break;
|
||||
CASE(3,4) { dest[0]=src[0]; dest[1]=src[1]; dest[2]=src[2]; dest[3]=255; } break;
|
||||
CASE(3,1) { dest[0]=stbi__compute_y(src[0],src[1],src[2]); } break;
|
||||
CASE(3,2) { dest[0]=stbi__compute_y(src[0],src[1],src[2]); dest[1] = 255; } break;
|
||||
CASE(4,1) { dest[0]=stbi__compute_y(src[0],src[1],src[2]); } break;
|
||||
CASE(4,2) { dest[0]=stbi__compute_y(src[0],src[1],src[2]); dest[1] = src[3]; } break;
|
||||
CASE(4,3) { dest[0]=src[0]; dest[1]=src[1]; dest[2]=src[2]; } break;
|
||||
default: STBI_ASSERT(0);
|
||||
}
|
||||
#undef CASE
|
||||
@ -4101,12 +4101,12 @@ static int stbi__create_png_image_raw(stbi__png *a, stbi_uc *raw, stbi__uint32 r
|
||||
switch (filter) {
|
||||
// "none" filter turns into a memcpy here; make that explicit.
|
||||
case STBI__F_none: memcpy(cur, raw, nk); break;
|
||||
CASE(STBI__F_sub) cur[k] = STBI__BYTECAST(raw[k] + cur[k-filter_bytes]); break;
|
||||
CASE(STBI__F_up) cur[k] = STBI__BYTECAST(raw[k] + prior[k]); break;
|
||||
CASE(STBI__F_avg) cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k-filter_bytes])>>1)); break;
|
||||
CASE(STBI__F_paeth) cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k-filter_bytes],prior[k],prior[k-filter_bytes])); break;
|
||||
CASE(STBI__F_avg_first) cur[k] = STBI__BYTECAST(raw[k] + (cur[k-filter_bytes] >> 1)); break;
|
||||
CASE(STBI__F_paeth_first) cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k-filter_bytes],0,0)); break;
|
||||
CASE(STBI__F_sub) { cur[k] = STBI__BYTECAST(raw[k] + cur[k-filter_bytes]); } break;
|
||||
CASE(STBI__F_up) { cur[k] = STBI__BYTECAST(raw[k] + prior[k]); } break;
|
||||
CASE(STBI__F_avg) { cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k-filter_bytes])>>1)); } break;
|
||||
CASE(STBI__F_paeth) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k-filter_bytes],prior[k],prior[k-filter_bytes])); } break;
|
||||
CASE(STBI__F_avg_first) { cur[k] = STBI__BYTECAST(raw[k] + (cur[k-filter_bytes] >> 1)); } break;
|
||||
CASE(STBI__F_paeth_first) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k-filter_bytes],0,0)); } break;
|
||||
}
|
||||
#undef CASE
|
||||
raw += nk;
|
||||
@ -4117,13 +4117,13 @@ static int stbi__create_png_image_raw(stbi__png *a, stbi_uc *raw, stbi__uint32 r
|
||||
for (i=x-1; i >= 1; --i, cur[filter_bytes]=255,raw+=filter_bytes,cur+=output_bytes,prior+=output_bytes) \
|
||||
for (k=0; k < filter_bytes; ++k)
|
||||
switch (filter) {
|
||||
CASE(STBI__F_none) cur[k] = raw[k]; break;
|
||||
CASE(STBI__F_sub) cur[k] = STBI__BYTECAST(raw[k] + cur[k- output_bytes]); break;
|
||||
CASE(STBI__F_up) cur[k] = STBI__BYTECAST(raw[k] + prior[k]); break;
|
||||
CASE(STBI__F_avg) cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k- output_bytes])>>1)); break;
|
||||
CASE(STBI__F_paeth) cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k- output_bytes],prior[k],prior[k- output_bytes])); break;
|
||||
CASE(STBI__F_avg_first) cur[k] = STBI__BYTECAST(raw[k] + (cur[k- output_bytes] >> 1)); break;
|
||||
CASE(STBI__F_paeth_first) cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k- output_bytes],0,0)); break;
|
||||
CASE(STBI__F_none) { cur[k] = raw[k]; } break;
|
||||
CASE(STBI__F_sub) { cur[k] = STBI__BYTECAST(raw[k] + cur[k- output_bytes]); } break;
|
||||
CASE(STBI__F_up) { cur[k] = STBI__BYTECAST(raw[k] + prior[k]); } break;
|
||||
CASE(STBI__F_avg) { cur[k] = STBI__BYTECAST(raw[k] + ((prior[k] + cur[k- output_bytes])>>1)); } break;
|
||||
CASE(STBI__F_paeth) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k- output_bytes],prior[k],prior[k- output_bytes])); } break;
|
||||
CASE(STBI__F_avg_first) { cur[k] = STBI__BYTECAST(raw[k] + (cur[k- output_bytes] >> 1)); } break;
|
||||
CASE(STBI__F_paeth_first) { cur[k] = STBI__BYTECAST(raw[k] + stbi__paeth(cur[k- output_bytes],0,0)); } break;
|
||||
}
|
||||
#undef CASE
|
||||
|
||||
|
74
3rdparty/bgfx/3rdparty/stb/stb_textedit.h
vendored
74
3rdparty/bgfx/3rdparty/stb/stb_textedit.h
vendored
@ -1,3 +1,8 @@
|
||||
// [ImGui] this is a slightly modified version of stb_truetype.h 1.8
|
||||
// [ImGui] - fixed a crash bug in stb_textedit_discard_redo (#681)
|
||||
// [ImGui] - fixed some minor warnings
|
||||
// [ImGui] - added STB_TEXTEDIT_MOVEWORDLEFT/STB_TEXTEDIT_MOVEWORDRIGHT custom handler (#473)
|
||||
|
||||
// stb_textedit.h - v1.8 - public domain - Sean Barrett
|
||||
// Development of this library was sponsored by RAD Game Tools
|
||||
//
|
||||
@ -148,15 +153,17 @@
|
||||
// STB_TEXTEDIT_K_REDO keyboard input to perform redo
|
||||
//
|
||||
// Optional:
|
||||
// STB_TEXTEDIT_K_INSERT keyboard input to toggle insert mode
|
||||
// STB_TEXTEDIT_IS_SPACE(ch) true if character is whitespace (e.g. 'isspace'),
|
||||
// required for WORDLEFT/WORDRIGHT
|
||||
// STB_TEXTEDIT_K_WORDLEFT keyboard input to move cursor left one word // e.g. ctrl-LEFT
|
||||
// STB_TEXTEDIT_K_WORDRIGHT keyboard input to move cursor right one word // e.g. ctrl-RIGHT
|
||||
// STB_TEXTEDIT_K_LINESTART2 secondary keyboard input to move cursor to start of line
|
||||
// STB_TEXTEDIT_K_LINEEND2 secondary keyboard input to move cursor to end of line
|
||||
// STB_TEXTEDIT_K_TEXTSTART2 secondary keyboard input to move cursor to start of text
|
||||
// STB_TEXTEDIT_K_TEXTEND2 secondary keyboard input to move cursor to end of text
|
||||
// STB_TEXTEDIT_K_INSERT keyboard input to toggle insert mode
|
||||
// STB_TEXTEDIT_IS_SPACE(ch) true if character is whitespace (e.g. 'isspace'),
|
||||
// required for default WORDLEFT/WORDRIGHT handlers
|
||||
// STB_TEXTEDIT_MOVEWORDLEFT(obj,i) custom handler for WORDLEFT, returns index to move cursor to
|
||||
// STB_TEXTEDIT_MOVEWORDRIGHT(obj,i) custom handler for WORDRIGHT, returns index to move cursor to
|
||||
// STB_TEXTEDIT_K_WORDLEFT keyboard input to move cursor left one word // e.g. ctrl-LEFT
|
||||
// STB_TEXTEDIT_K_WORDRIGHT keyboard input to move cursor right one word // e.g. ctrl-RIGHT
|
||||
// STB_TEXTEDIT_K_LINESTART2 secondary keyboard input to move cursor to start of line
|
||||
// STB_TEXTEDIT_K_LINEEND2 secondary keyboard input to move cursor to end of line
|
||||
// STB_TEXTEDIT_K_TEXTSTART2 secondary keyboard input to move cursor to start of text
|
||||
// STB_TEXTEDIT_K_TEXTEND2 secondary keyboard input to move cursor to end of text
|
||||
//
|
||||
// Todo:
|
||||
// STB_TEXTEDIT_K_PGUP keyboard input to move cursor up a page
|
||||
@ -615,9 +622,9 @@ static int is_word_boundary( STB_TEXTEDIT_STRING *_str, int _idx )
|
||||
return _idx > 0 ? (STB_TEXTEDIT_IS_SPACE( STB_TEXTEDIT_GETCHAR(_str,_idx-1) ) && !STB_TEXTEDIT_IS_SPACE( STB_TEXTEDIT_GETCHAR(_str, _idx) ) ) : 1;
|
||||
}
|
||||
|
||||
static int stb_textedit_move_to_word_previous( STB_TEXTEDIT_STRING *_str, STB_TexteditState *_state )
|
||||
#ifndef STB_TEXTEDIT_MOVEWORDLEFT
|
||||
static int stb_textedit_move_to_word_previous( STB_TEXTEDIT_STRING *_str, int c )
|
||||
{
|
||||
int c = _state->cursor - 1;
|
||||
while( c >= 0 && !is_word_boundary( _str, c ) )
|
||||
--c;
|
||||
|
||||
@ -626,11 +633,13 @@ static int stb_textedit_move_to_word_previous( STB_TEXTEDIT_STRING *_str, STB_Te
|
||||
|
||||
return c;
|
||||
}
|
||||
#define STB_TEXTEDIT_MOVEWORDLEFT stb_textedit_move_to_word_previous
|
||||
#endif
|
||||
|
||||
static int stb_textedit_move_to_word_next( STB_TEXTEDIT_STRING *_str, STB_TexteditState *_state )
|
||||
#ifndef STB_TEXTEDIT_MOVEWORDRIGHT
|
||||
static int stb_textedit_move_to_word_next( STB_TEXTEDIT_STRING *_str, int c )
|
||||
{
|
||||
const int len = STB_TEXTEDIT_STRINGLEN(_str);
|
||||
int c = _state->cursor+1;
|
||||
while( c < len && !is_word_boundary( _str, c ) )
|
||||
++c;
|
||||
|
||||
@ -639,6 +648,9 @@ static int stb_textedit_move_to_word_next( STB_TEXTEDIT_STRING *_str, STB_Texted
|
||||
|
||||
return c;
|
||||
}
|
||||
#define STB_TEXTEDIT_MOVEWORDRIGHT stb_textedit_move_to_word_next
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
// update selection and cursor to match each other
|
||||
@ -760,21 +772,12 @@ retry:
|
||||
state->has_preferred_x = 0;
|
||||
break;
|
||||
|
||||
#ifdef STB_TEXTEDIT_IS_SPACE
|
||||
#ifdef STB_TEXTEDIT_MOVEWORDLEFT
|
||||
case STB_TEXTEDIT_K_WORDLEFT:
|
||||
if (STB_TEXT_HAS_SELECTION(state))
|
||||
stb_textedit_move_to_first(state);
|
||||
else {
|
||||
state->cursor = stb_textedit_move_to_word_previous(str, state);
|
||||
stb_textedit_clamp( str, state );
|
||||
}
|
||||
break;
|
||||
|
||||
case STB_TEXTEDIT_K_WORDRIGHT:
|
||||
if (STB_TEXT_HAS_SELECTION(state))
|
||||
stb_textedit_move_to_last(str, state);
|
||||
else {
|
||||
state->cursor = stb_textedit_move_to_word_next(str, state);
|
||||
state->cursor = STB_TEXTEDIT_MOVEWORDLEFT(str, state->cursor-1);
|
||||
stb_textedit_clamp( str, state );
|
||||
}
|
||||
break;
|
||||
@ -783,17 +786,28 @@ retry:
|
||||
if( !STB_TEXT_HAS_SELECTION( state ) )
|
||||
stb_textedit_prep_selection_at_cursor(state);
|
||||
|
||||
state->cursor = stb_textedit_move_to_word_previous(str, state);
|
||||
state->cursor = STB_TEXTEDIT_MOVEWORDLEFT(str, state->cursor-1);
|
||||
state->select_end = state->cursor;
|
||||
|
||||
stb_textedit_clamp( str, state );
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef STB_TEXTEDIT_MOVEWORDRIGHT
|
||||
case STB_TEXTEDIT_K_WORDRIGHT:
|
||||
if (STB_TEXT_HAS_SELECTION(state))
|
||||
stb_textedit_move_to_last(str, state);
|
||||
else {
|
||||
state->cursor = STB_TEXTEDIT_MOVEWORDRIGHT(str, state->cursor+1);
|
||||
stb_textedit_clamp( str, state );
|
||||
}
|
||||
break;
|
||||
|
||||
case STB_TEXTEDIT_K_WORDRIGHT | STB_TEXTEDIT_K_SHIFT:
|
||||
if( !STB_TEXT_HAS_SELECTION( state ) )
|
||||
stb_textedit_prep_selection_at_cursor(state);
|
||||
|
||||
state->cursor = stb_textedit_move_to_word_next(str, state);
|
||||
state->cursor = STB_TEXTEDIT_MOVEWORDRIGHT(str, state->cursor+1);
|
||||
state->select_end = state->cursor;
|
||||
|
||||
stb_textedit_clamp( str, state );
|
||||
@ -1058,13 +1072,13 @@ static void stb_textedit_discard_undo(StbUndoState *state)
|
||||
int n = state->undo_rec[0].insert_length, i;
|
||||
// delete n characters from all other records
|
||||
state->undo_char_point = state->undo_char_point - (short) n; // vsnet05
|
||||
STB_TEXTEDIT_memmove(state->undo_char, state->undo_char + n, (size_t) (state->undo_char_point*sizeof(STB_TEXTEDIT_CHARTYPE)));
|
||||
STB_TEXTEDIT_memmove(state->undo_char, state->undo_char + n, (size_t) ((size_t)state->undo_char_point*sizeof(STB_TEXTEDIT_CHARTYPE)));
|
||||
for (i=0; i < state->undo_point; ++i)
|
||||
if (state->undo_rec[i].char_storage >= 0)
|
||||
state->undo_rec[i].char_storage = state->undo_rec[i].char_storage - (short) n; // vsnet05 // @OPTIMIZE: get rid of char_storage and infer it
|
||||
}
|
||||
--state->undo_point;
|
||||
STB_TEXTEDIT_memmove(state->undo_rec, state->undo_rec+1, (size_t) (state->undo_point*sizeof(state->undo_rec[0])));
|
||||
STB_TEXTEDIT_memmove(state->undo_rec, state->undo_rec+1, (size_t) ((size_t)state->undo_point*sizeof(state->undo_rec[0])));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1082,13 +1096,13 @@ static void stb_textedit_discard_redo(StbUndoState *state)
|
||||
int n = state->undo_rec[k].insert_length, i;
|
||||
// delete n characters from all other records
|
||||
state->redo_char_point = state->redo_char_point + (short) n; // vsnet05
|
||||
STB_TEXTEDIT_memmove(state->undo_char + state->redo_char_point, state->undo_char + state->redo_char_point-n, (size_t) ((STB_TEXTEDIT_UNDOSTATECOUNT - state->redo_char_point)*sizeof(STB_TEXTEDIT_CHARTYPE)));
|
||||
STB_TEXTEDIT_memmove(state->undo_char + state->redo_char_point, state->undo_char + state->redo_char_point-n, (size_t) ((size_t)(STB_TEXTEDIT_UNDOCHARCOUNT - state->redo_char_point)*sizeof(STB_TEXTEDIT_CHARTYPE)));
|
||||
for (i=state->redo_point; i < k; ++i)
|
||||
if (state->undo_rec[i].char_storage >= 0)
|
||||
state->undo_rec[i].char_storage = state->undo_rec[i].char_storage + (short) n; // vsnet05
|
||||
}
|
||||
++state->redo_point;
|
||||
STB_TEXTEDIT_memmove(state->undo_rec + state->redo_point-1, state->undo_rec + state->redo_point, (size_t) ((STB_TEXTEDIT_UNDOSTATECOUNT - state->redo_point)*sizeof(state->undo_rec[0])));
|
||||
STB_TEXTEDIT_memmove(state->undo_rec + state->redo_point-1, state->undo_rec + state->redo_point, (size_t) ((size_t)(STB_TEXTEDIT_UNDOSTATECOUNT - state->redo_point)*sizeof(state->undo_rec[0])));
|
||||
}
|
||||
}
|
||||
|
||||
|
2
3rdparty/bgfx/3rdparty/tinyexr/tinyexr.h
vendored
2
3rdparty/bgfx/3rdparty/tinyexr/tinyexr.h
vendored
@ -8031,7 +8031,7 @@ bool hufBuildDecTable(const long long *hcode, // i : encoding table
|
||||
|
||||
HufDec *pl = hdecod + (c << (HUF_DECBITS - l));
|
||||
|
||||
for (long long i = 1 << (HUF_DECBITS - l); i > 0; i--, pl++) {
|
||||
for (long long i = (long long)1 << (HUF_DECBITS - l); i > 0; i--, pl++) {
|
||||
if (pl->len || pl->p) {
|
||||
//
|
||||
// Error: a short code or a long code has
|
||||
|
2
3rdparty/bgfx/examples/25-c99/helloworld.c
vendored
2
3rdparty/bgfx/examples/25-c99/helloworld.c
vendored
@ -63,7 +63,7 @@ int _main_(int _argc, char** _argv)
|
||||
|
||||
// Advance to next frame. Rendering thread will be kicked to
|
||||
// process submitted rendering primitives.
|
||||
bgfx_frame();
|
||||
bgfx_frame(false);
|
||||
}
|
||||
|
||||
// Shutdown bgfx.
|
||||
|
136
3rdparty/bgfx/examples/common/bgfx_utils.cpp
vendored
136
3rdparty/bgfx/examples/common/bgfx_utils.cpp
vendored
@ -14,12 +14,21 @@ namespace stl = tinystl;
|
||||
|
||||
#include <bgfx/bgfx.h>
|
||||
#include <bx/commandline.h>
|
||||
#include <bx/endian.h>
|
||||
#include <bx/fpumath.h>
|
||||
#include <bx/readerwriter.h>
|
||||
#include <bx/string.h>
|
||||
#include "entry/entry.h"
|
||||
#include <ib-compress/indexbufferdecompression.h>
|
||||
|
||||
#define LODEPNG_NO_COMPILE_ENCODER
|
||||
#define LODEPNG_NO_COMPILE_DISK
|
||||
#define LODEPNG_NO_COMPILE_ANCILLARY_CHUNKS
|
||||
#define LODEPNG_NO_COMPILE_ERROR_TEXT
|
||||
#define LODEPNG_NO_COMPILE_ALLOCATORS
|
||||
#define LODEPNG_NO_COMPILE_CPP
|
||||
#include <lodepng/lodepng.h>
|
||||
|
||||
#include "bgfx_utils.h"
|
||||
|
||||
void* load(bx::FileReaderI* _reader, bx::AllocatorI* _allocator, const char* _filePath, uint32_t* _size)
|
||||
@ -154,7 +163,9 @@ bgfx::ProgramHandle loadProgram(const char* _vsName, const char* _fsName)
|
||||
}
|
||||
|
||||
typedef unsigned char stbi_uc;
|
||||
extern "C" stbi_uc *stbi_load_from_memory(stbi_uc const *buffer, int len, int *x, int *y, int *comp, int req_comp);
|
||||
extern "C" stbi_uc* stbi_load_from_memory(stbi_uc const* _buffer, int _len, int* _x, int* _y, int* _comp, int _req_comp);
|
||||
extern "C" void stbi_image_free(void* _ptr);
|
||||
extern void lodepng_free(void* _ptr);
|
||||
|
||||
bgfx::TextureHandle loadTexture(bx::FileReaderI* _reader, const char* _filePath, uint32_t _flags, uint8_t _skip, bgfx::TextureInfo* _info)
|
||||
{
|
||||
@ -180,24 +191,125 @@ bgfx::TextureHandle loadTexture(bx::FileReaderI* _reader, const char* _filePath,
|
||||
void* data = loadMem(_reader, allocator, _filePath, &size);
|
||||
if (NULL != data)
|
||||
{
|
||||
int width = 0;
|
||||
int height = 0;
|
||||
int comp = 0;
|
||||
bgfx::TextureFormat::Enum format = bgfx::TextureFormat::RGBA8;
|
||||
uint32_t bpp = 32;
|
||||
|
||||
uint8_t* img = NULL;
|
||||
img = stbi_load_from_memory( (uint8_t*)data, size, &width, &height, &comp, 4);
|
||||
uint32_t width = 0;
|
||||
uint32_t height = 0;
|
||||
|
||||
typedef void (*ReleaseFn)(void* _ptr);
|
||||
ReleaseFn release = stbi_image_free;
|
||||
|
||||
uint8_t* out = NULL;
|
||||
static uint8_t pngMagic[] = { 0x89, 0x50, 0x4E, 0x47, 0x0d, 0x0a };
|
||||
if (0 == memcmp(data, pngMagic, sizeof(pngMagic) ) )
|
||||
{
|
||||
release = lodepng_free;
|
||||
|
||||
unsigned error;
|
||||
LodePNGState state;
|
||||
lodepng_state_init(&state);
|
||||
state.decoder.color_convert = 0;
|
||||
error = lodepng_decode(&out, &width, &height, &state, (uint8_t*)data, size);
|
||||
|
||||
if (0 == error)
|
||||
{
|
||||
switch (state.info_raw.bitdepth)
|
||||
{
|
||||
case 8:
|
||||
switch (state.info_raw.colortype)
|
||||
{
|
||||
case LCT_GREY:
|
||||
format = bgfx::TextureFormat::R8;
|
||||
bpp = 8;
|
||||
break;
|
||||
|
||||
case LCT_GREY_ALPHA:
|
||||
format = bgfx::TextureFormat::RG8;
|
||||
bpp = 16;
|
||||
break;
|
||||
|
||||
case LCT_RGB:
|
||||
format = bgfx::TextureFormat::RGB8;
|
||||
bpp = 24;
|
||||
break;
|
||||
|
||||
case LCT_RGBA:
|
||||
format = bgfx::TextureFormat::RGBA8;
|
||||
bpp = 32;
|
||||
break;
|
||||
|
||||
case LCT_PALETTE:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 16:
|
||||
switch (state.info_raw.colortype)
|
||||
{
|
||||
case LCT_GREY:
|
||||
for (uint32_t ii = 0, num = width*height; ii < num; ++ii)
|
||||
{
|
||||
uint16_t* rgba = (uint16_t*)out + ii*4;
|
||||
rgba[0] = bx::toHostEndian(rgba[0], false);
|
||||
}
|
||||
format = bgfx::TextureFormat::R16;
|
||||
bpp = 16;
|
||||
break;
|
||||
|
||||
case LCT_GREY_ALPHA:
|
||||
for (uint32_t ii = 0, num = width*height; ii < num; ++ii)
|
||||
{
|
||||
uint16_t* rgba = (uint16_t*)out + ii*4;
|
||||
rgba[0] = bx::toHostEndian(rgba[0], false);
|
||||
rgba[1] = bx::toHostEndian(rgba[1], false);
|
||||
}
|
||||
format = bgfx::TextureFormat::R16;
|
||||
bpp = 16;
|
||||
break;
|
||||
|
||||
case LCT_RGBA:
|
||||
for (uint32_t ii = 0, num = width*height; ii < num; ++ii)
|
||||
{
|
||||
uint16_t* rgba = (uint16_t*)out + ii*4;
|
||||
rgba[0] = bx::toHostEndian(rgba[0], false);
|
||||
rgba[1] = bx::toHostEndian(rgba[1], false);
|
||||
rgba[2] = bx::toHostEndian(rgba[2], false);
|
||||
rgba[3] = bx::toHostEndian(rgba[3], false);
|
||||
}
|
||||
format = bgfx::TextureFormat::RGBA16;
|
||||
bpp = 64;
|
||||
break;
|
||||
|
||||
case LCT_RGB:
|
||||
case LCT_PALETTE:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
lodepng_state_cleanup(&state);
|
||||
}
|
||||
else
|
||||
{
|
||||
int comp = 0;
|
||||
out = stbi_load_from_memory( (uint8_t*)data, size, (int*)&width, (int*)&height, &comp, 4);
|
||||
}
|
||||
|
||||
BX_FREE(allocator, data);
|
||||
|
||||
if (NULL != img)
|
||||
if (NULL != out)
|
||||
{
|
||||
handle = bgfx::createTexture2D(uint16_t(width), uint16_t(height), 1
|
||||
, bgfx::TextureFormat::RGBA8
|
||||
, format
|
||||
, _flags
|
||||
, bgfx::copy(img, width*height*4)
|
||||
, bgfx::copy(out, width*height*bpp/8)
|
||||
);
|
||||
|
||||
free(img);
|
||||
release(out);
|
||||
|
||||
if (NULL != _info)
|
||||
{
|
||||
@ -207,7 +319,7 @@ bgfx::TextureHandle loadTexture(bx::FileReaderI* _reader, const char* _filePath,
|
||||
, 0
|
||||
, false
|
||||
, 1
|
||||
, bgfx::TextureFormat::RGBA8
|
||||
, format
|
||||
);
|
||||
}
|
||||
}
|
||||
|
21
3rdparty/bgfx/examples/common/bounds.cpp
vendored
21
3rdparty/bgfx/examples/common/bounds.cpp
vendored
@ -279,26 +279,7 @@ void calcMinBoundingSphere(Sphere& _sphere, const void* _vertices, uint32_t _num
|
||||
|
||||
void calcPlaneUv(const Plane& _plane, float* _udir, float* _vdir)
|
||||
{
|
||||
const float nx = _plane.m_normal[0];
|
||||
const float ny = _plane.m_normal[1];
|
||||
const float nz = _plane.m_normal[2];
|
||||
|
||||
if (bx::fabsolute(nx) > bx::fabsolute(nz) )
|
||||
{
|
||||
float invLen = 1.0f / bx::fsqrt(nx*nx + nz*nz);
|
||||
_udir[0] = -nz * invLen;
|
||||
_udir[1] = 0.0f;
|
||||
_udir[2] = nx * invLen;
|
||||
}
|
||||
else
|
||||
{
|
||||
float invLen = 1.0f / bx::fsqrt(ny*ny + nz*nz);
|
||||
_udir[0] = 0.0f;
|
||||
_udir[1] = nz * invLen;
|
||||
_udir[2] = -ny * invLen;
|
||||
}
|
||||
|
||||
bx::vec3Cross(_vdir, _plane.m_normal, _udir);
|
||||
bx::vec3TangentFrame(_plane.m_normal, _udir, _vdir);
|
||||
}
|
||||
|
||||
void buildFrustumPlanes(Plane* _result, const float* _viewProj)
|
||||
|
5052
3rdparty/bgfx/examples/common/imgui/icons_font_awesome.ttf.h
vendored
Normal file
5052
3rdparty/bgfx/examples/common/imgui/icons_font_awesome.ttf.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
2890
3rdparty/bgfx/examples/common/imgui/icons_kenney.ttf.h
vendored
Normal file
2890
3rdparty/bgfx/examples/common/imgui/icons_kenney.ttf.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
30
3rdparty/bgfx/examples/common/imgui/imgui.cpp
vendored
30
3rdparty/bgfx/examples/common/imgui/imgui.cpp
vendored
@ -48,7 +48,7 @@
|
||||
#include "fs_imgui_image_swizz.bin.h"
|
||||
|
||||
// embedded font
|
||||
#include "droidsans.ttf.h"
|
||||
#include "roboto_regular.ttf.h"
|
||||
|
||||
BX_PRAGMA_DIAGNOSTIC_IGNORED_MSVC(4244); // warning C4244: '=' : conversion from '' to '', possible loss of data
|
||||
|
||||
@ -451,7 +451,7 @@ struct Imgui
|
||||
return bgfx::createTexture2D(uint16_t(_width), uint16_t(_height), 0, bgfx::TextureFormat::BGRA8, 0, mem);
|
||||
}
|
||||
|
||||
ImguiFontHandle create(const void* _data, uint32_t _size, float _fontSize, bx::AllocatorI* _allocator)
|
||||
ImguiFontHandle create(float _fontSize, bx::AllocatorI* _allocator)
|
||||
{
|
||||
m_allocator = _allocator;
|
||||
|
||||
@ -463,16 +463,10 @@ struct Imgui
|
||||
}
|
||||
#endif // BX_CONFIG_ALLOCATOR_CRT
|
||||
|
||||
if (NULL == _data)
|
||||
{
|
||||
_data = s_droidSansTtf;
|
||||
_size = sizeof(s_droidSansTtf);
|
||||
}
|
||||
|
||||
IMGUI_create(_data, _size, _fontSize, m_allocator);
|
||||
IMGUI_create(_fontSize, m_allocator);
|
||||
|
||||
m_nvg = nvgCreate(1, m_view, m_allocator);
|
||||
nvgCreateFontMem(m_nvg, "default", (unsigned char*)_data, INT32_MAX, 0);
|
||||
nvgCreateFontMem(m_nvg, "default", (unsigned char*)s_robotoRegularTtf, INT32_MAX, 0);
|
||||
nvgFontSize(m_nvg, _fontSize);
|
||||
nvgFontFace(m_nvg, "default");
|
||||
|
||||
@ -606,7 +600,7 @@ struct Imgui
|
||||
m_missingTexture = genMissingTexture(256, 256, 0.04f);
|
||||
|
||||
#if !USE_NANOVG_FONT
|
||||
const ImguiFontHandle handle = createFont(_data, _fontSize);
|
||||
const ImguiFontHandle handle = createFont(s_robotoRegularTtf, _fontSize);
|
||||
m_currentFontIdx = handle.idx;
|
||||
#else
|
||||
const ImguiFontHandle handle = { bgfx::invalidHandle };
|
||||
@ -879,7 +873,10 @@ struct Imgui
|
||||
bgfx::setViewRect(_view, 0, 0, _width, _height);
|
||||
}
|
||||
|
||||
updateInput(mx, my, _button, _scroll, _inputChar);
|
||||
if (!ImGui::IsMouseHoveringAnyWindow() )
|
||||
{
|
||||
updateInput(mx, my, _button, _scroll, _inputChar);
|
||||
}
|
||||
|
||||
m_hot = m_hotToBe;
|
||||
m_hotToBe = 0;
|
||||
@ -3262,9 +3259,9 @@ void imguiFree(void* _ptr, void*)
|
||||
BX_FREE(s_imgui.m_allocator, _ptr);
|
||||
}
|
||||
|
||||
ImguiFontHandle imguiCreate(const void* _data, uint32_t _size, float _fontSize, bx::AllocatorI* _allocator)
|
||||
ImguiFontHandle imguiCreate(const void*, uint32_t, float _fontSize, bx::AllocatorI* _allocator)
|
||||
{
|
||||
return s_imgui.create(_data, _size, _fontSize, _allocator);
|
||||
return s_imgui.create(_fontSize, _allocator);
|
||||
}
|
||||
|
||||
void imguiDestroy()
|
||||
@ -3573,7 +3570,10 @@ float imguiGetTextLength(const char* _text, ImguiFontHandle _handle)
|
||||
|
||||
bool imguiMouseOverArea()
|
||||
{
|
||||
return s_imgui.m_insideArea;
|
||||
return s_imgui.m_insideArea
|
||||
|| ImGui::IsAnyItemHovered()
|
||||
|| ImGui::IsMouseHoveringAnyWindow()
|
||||
;
|
||||
}
|
||||
|
||||
bgfx::ProgramHandle imguiGetImageProgram(uint8_t _mip)
|
||||
|
6
3rdparty/bgfx/examples/common/imgui/imgui.h
vendored
6
3rdparty/bgfx/examples/common/imgui/imgui.h
vendored
@ -29,6 +29,8 @@
|
||||
#include <bgfx/bgfx.h>
|
||||
#include <ocornut-imgui/imgui.h>
|
||||
#include <ocornut-imgui/imgui_wm.h>
|
||||
#include <iconfontheaders/icons_kenney.h>
|
||||
#include <iconfontheaders/icons_font_awesome.h>
|
||||
|
||||
#define IMGUI_MBUT_LEFT 0x01
|
||||
#define IMGUI_MBUT_RIGHT 0x02
|
||||
@ -131,13 +133,13 @@ inline uint32_t imguiRGBA(uint8_t _r, uint8_t _g, uint8_t _b, uint8_t _a = 255)
|
||||
|
||||
BGFX_HANDLE(ImguiFontHandle);
|
||||
|
||||
ImguiFontHandle imguiCreateFont(const void* _data, float _fontSize=15.0f);
|
||||
ImguiFontHandle imguiCreateFont(const void* _data, float _fontSize = 18.0f);
|
||||
void imguiSetFont(ImguiFontHandle _handle);
|
||||
ImguiFontHandle imguiGetCurrentFont();
|
||||
|
||||
namespace bx { struct AllocatorI; }
|
||||
|
||||
ImguiFontHandle imguiCreate(const void* _data = NULL, uint32_t _size = 0, float _fontSize = 15.0f, bx::AllocatorI* _allocator = NULL);
|
||||
ImguiFontHandle imguiCreate(const void* _data = NULL, uint32_t _size = 0, float _fontSize = 18.0f, bx::AllocatorI* _allocator = NULL);
|
||||
void imguiDestroy();
|
||||
|
||||
void imguiBeginFrame(int32_t _mx, int32_t _my, uint8_t _button, int32_t _scroll, uint16_t _width, uint16_t _height, char _inputChar = 0, uint8_t _view = 255);
|
||||
|
20
3rdparty/bgfx/examples/common/imgui/makefile
vendored
20
3rdparty/bgfx/examples/common/imgui/makefile
vendored
@ -8,5 +8,23 @@ include ../../../scripts/shader-embeded.mk
|
||||
droidsans.ttf.h: ../../runtime/font/droidsans.ttf
|
||||
@bin2c -f $(<) -o $(@) -n s_droidSansTtf
|
||||
|
||||
rebuild: droidsans.ttf.h
|
||||
roboto_regular.ttf.h: ../../runtime/font/roboto-regular.ttf
|
||||
@bin2c -f $(<) -o $(@) -n s_robotoRegularTtf
|
||||
|
||||
robotomono_regular.ttf.h: ../../runtime/font/robotomono-regular.ttf
|
||||
@bin2c -f $(<) -o $(@) -n s_robotoMonoRegularTtf
|
||||
|
||||
icons_font_awesome.ttf.h: ../../runtime/font/fontawesome-webfont.ttf
|
||||
@bin2c -f $(<) -o $(@) -n s_iconsFontAwesomeTtf
|
||||
|
||||
icons_kenney.ttf.h: ../../runtime/font/kenney-icon-font.ttf
|
||||
@bin2c -f $(<) -o $(@) -n s_iconsKenneyTtf
|
||||
|
||||
fonts: droidsans.ttf.h \
|
||||
roboto_regular.ttf.h \
|
||||
robotomono_regular.ttf.h \
|
||||
icons_font_awesome.ttf.h \
|
||||
icons_kenney.ttf.h
|
||||
|
||||
rebuild: fonts
|
||||
@make -s --no-print-directory clean all
|
||||
|
@ -11,7 +11,6 @@
|
||||
#include <ocornut-imgui/imgui_wm.h>
|
||||
#include "imgui.h"
|
||||
#include "ocornut_imgui.h"
|
||||
#include <stb/stb_image.c>
|
||||
|
||||
#ifndef USE_ENTRY
|
||||
# if defined(SCI_NAMESPACE)
|
||||
@ -33,6 +32,24 @@
|
||||
#include "vs_ocornut_imgui.bin.h"
|
||||
#include "fs_ocornut_imgui.bin.h"
|
||||
|
||||
#include "roboto_regular.ttf.h"
|
||||
#include "robotomono_regular.ttf.h"
|
||||
#include "icons_kenney.ttf.h"
|
||||
#include "icons_font_awesome.ttf.h"
|
||||
|
||||
struct FontRangeMerge
|
||||
{
|
||||
const void* data;
|
||||
size_t size;
|
||||
ImWchar ranges[3];
|
||||
};
|
||||
|
||||
static FontRangeMerge s_fontRangeMerge[] =
|
||||
{
|
||||
{ s_iconsKenneyTtf, sizeof(s_iconsKenneyTtf), { ICON_MIN_KI, ICON_MAX_KI, 0 } },
|
||||
{ s_iconsFontAwesomeTtf, sizeof(s_iconsFontAwesomeTtf), { ICON_MIN_FA, ICON_MAX_FA, 0 } },
|
||||
};
|
||||
|
||||
class PlatformWindow : public ImGuiWM::PlatformWindow
|
||||
{
|
||||
typedef ImGuiWM::PlatformWindow Super;
|
||||
@ -345,7 +362,7 @@ struct OcornutImguiContext
|
||||
}
|
||||
}
|
||||
|
||||
void create(const void* _data, uint32_t _size, float _fontSize, bx::AllocatorI* _allocator)
|
||||
void create(float _fontSize, bx::AllocatorI* _allocator)
|
||||
{
|
||||
m_viewId = 255;
|
||||
m_allocator = _allocator;
|
||||
@ -430,9 +447,28 @@ struct OcornutImguiContext
|
||||
int32_t width;
|
||||
int32_t height;
|
||||
{
|
||||
void* font = ImGui::MemAlloc(_size);
|
||||
memcpy(font, _data, _size);
|
||||
io.Fonts->AddFontFromMemoryTTF(font, _size, _fontSize);
|
||||
ImFontConfig config;
|
||||
config.FontDataOwnedByAtlas = false;
|
||||
config.MergeMode = false;
|
||||
// config.MergeGlyphCenterV = true;
|
||||
|
||||
m_font[ImGui::Font::Regular] = io.Fonts->AddFontFromMemoryTTF( (void*)s_robotoRegularTtf, sizeof(s_robotoRegularTtf), _fontSize, &config);
|
||||
m_font[ImGui::Font::Mono ] = io.Fonts->AddFontFromMemoryTTF( (void*)s_robotoMonoRegularTtf, sizeof(s_robotoMonoRegularTtf), _fontSize-3.0f, &config);
|
||||
|
||||
config.MergeMode = true;
|
||||
config.DstFont = m_font[ImGui::Font::Regular];
|
||||
|
||||
for (uint32_t ii = 0; ii < BX_COUNTOF(s_fontRangeMerge); ++ii)
|
||||
{
|
||||
const FontRangeMerge& frm = s_fontRangeMerge[ii];
|
||||
|
||||
io.Fonts->AddFontFromMemoryTTF( (void*)frm.data
|
||||
, (int)frm.size
|
||||
, _fontSize-3.0f
|
||||
, &config
|
||||
, frm.ranges
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
io.Fonts->GetTexDataAsRGBA32(&data, &width, &height);
|
||||
@ -445,9 +481,6 @@ struct OcornutImguiContext
|
||||
, bgfx::copy(data, width*height*4)
|
||||
);
|
||||
|
||||
ImGuiStyle& style = ImGui::GetStyle();
|
||||
style.FrameRounding = 4.0f;
|
||||
|
||||
m_wm = BX_NEW(m_allocator, WindowManager);
|
||||
m_wm->Init();
|
||||
|
||||
@ -517,6 +550,8 @@ struct OcornutImguiContext
|
||||
// https://gist.github.com/dougbinks/8089b4bbaccaaf6fa204236978d165a9
|
||||
ImGuiStyle& style = ImGui::GetStyle();
|
||||
|
||||
style.FrameRounding = 4.0f;
|
||||
|
||||
// light style from Pacome Danhiez (user itamago)
|
||||
// https://github.com/ocornut/imgui/pull/511#issuecomment-175719267
|
||||
style.Colors[ImGuiCol_Text] = ImVec4(0.00f, 0.00f, 0.00f, 1.00f);
|
||||
@ -624,9 +659,24 @@ struct OcornutImguiContext
|
||||
#endif // 0
|
||||
|
||||
#if 0
|
||||
extern void ShowExampleAppCustomNodeGraph(bool* opened);
|
||||
bool opened = true;
|
||||
ShowExampleAppCustomNodeGraph(&opened);
|
||||
{
|
||||
static ImGui::MemoryEditor me;
|
||||
bool open = true;
|
||||
if (ImGui::Begin("HexII", &open))
|
||||
{
|
||||
me.Draw(s_iconsKenneyTtf, sizeof(s_iconsKenneyTtf) );
|
||||
|
||||
ImGui::End();
|
||||
}
|
||||
}
|
||||
#endif // 0
|
||||
|
||||
#if 0
|
||||
{
|
||||
extern void ShowExampleAppCustomNodeGraph(bool* opened);
|
||||
bool opened = true;
|
||||
ShowExampleAppCustomNodeGraph(&opened);
|
||||
}
|
||||
#endif // 0
|
||||
}
|
||||
|
||||
@ -642,6 +692,7 @@ struct OcornutImguiContext
|
||||
bgfx::ProgramHandle m_program;
|
||||
bgfx::TextureHandle m_texture;
|
||||
bgfx::UniformHandle s_tex;
|
||||
ImFont* m_font[ImGui::Font::Count];
|
||||
WindowManager* m_wm;
|
||||
int64_t m_last;
|
||||
int32_t m_lastScroll;
|
||||
@ -765,9 +816,9 @@ void OcornutImguiContext::renderDrawLists(ImDrawData* _drawData)
|
||||
s_ctx.render(_drawData);
|
||||
}
|
||||
|
||||
void IMGUI_create(const void* _data, uint32_t _size, float _fontSize, bx::AllocatorI* _allocator)
|
||||
void IMGUI_create(float _fontSize, bx::AllocatorI* _allocator)
|
||||
{
|
||||
s_ctx.create(_data, _size, _fontSize, _allocator);
|
||||
s_ctx.create(_fontSize, _allocator);
|
||||
}
|
||||
|
||||
void IMGUI_destroy()
|
||||
@ -784,3 +835,11 @@ void IMGUI_endFrame()
|
||||
{
|
||||
s_ctx.endFrame();
|
||||
}
|
||||
|
||||
namespace ImGui
|
||||
{
|
||||
void PushFont(Font::Enum _font)
|
||||
{
|
||||
PushFont(s_ctx.m_font[_font]);
|
||||
}
|
||||
} // namespace ImGui
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
namespace bx { struct AllocatorI; }
|
||||
|
||||
void IMGUI_create(const void* _data, uint32_t _size, float _fontSize, bx::AllocatorI* _allocator);
|
||||
void IMGUI_create(float _fontSize, bx::AllocatorI* _allocator);
|
||||
void IMGUI_destroy();
|
||||
void IMGUI_beginFrame(int32_t _mx, int32_t _my, uint8_t _button, int32_t _scroll, int _width, int _height, char _inputChar, uint8_t _viewId);
|
||||
void IMGUI_endFrame();
|
||||
|
9088
3rdparty/bgfx/examples/common/imgui/roboto_regular.ttf.h
vendored
Normal file
9088
3rdparty/bgfx/examples/common/imgui/roboto_regular.ttf.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
7097
3rdparty/bgfx/examples/common/imgui/robotomono_regular.ttf.h
vendored
Normal file
7097
3rdparty/bgfx/examples/common/imgui/robotomono_regular.ttf.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
29
3rdparty/bgfx/examples/common/nanovg/nanovg.cpp
vendored
29
3rdparty/bgfx/examples/common/nanovg/nanovg.cpp
vendored
@ -34,10 +34,39 @@ BX_PRAGMA_DIAGNOSTIC_IGNORED_GCC("-Wunused-result");
|
||||
#include "fontstash.h"
|
||||
BX_PRAGMA_DIAGNOSTIC_POP();
|
||||
|
||||
BX_PRAGMA_DIAGNOSTIC_PUSH();
|
||||
BX_PRAGMA_DIAGNOSTIC_IGNORED_MSVC(4127) // warning C4127: conditional expression is constant
|
||||
#define LODEPNG_NO_COMPILE_ENCODER
|
||||
#define LODEPNG_NO_COMPILE_DISK
|
||||
#define LODEPNG_NO_COMPILE_ANCILLARY_CHUNKS
|
||||
#define LODEPNG_NO_COMPILE_ERROR_TEXT
|
||||
#define LODEPNG_NO_COMPILE_ALLOCATORS
|
||||
#define LODEPNG_NO_COMPILE_CPP
|
||||
#include <lodepng/lodepng.cpp>
|
||||
BX_PRAGMA_DIAGNOSTIC_POP();
|
||||
|
||||
void* lodepng_malloc(size_t _size)
|
||||
{
|
||||
return ::malloc(_size);
|
||||
}
|
||||
|
||||
void* lodepng_realloc(void* _ptr, size_t _size)
|
||||
{
|
||||
return ::realloc(_ptr, _size);
|
||||
}
|
||||
|
||||
void lodepng_free(void* _ptr)
|
||||
{
|
||||
::free(_ptr);
|
||||
}
|
||||
|
||||
BX_PRAGMA_DIAGNOSTIC_PUSH();
|
||||
BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG_GCC("-Wmissing-field-initializers");
|
||||
BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG_GCC("-Wshadow");
|
||||
BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG_GCC("-Wint-to-pointer-cast")
|
||||
#define STBI_MALLOC(_size) lodepng_malloc(_size)
|
||||
#define STBI_REALLOC(_ptr, _size) lodepng_realloc(_ptr, _size)
|
||||
#define STBI_FREE(_ptr) lodepng_free(_ptr)
|
||||
#define STB_IMAGE_IMPLEMENTATION
|
||||
#include <stb/stb_image.c>
|
||||
BX_PRAGMA_DIAGNOSTIC_POP();
|
||||
|
BIN
3rdparty/bgfx/examples/runtime/font/droidsansmono.ttf
vendored
Normal file
BIN
3rdparty/bgfx/examples/runtime/font/droidsansmono.ttf
vendored
Normal file
Binary file not shown.
BIN
3rdparty/bgfx/examples/runtime/font/robotomono-regular.ttf
vendored
Normal file
BIN
3rdparty/bgfx/examples/runtime/font/robotomono-regular.ttf
vendored
Normal file
Binary file not shown.
20
3rdparty/bgfx/include/bgfx/bgfx.h
vendored
20
3rdparty/bgfx/include/bgfx/bgfx.h
vendored
@ -938,13 +938,15 @@ namespace bgfx
|
||||
/// just swaps internal buffers, kicks render thread, and returns. In
|
||||
/// singlethreaded renderer this call does frame rendering.
|
||||
///
|
||||
/// @param[in] _capture Capture frame with graphics debugger.
|
||||
///
|
||||
/// @returns Current frame number. This might be used in conjunction with
|
||||
/// double/multi buffering data outside the library and passing it to
|
||||
/// library via `bgfx::makeRef` calls.
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_frame`.
|
||||
///
|
||||
uint32_t frame();
|
||||
uint32_t frame(bool _capture = false);
|
||||
|
||||
/// Returns current renderer backend API type.
|
||||
///
|
||||
@ -1671,11 +1673,13 @@ namespace bgfx
|
||||
/// @param[in] _handle Texture handle.
|
||||
/// @param[in] _data Destination buffer.
|
||||
///
|
||||
/// @returns Frame number when the result will be available. See: `bgfx::frame`.
|
||||
///
|
||||
/// @attention Texture must be created with `BGFX_TEXTURE_READ_BACK` flag.
|
||||
/// @attention Availability depends on: `BGFX_CAPS_TEXTURE_READ_BACK`.
|
||||
/// @attention C99 equivalent is `bgfx_read_texture`.
|
||||
///
|
||||
void readTexture(TextureHandle _handle, void* _data);
|
||||
uint32_t readTexture(TextureHandle _handle, void* _data);
|
||||
|
||||
/// Read back texture content.
|
||||
///
|
||||
@ -1683,11 +1687,13 @@ namespace bgfx
|
||||
/// @param[in] _attachment Frame buffer attachment index.
|
||||
/// @param[in] _data Destination buffer.
|
||||
///
|
||||
/// @returns Frame number when the result will be available. See: `bgfx::frame`.
|
||||
///
|
||||
/// @attention Texture must be created with `BGFX_TEXTURE_READ_BACK` flag.
|
||||
/// @attention Availability depends on: `BGFX_CAPS_TEXTURE_READ_BACK`.
|
||||
/// @attention C99 equivalent is `bgfx_read_frame_buffer`.
|
||||
///
|
||||
void readTexture(FrameBufferHandle _handle, uint8_t _attachment, void* _data);
|
||||
uint32_t readTexture(FrameBufferHandle _handle, uint8_t _attachment, void* _data);
|
||||
|
||||
/// Destroy texture.
|
||||
///
|
||||
@ -1709,6 +1715,8 @@ namespace bgfx
|
||||
/// - `BGFX_TEXTURE_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
|
||||
/// sampling.
|
||||
///
|
||||
/// @returns Handle to frame buffer object.
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_create_frame_buffer`.
|
||||
///
|
||||
FrameBufferHandle createFrameBuffer(
|
||||
@ -1731,6 +1739,8 @@ namespace bgfx
|
||||
/// - `BGFX_TEXTURE_[MIN/MAG/MIP]_[POINT/ANISOTROPIC]` - Point or anisotropic
|
||||
/// sampling.
|
||||
///
|
||||
/// @returns Handle to frame buffer object.
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_create_frame_buffer_scaled`.
|
||||
///
|
||||
FrameBufferHandle createFrameBuffer(
|
||||
@ -1746,6 +1756,8 @@ namespace bgfx
|
||||
/// @param[in] _destroyTextures If true, textures will be destroyed when
|
||||
/// frame buffer is destroyed.
|
||||
///
|
||||
/// @returns Handle to frame buffer object.
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_create_frame_buffer_from_handles`.
|
||||
///
|
||||
FrameBufferHandle createFrameBuffer(
|
||||
@ -1761,6 +1773,8 @@ namespace bgfx
|
||||
/// @param[in] _destroyTextures If true, textures will be destroyed when
|
||||
/// frame buffer is destroyed.
|
||||
///
|
||||
/// @returns Handle to frame buffer object.
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_create_frame_buffer_from_handles`.
|
||||
///
|
||||
FrameBufferHandle createFrameBuffer(
|
||||
|
2
3rdparty/bgfx/include/bgfx/bgfxdefines.h
vendored
2
3rdparty/bgfx/include/bgfx/bgfxdefines.h
vendored
@ -6,7 +6,7 @@
|
||||
#ifndef BGFX_DEFINES_H_HEADER_GUARD
|
||||
#define BGFX_DEFINES_H_HEADER_GUARD
|
||||
|
||||
#define BGFX_API_VERSION UINT32_C(14)
|
||||
#define BGFX_API_VERSION UINT32_C(16)
|
||||
|
||||
///
|
||||
#define BGFX_STATE_RGB_WRITE UINT64_C(0x0000000000000001) //!< Enable RGB write.
|
||||
|
8
3rdparty/bgfx/include/bgfx/c99/bgfx.h
vendored
8
3rdparty/bgfx/include/bgfx/c99/bgfx.h
vendored
@ -238,11 +238,11 @@ typedef enum bgfx_topology_convert
|
||||
#define BGFX_HANDLE_T(_name) \
|
||||
typedef struct _name { uint16_t idx; } _name##_t
|
||||
|
||||
BGFX_HANDLE_T(bgfx_indirect_buffer_handle);
|
||||
BGFX_HANDLE_T(bgfx_dynamic_index_buffer_handle);
|
||||
BGFX_HANDLE_T(bgfx_dynamic_vertex_buffer_handle);
|
||||
BGFX_HANDLE_T(bgfx_frame_buffer_handle);
|
||||
BGFX_HANDLE_T(bgfx_index_buffer_handle);
|
||||
BGFX_HANDLE_T(bgfx_indirect_buffer_handle);
|
||||
BGFX_HANDLE_T(bgfx_occlusion_query_handle);
|
||||
BGFX_HANDLE_T(bgfx_program_handle);
|
||||
BGFX_HANDLE_T(bgfx_shader_handle);
|
||||
@ -505,7 +505,7 @@ BGFX_C_API void bgfx_shutdown();
|
||||
BGFX_C_API void bgfx_reset(uint32_t _width, uint32_t _height, uint32_t _flags);
|
||||
|
||||
/**/
|
||||
BGFX_C_API uint32_t bgfx_frame();
|
||||
BGFX_C_API uint32_t bgfx_frame(bool _capture);
|
||||
|
||||
/**/
|
||||
BGFX_C_API bgfx_renderer_type_t bgfx_get_renderer_type();
|
||||
@ -655,10 +655,10 @@ BGFX_C_API void bgfx_update_texture_3d(bgfx_texture_handle_t _handle, uint8_t _m
|
||||
BGFX_C_API void bgfx_update_texture_cube(bgfx_texture_handle_t _handle, uint8_t _side, uint8_t _mip, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height, const bgfx_memory_t* _mem, uint16_t _pitch);
|
||||
|
||||
/**/
|
||||
BGFX_C_API void bgfx_read_texture(bgfx_texture_handle_t _handle, void* _data);
|
||||
BGFX_C_API uint32_t bgfx_read_texture(bgfx_texture_handle_t _handle, void* _data);
|
||||
|
||||
/**/
|
||||
BGFX_C_API void bgfx_read_frame_buffer(bgfx_frame_buffer_handle_t _handle, uint8_t _attachment, void* _data);
|
||||
BGFX_C_API uint32_t bgfx_read_frame_buffer(bgfx_frame_buffer_handle_t _handle, uint8_t _attachment, void* _data);
|
||||
|
||||
/**/
|
||||
BGFX_C_API void bgfx_destroy_texture(bgfx_texture_handle_t _handle);
|
||||
|
@ -85,7 +85,7 @@ typedef struct bgfx_interface_vtbl
|
||||
bool (*init)(bgfx_renderer_type_t _type, uint16_t _vendorId, uint16_t _deviceId, bgfx_callback_interface_t* _callback, bgfx_allocator_interface_t* _allocator);
|
||||
void (*shutdown)();
|
||||
void (*reset)(uint32_t _width, uint32_t _height, uint32_t _flags);
|
||||
uint32_t (*frame)();
|
||||
uint32_t (*frame)(bool _capture);
|
||||
bgfx_renderer_type_t (*get_renderer_type)();
|
||||
const bgfx_caps_t* (*get_caps)();
|
||||
const bgfx_hmd_t* (*get_hmd)();
|
||||
|
28
3rdparty/bgfx/src/bgfx.cpp
vendored
28
3rdparty/bgfx/src/bgfx.cpp
vendored
@ -1471,7 +1471,7 @@ namespace bgfx
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t Context::frame()
|
||||
uint32_t Context::frame(bool _capture)
|
||||
{
|
||||
BX_CHECK(0 == m_instBufferCount, "Instance buffer allocated, but not used. This is incorrect, and causes memory leak.");
|
||||
|
||||
@ -1480,6 +1480,8 @@ namespace bgfx
|
||||
m_occlusionQuerySet.clear();
|
||||
}
|
||||
|
||||
m_submit->m_capture = _capture;
|
||||
|
||||
BGFX_PROFILER_SCOPE(bgfx, main_thread_frame, 0xff2040ff);
|
||||
// wait for render thread to finish
|
||||
renderSemWait();
|
||||
@ -2510,10 +2512,10 @@ namespace bgfx
|
||||
s_ctx->reset(_width, _height, _flags);
|
||||
}
|
||||
|
||||
uint32_t frame()
|
||||
uint32_t frame(bool _capture)
|
||||
{
|
||||
BGFX_CHECK_MAIN_THREAD();
|
||||
return s_ctx->frame();
|
||||
return s_ctx->frame(_capture);
|
||||
}
|
||||
|
||||
const Caps* getCaps()
|
||||
@ -3114,20 +3116,20 @@ namespace bgfx
|
||||
}
|
||||
}
|
||||
|
||||
void readTexture(TextureHandle _handle, void* _data)
|
||||
uint32_t readTexture(TextureHandle _handle, void* _data)
|
||||
{
|
||||
BGFX_CHECK_MAIN_THREAD();
|
||||
BX_CHECK(NULL != _data, "_data can't be NULL");
|
||||
BGFX_CHECK_CAPS(BGFX_CAPS_TEXTURE_READ_BACK, "Texture read-back is not supported!");
|
||||
s_ctx->readTexture(_handle, _data);
|
||||
return s_ctx->readTexture(_handle, _data);
|
||||
}
|
||||
|
||||
void readTexture(FrameBufferHandle _handle, uint8_t _attachment, void* _data)
|
||||
uint32_t readTexture(FrameBufferHandle _handle, uint8_t _attachment, void* _data)
|
||||
{
|
||||
BGFX_CHECK_MAIN_THREAD();
|
||||
BX_CHECK(NULL != _data, "_data can't be NULL");
|
||||
BGFX_CHECK_CAPS(BGFX_CAPS_TEXTURE_READ_BACK, "Texture read-back is not supported!");
|
||||
s_ctx->readTexture(_handle, _attachment, _data);
|
||||
return s_ctx->readTexture(_handle, _attachment, _data);
|
||||
}
|
||||
|
||||
FrameBufferHandle createFrameBuffer(uint16_t _width, uint16_t _height, TextureFormat::Enum _format, uint32_t _textureFlags)
|
||||
@ -3859,9 +3861,9 @@ BGFX_C_API void bgfx_reset(uint32_t _width, uint32_t _height, uint32_t _flags)
|
||||
bgfx::reset(_width, _height, _flags);
|
||||
}
|
||||
|
||||
BGFX_C_API uint32_t bgfx_frame()
|
||||
BGFX_C_API uint32_t bgfx_frame(bool _capture)
|
||||
{
|
||||
return bgfx::frame();
|
||||
return bgfx::frame(_capture);
|
||||
}
|
||||
|
||||
BGFX_C_API bgfx_renderer_type_t bgfx_get_renderer_type()
|
||||
@ -4167,16 +4169,16 @@ BGFX_C_API void bgfx_update_texture_cube(bgfx_texture_handle_t _handle, uint8_t
|
||||
bgfx::updateTextureCube(handle.cpp, _side, _mip, _x, _y, _width, _height, (const bgfx::Memory*)_mem, _pitch);
|
||||
}
|
||||
|
||||
BGFX_C_API void bgfx_read_texture(bgfx_texture_handle_t _handle, void* _data)
|
||||
BGFX_C_API uint32_t bgfx_read_texture(bgfx_texture_handle_t _handle, void* _data)
|
||||
{
|
||||
union { bgfx_texture_handle_t c; bgfx::TextureHandle cpp; } handle = { _handle };
|
||||
bgfx::readTexture(handle.cpp, _data);
|
||||
return bgfx::readTexture(handle.cpp, _data);
|
||||
}
|
||||
|
||||
BGFX_C_API void bgfx_read_frame_buffer(bgfx_frame_buffer_handle_t _handle, uint8_t _attachment, void* _data)
|
||||
BGFX_C_API uint32_t bgfx_read_frame_buffer(bgfx_frame_buffer_handle_t _handle, uint8_t _attachment, void* _data)
|
||||
{
|
||||
union { bgfx_frame_buffer_handle_t c; bgfx::FrameBufferHandle cpp; } handle = { _handle };
|
||||
bgfx::readTexture(handle.cpp, _attachment, _data);
|
||||
return bgfx::readTexture(handle.cpp, _attachment, _data);
|
||||
}
|
||||
|
||||
BGFX_C_API void bgfx_destroy_texture(bgfx_texture_handle_t _handle)
|
||||
|
13
3rdparty/bgfx/src/bgfx_p.h
vendored
13
3rdparty/bgfx/src/bgfx_p.h
vendored
@ -1375,6 +1375,8 @@ namespace bgfx
|
||||
, m_waitSubmit(0)
|
||||
, m_waitRender(0)
|
||||
, m_hmdInitialized(false)
|
||||
, m_capture(false)
|
||||
, m_discard(false)
|
||||
{
|
||||
SortKey term;
|
||||
term.reset();
|
||||
@ -1428,6 +1430,7 @@ namespace bgfx
|
||||
m_cmdPre.start();
|
||||
m_cmdPost.start();
|
||||
m_uniformBuffer->reset();
|
||||
m_capture = false;
|
||||
m_discard = false;
|
||||
}
|
||||
|
||||
@ -1836,6 +1839,7 @@ namespace bgfx
|
||||
int64_t m_waitRender;
|
||||
|
||||
bool m_hmdInitialized;
|
||||
bool m_capture;
|
||||
bool m_discard;
|
||||
};
|
||||
|
||||
@ -3125,20 +3129,21 @@ namespace bgfx
|
||||
textureDecRef(_handle);
|
||||
}
|
||||
|
||||
BGFX_API_FUNC(void readTexture(TextureHandle _handle, void* _data) )
|
||||
BGFX_API_FUNC(uint32_t readTexture(TextureHandle _handle, void* _data) )
|
||||
{
|
||||
CommandBuffer& cmdbuf = getCommandBuffer(CommandBuffer::ReadTexture);
|
||||
cmdbuf.write(_handle);
|
||||
cmdbuf.write(_data);
|
||||
return m_frames + 2;
|
||||
}
|
||||
|
||||
BGFX_API_FUNC(void readTexture(FrameBufferHandle _handle, uint8_t _attachment, void* _data) )
|
||||
BGFX_API_FUNC(uint32_t readTexture(FrameBufferHandle _handle, uint8_t _attachment, void* _data) )
|
||||
{
|
||||
const FrameBufferRef& ref = m_frameBufferRef[_handle.idx];
|
||||
BX_CHECK(!ref.m_window, "Can't sample window frame buffer.");
|
||||
TextureHandle textureHandle = ref.un.m_th[_attachment];
|
||||
BX_CHECK(isValid(textureHandle), "Frame buffer texture %d is invalid.", _attachment);
|
||||
readTexture(textureHandle, _data);
|
||||
return readTexture(textureHandle, _data);
|
||||
}
|
||||
|
||||
void resizeTexture(TextureHandle _handle, uint16_t _width, uint16_t _height)
|
||||
@ -3865,7 +3870,7 @@ namespace bgfx
|
||||
blit(_id, _dst, _dstMip, _dstX, _dstY, _dstZ, textureHandle, _srcMip, _srcX, _srcY, _srcZ, _width, _height, _depth);
|
||||
}
|
||||
|
||||
BGFX_API_FUNC(uint32_t frame() );
|
||||
BGFX_API_FUNC(uint32_t frame(bool _capture = false) );
|
||||
|
||||
void dumpViewStats();
|
||||
void freeDynamicBuffers();
|
||||
|
14
3rdparty/bgfx/src/debug_renderdoc.cpp
vendored
14
3rdparty/bgfx/src/debug_renderdoc.cpp
vendored
@ -56,7 +56,7 @@ namespace bgfx
|
||||
}
|
||||
|
||||
pRENDERDOC_GetAPI RENDERDOC_GetAPI;
|
||||
static RENDERDOC_API_1_0_0* s_renderDoc;
|
||||
static RENDERDOC_API_1_0_1* s_renderDoc;
|
||||
|
||||
void* loadRenderDoc()
|
||||
{
|
||||
@ -105,6 +105,14 @@ namespace bgfx
|
||||
}
|
||||
}
|
||||
|
||||
void renderDocTriggerCapture()
|
||||
{
|
||||
if (NULL != s_renderDoc)
|
||||
{
|
||||
s_renderDoc->TriggerCapture();
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace bgfx
|
||||
|
||||
#else
|
||||
@ -121,6 +129,10 @@ namespace bgfx
|
||||
{
|
||||
}
|
||||
|
||||
void renderDocTriggerCapture()
|
||||
{
|
||||
}
|
||||
|
||||
} // namespace bgfx
|
||||
|
||||
#endif // BGFX_CONFIG_DEBUG_PIX && (BX_PLATFORM_WINDOWS || BX_PLATFORM_LINUX)
|
||||
|
1
3rdparty/bgfx/src/debug_renderdoc.h
vendored
1
3rdparty/bgfx/src/debug_renderdoc.h
vendored
@ -10,6 +10,7 @@ namespace bgfx
|
||||
{
|
||||
void* loadRenderDoc();
|
||||
void unloadRenderDoc(void*);
|
||||
void renderDocTriggerCapture();
|
||||
|
||||
} // namespace bgfx
|
||||
|
||||
|
6
3rdparty/bgfx/src/glcontext_egl.cpp
vendored
6
3rdparty/bgfx/src/glcontext_egl.cpp
vendored
@ -123,7 +123,7 @@ EGL_IMPORT
|
||||
|
||||
~SwapChainGL()
|
||||
{
|
||||
eglMakeCurrent(EGL_NO_DISPLAY, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
|
||||
eglMakeCurrent(m_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
|
||||
eglDestroyContext(m_display, m_context);
|
||||
eglDestroySurface(m_display, m_surface);
|
||||
}
|
||||
@ -324,7 +324,7 @@ EGL_IMPORT
|
||||
{
|
||||
if (NULL != m_display)
|
||||
{
|
||||
eglMakeCurrent(EGL_NO_DISPLAY, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
|
||||
eglMakeCurrent(m_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
|
||||
eglDestroyContext(m_display, m_context);
|
||||
eglDestroySurface(m_display, m_surface);
|
||||
eglTerminate(m_display);
|
||||
@ -344,7 +344,7 @@ EGL_IMPORT
|
||||
if (NULL != m_display)
|
||||
{
|
||||
EGLNativeWindowType nwh = (EGLNativeWindowType )g_platformData.nwh;
|
||||
eglMakeCurrent(EGL_NO_DISPLAY, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
|
||||
eglMakeCurrent(m_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
|
||||
eglDestroySurface(m_display, m_surface);
|
||||
m_surface = eglCreateWindowSurface(m_display, m_config, nwh, NULL);
|
||||
BGFX_FATAL(m_surface != EGL_NO_SURFACE, Fatal::UnableToInitialize, "Failed to create surface.");
|
||||
|
274
3rdparty/bgfx/src/image.cpp
vendored
274
3rdparty/bgfx/src/image.cpp
vendored
@ -10,92 +10,93 @@ namespace bgfx
|
||||
{
|
||||
static const ImageBlockInfo s_imageBlockInfo[] =
|
||||
{
|
||||
// +------------------------------- bits per pixel
|
||||
// | +---------------------------- block width
|
||||
// | | +------------------------- block height
|
||||
// | | | +--------------------- block size
|
||||
// | | | | +------------------ min blocks x
|
||||
// | | | | | +--------------- min blocks y
|
||||
// | | | | | | +----------- depth bits
|
||||
// | | | | | | | +-------- stencil bits
|
||||
// | | | | | | | | +----- encoding type
|
||||
// | | | | | | | | |
|
||||
{ 4, 4, 4, 8, 1, 1, 0, 0, uint8_t(EncodingType::Unorm) }, // BC1
|
||||
{ 8, 4, 4, 16, 1, 1, 0, 0, uint8_t(EncodingType::Unorm) }, // BC2
|
||||
{ 8, 4, 4, 16, 1, 1, 0, 0, uint8_t(EncodingType::Unorm) }, // BC3
|
||||
{ 4, 4, 4, 8, 1, 1, 0, 0, uint8_t(EncodingType::Unorm) }, // BC4
|
||||
{ 8, 4, 4, 16, 1, 1, 0, 0, uint8_t(EncodingType::Unorm) }, // BC5
|
||||
{ 8, 4, 4, 16, 1, 1, 0, 0, uint8_t(EncodingType::Unorm) }, // BC6H
|
||||
{ 8, 4, 4, 16, 1, 1, 0, 0, uint8_t(EncodingType::Unorm) }, // BC7
|
||||
{ 4, 4, 4, 8, 1, 1, 0, 0, uint8_t(EncodingType::Unorm) }, // ETC1
|
||||
{ 4, 4, 4, 8, 1, 1, 0, 0, uint8_t(EncodingType::Unorm) }, // ETC2
|
||||
{ 8, 4, 4, 16, 1, 1, 0, 0, uint8_t(EncodingType::Unorm) }, // ETC2A
|
||||
{ 4, 4, 4, 8, 1, 1, 0, 0, uint8_t(EncodingType::Unorm) }, // ETC2A1
|
||||
{ 2, 8, 4, 8, 2, 2, 0, 0, uint8_t(EncodingType::Unorm) }, // PTC12
|
||||
{ 4, 4, 4, 8, 2, 2, 0, 0, uint8_t(EncodingType::Unorm) }, // PTC14
|
||||
{ 2, 8, 4, 8, 2, 2, 0, 0, uint8_t(EncodingType::Unorm) }, // PTC12A
|
||||
{ 4, 4, 4, 8, 2, 2, 0, 0, uint8_t(EncodingType::Unorm) }, // PTC14A
|
||||
{ 2, 8, 4, 8, 2, 2, 0, 0, uint8_t(EncodingType::Unorm) }, // PTC22
|
||||
{ 4, 4, 4, 8, 2, 2, 0, 0, uint8_t(EncodingType::Unorm) }, // PTC24
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, uint8_t(EncodingType::Count) }, // Unknown
|
||||
{ 1, 8, 1, 1, 1, 1, 0, 0, uint8_t(EncodingType::Unorm) }, // R1
|
||||
{ 8, 1, 1, 1, 1, 1, 0, 0, uint8_t(EncodingType::Unorm) }, // A8
|
||||
{ 8, 1, 1, 1, 1, 1, 0, 0, uint8_t(EncodingType::Unorm) }, // R8
|
||||
{ 8, 1, 1, 1, 1, 1, 0, 0, uint8_t(EncodingType::Int ) }, // R8I
|
||||
{ 8, 1, 1, 1, 1, 1, 0, 0, uint8_t(EncodingType::Uint ) }, // R8U
|
||||
{ 8, 1, 1, 1, 1, 1, 0, 0, uint8_t(EncodingType::Snorm) }, // R8S
|
||||
{ 16, 1, 1, 2, 1, 1, 0, 0, uint8_t(EncodingType::Unorm) }, // R16
|
||||
{ 16, 1, 1, 2, 1, 1, 0, 0, uint8_t(EncodingType::Int ) }, // R16I
|
||||
{ 16, 1, 1, 2, 1, 1, 0, 0, uint8_t(EncodingType::Uint ) }, // R16U
|
||||
{ 16, 1, 1, 2, 1, 1, 0, 0, uint8_t(EncodingType::Float) }, // R16F
|
||||
{ 16, 1, 1, 2, 1, 1, 0, 0, uint8_t(EncodingType::Snorm) }, // R16S
|
||||
{ 32, 1, 1, 4, 1, 1, 0, 0, uint8_t(EncodingType::Int ) }, // R32I
|
||||
{ 32, 1, 1, 4, 1, 1, 0, 0, uint8_t(EncodingType::Uint ) }, // R32U
|
||||
{ 32, 1, 1, 4, 1, 1, 0, 0, uint8_t(EncodingType::Float) }, // R32F
|
||||
{ 16, 1, 1, 2, 1, 1, 0, 0, uint8_t(EncodingType::Unorm) }, // RG8
|
||||
{ 16, 1, 1, 2, 1, 1, 0, 0, uint8_t(EncodingType::Int ) }, // RG8I
|
||||
{ 16, 1, 1, 2, 1, 1, 0, 0, uint8_t(EncodingType::Uint ) }, // RG8U
|
||||
{ 16, 1, 1, 2, 1, 1, 0, 0, uint8_t(EncodingType::Snorm) }, // RG8S
|
||||
{ 32, 1, 1, 4, 1, 1, 0, 0, uint8_t(EncodingType::Unorm) }, // RG16
|
||||
{ 32, 1, 1, 4, 1, 1, 0, 0, uint8_t(EncodingType::Int ) }, // RG16I
|
||||
{ 32, 1, 1, 4, 1, 1, 0, 0, uint8_t(EncodingType::Uint ) }, // RG16U
|
||||
{ 32, 1, 1, 4, 1, 1, 0, 0, uint8_t(EncodingType::Float) }, // RG16F
|
||||
{ 32, 1, 1, 4, 1, 1, 0, 0, uint8_t(EncodingType::Snorm) }, // RG16S
|
||||
{ 64, 1, 1, 8, 1, 1, 0, 0, uint8_t(EncodingType::Int ) }, // RG32I
|
||||
{ 64, 1, 1, 8, 1, 1, 0, 0, uint8_t(EncodingType::Uint ) }, // RG32U
|
||||
{ 64, 1, 1, 8, 1, 1, 0, 0, uint8_t(EncodingType::Float) }, // RG32F
|
||||
{ 24, 1, 1, 3, 1, 1, 0, 0, uint8_t(EncodingType::Unorm) }, // RGB8
|
||||
{ 24, 1, 1, 3, 1, 1, 0, 0, uint8_t(EncodingType::Int ) }, // RGB8I
|
||||
{ 24, 1, 1, 3, 1, 1, 0, 0, uint8_t(EncodingType::Uint ) }, // RGB8U
|
||||
{ 24, 1, 1, 3, 1, 1, 0, 0, uint8_t(EncodingType::Snorm) }, // RGB8S
|
||||
{ 32, 1, 1, 4, 1, 1, 0, 0, uint8_t(EncodingType::Float) }, // RGB9E5F
|
||||
{ 32, 1, 1, 4, 1, 1, 0, 0, uint8_t(EncodingType::Unorm) }, // BGRA8
|
||||
{ 32, 1, 1, 4, 1, 1, 0, 0, uint8_t(EncodingType::Unorm) }, // RGBA8
|
||||
{ 32, 1, 1, 4, 1, 1, 0, 0, uint8_t(EncodingType::Int ) }, // RGBA8I
|
||||
{ 32, 1, 1, 4, 1, 1, 0, 0, uint8_t(EncodingType::Uint ) }, // RGBA8U
|
||||
{ 32, 1, 1, 4, 1, 1, 0, 0, uint8_t(EncodingType::Snorm) }, // RGBA8S
|
||||
{ 64, 1, 1, 8, 1, 1, 0, 0, uint8_t(EncodingType::Unorm) }, // RGBA16
|
||||
{ 64, 1, 1, 8, 1, 1, 0, 0, uint8_t(EncodingType::Int ) }, // RGBA16I
|
||||
{ 64, 1, 1, 8, 1, 1, 0, 0, uint8_t(EncodingType::Uint ) }, // RGBA16U
|
||||
{ 64, 1, 1, 8, 1, 1, 0, 0, uint8_t(EncodingType::Float) }, // RGBA16F
|
||||
{ 64, 1, 1, 8, 1, 1, 0, 0, uint8_t(EncodingType::Snorm) }, // RGBA16S
|
||||
{ 128, 1, 1, 16, 1, 1, 0, 0, uint8_t(EncodingType::Int ) }, // RGBA32I
|
||||
{ 128, 1, 1, 16, 1, 1, 0, 0, uint8_t(EncodingType::Uint ) }, // RGBA32U
|
||||
{ 128, 1, 1, 16, 1, 1, 0, 0, uint8_t(EncodingType::Float) }, // RGBA32F
|
||||
{ 16, 1, 1, 2, 1, 1, 0, 0, uint8_t(EncodingType::Unorm) }, // R5G6B5
|
||||
{ 16, 1, 1, 2, 1, 1, 0, 0, uint8_t(EncodingType::Unorm) }, // RGBA4
|
||||
{ 16, 1, 1, 2, 1, 1, 0, 0, uint8_t(EncodingType::Unorm) }, // RGB5A1
|
||||
{ 32, 1, 1, 4, 1, 1, 0, 0, uint8_t(EncodingType::Unorm) }, // RGB10A2
|
||||
{ 32, 1, 1, 4, 1, 1, 0, 0, uint8_t(EncodingType::Unorm) }, // R11G11B10F
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, uint8_t(EncodingType::Count) }, // UnknownDepth
|
||||
{ 16, 1, 1, 2, 1, 1, 16, 0, uint8_t(EncodingType::Unorm) }, // D16
|
||||
{ 24, 1, 1, 3, 1, 1, 24, 0, uint8_t(EncodingType::Unorm) }, // D24
|
||||
{ 32, 1, 1, 4, 1, 1, 24, 8, uint8_t(EncodingType::Unorm) }, // D24S8
|
||||
{ 32, 1, 1, 4, 1, 1, 32, 0, uint8_t(EncodingType::Unorm) }, // D32
|
||||
{ 16, 1, 1, 2, 1, 1, 16, 0, uint8_t(EncodingType::Unorm) }, // D16F
|
||||
{ 24, 1, 1, 3, 1, 1, 24, 0, uint8_t(EncodingType::Unorm) }, // D24F
|
||||
{ 32, 1, 1, 4, 1, 1, 32, 0, uint8_t(EncodingType::Unorm) }, // D32F
|
||||
{ 8, 1, 1, 1, 1, 1, 0, 8, uint8_t(EncodingType::Unorm) }, // D0S8
|
||||
// +-------------------------------------------- bits per pixel
|
||||
// | +----------------------------------------- block width
|
||||
// | | +-------------------------------------- block height
|
||||
// | | | +---------------------------------- block size
|
||||
// | | | | +------------------------------- min blocks x
|
||||
// | | | | | +---------------------------- min blocks y
|
||||
// | | | | | | +------------------------ depth bits
|
||||
// | | | | | | | +--------------------- stencil bits
|
||||
// | | | | | | | | +---+---+---+----- r, g, b, a bits
|
||||
// | | | | | | | | r g b a +-- encoding type
|
||||
// | | | | | | | | | | | | |
|
||||
{ 4, 4, 4, 8, 1, 1, 0, 0, 0, 0, 0, 0, uint8_t(EncodingType::Unorm) }, // BC1
|
||||
{ 8, 4, 4, 16, 1, 1, 0, 0, 0, 0, 0, 0, uint8_t(EncodingType::Unorm) }, // BC2
|
||||
{ 8, 4, 4, 16, 1, 1, 0, 0, 0, 0, 0, 0, uint8_t(EncodingType::Unorm) }, // BC3
|
||||
{ 4, 4, 4, 8, 1, 1, 0, 0, 0, 0, 0, 0, uint8_t(EncodingType::Unorm) }, // BC4
|
||||
{ 8, 4, 4, 16, 1, 1, 0, 0, 0, 0, 0, 0, uint8_t(EncodingType::Unorm) }, // BC5
|
||||
{ 8, 4, 4, 16, 1, 1, 0, 0, 0, 0, 0, 0, uint8_t(EncodingType::Unorm) }, // BC6H
|
||||
{ 8, 4, 4, 16, 1, 1, 0, 0, 0, 0, 0, 0, uint8_t(EncodingType::Unorm) }, // BC7
|
||||
{ 4, 4, 4, 8, 1, 1, 0, 0, 0, 0, 0, 0, uint8_t(EncodingType::Unorm) }, // ETC1
|
||||
{ 4, 4, 4, 8, 1, 1, 0, 0, 0, 0, 0, 0, uint8_t(EncodingType::Unorm) }, // ETC2
|
||||
{ 8, 4, 4, 16, 1, 1, 0, 0, 0, 0, 0, 0, uint8_t(EncodingType::Unorm) }, // ETC2A
|
||||
{ 4, 4, 4, 8, 1, 1, 0, 0, 0, 0, 0, 0, uint8_t(EncodingType::Unorm) }, // ETC2A1
|
||||
{ 2, 8, 4, 8, 2, 2, 0, 0, 0, 0, 0, 0, uint8_t(EncodingType::Unorm) }, // PTC12
|
||||
{ 4, 4, 4, 8, 2, 2, 0, 0, 0, 0, 0, 0, uint8_t(EncodingType::Unorm) }, // PTC14
|
||||
{ 2, 8, 4, 8, 2, 2, 0, 0, 0, 0, 0, 0, uint8_t(EncodingType::Unorm) }, // PTC12A
|
||||
{ 4, 4, 4, 8, 2, 2, 0, 0, 0, 0, 0, 0, uint8_t(EncodingType::Unorm) }, // PTC14A
|
||||
{ 2, 8, 4, 8, 2, 2, 0, 0, 0, 0, 0, 0, uint8_t(EncodingType::Unorm) }, // PTC22
|
||||
{ 4, 4, 4, 8, 2, 2, 0, 0, 0, 0, 0, 0, uint8_t(EncodingType::Unorm) }, // PTC24
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, uint8_t(EncodingType::Count) }, // Unknown
|
||||
{ 1, 8, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, uint8_t(EncodingType::Unorm) }, // R1
|
||||
{ 8, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 8, uint8_t(EncodingType::Unorm) }, // A8
|
||||
{ 8, 1, 1, 1, 1, 1, 0, 0, 8, 0, 0, 0, uint8_t(EncodingType::Unorm) }, // R8
|
||||
{ 8, 1, 1, 1, 1, 1, 0, 0, 8, 0, 0, 0, uint8_t(EncodingType::Int ) }, // R8I
|
||||
{ 8, 1, 1, 1, 1, 1, 0, 0, 8, 0, 0, 0, uint8_t(EncodingType::Uint ) }, // R8U
|
||||
{ 8, 1, 1, 1, 1, 1, 0, 0, 8, 0, 0, 0, uint8_t(EncodingType::Snorm) }, // R8S
|
||||
{ 16, 1, 1, 2, 1, 1, 0, 0, 16, 0, 0, 0, uint8_t(EncodingType::Unorm) }, // R16
|
||||
{ 16, 1, 1, 2, 1, 1, 0, 0, 16, 0, 0, 0, uint8_t(EncodingType::Int ) }, // R16I
|
||||
{ 16, 1, 1, 2, 1, 1, 0, 0, 16, 0, 0, 0, uint8_t(EncodingType::Uint ) }, // R16U
|
||||
{ 16, 1, 1, 2, 1, 1, 0, 0, 16, 0, 0, 0, uint8_t(EncodingType::Float) }, // R16F
|
||||
{ 16, 1, 1, 2, 1, 1, 0, 0, 16, 0, 0, 0, uint8_t(EncodingType::Snorm) }, // R16S
|
||||
{ 32, 1, 1, 4, 1, 1, 0, 0, 32, 0, 0, 0, uint8_t(EncodingType::Int ) }, // R32I
|
||||
{ 32, 1, 1, 4, 1, 1, 0, 0, 32, 0, 0, 0, uint8_t(EncodingType::Uint ) }, // R32U
|
||||
{ 32, 1, 1, 4, 1, 1, 0, 0, 32, 0, 0, 0, uint8_t(EncodingType::Float) }, // R32F
|
||||
{ 16, 1, 1, 2, 1, 1, 0, 0, 8, 8, 0, 0, uint8_t(EncodingType::Unorm) }, // RG8
|
||||
{ 16, 1, 1, 2, 1, 1, 0, 0, 8, 8, 0, 0, uint8_t(EncodingType::Int ) }, // RG8I
|
||||
{ 16, 1, 1, 2, 1, 1, 0, 0, 8, 8, 0, 0, uint8_t(EncodingType::Uint ) }, // RG8U
|
||||
{ 16, 1, 1, 2, 1, 1, 0, 0, 8, 8, 0, 0, uint8_t(EncodingType::Snorm) }, // RG8S
|
||||
{ 32, 1, 1, 4, 1, 1, 0, 0, 16, 16, 0, 0, uint8_t(EncodingType::Unorm) }, // RG16
|
||||
{ 32, 1, 1, 4, 1, 1, 0, 0, 16, 16, 0, 0, uint8_t(EncodingType::Int ) }, // RG16I
|
||||
{ 32, 1, 1, 4, 1, 1, 0, 0, 16, 16, 0, 0, uint8_t(EncodingType::Uint ) }, // RG16U
|
||||
{ 32, 1, 1, 4, 1, 1, 0, 0, 16, 16, 0, 0, uint8_t(EncodingType::Float) }, // RG16F
|
||||
{ 32, 1, 1, 4, 1, 1, 0, 0, 16, 16, 0, 0, uint8_t(EncodingType::Snorm) }, // RG16S
|
||||
{ 64, 1, 1, 8, 1, 1, 0, 0, 32, 32, 0, 0, uint8_t(EncodingType::Int ) }, // RG32I
|
||||
{ 64, 1, 1, 8, 1, 1, 0, 0, 32, 32, 0, 0, uint8_t(EncodingType::Uint ) }, // RG32U
|
||||
{ 64, 1, 1, 8, 1, 1, 0, 0, 32, 32, 0, 0, uint8_t(EncodingType::Float) }, // RG32F
|
||||
{ 24, 1, 1, 3, 1, 1, 0, 0, 8, 8, 8, 0, uint8_t(EncodingType::Unorm) }, // RGB8
|
||||
{ 24, 1, 1, 3, 1, 1, 0, 0, 8, 8, 8, 0, uint8_t(EncodingType::Int ) }, // RGB8I
|
||||
{ 24, 1, 1, 3, 1, 1, 0, 0, 8, 8, 8, 0, uint8_t(EncodingType::Uint ) }, // RGB8U
|
||||
{ 24, 1, 1, 3, 1, 1, 0, 0, 8, 8, 8, 0, uint8_t(EncodingType::Snorm) }, // RGB8S
|
||||
{ 32, 1, 1, 4, 1, 1, 0, 0, 9, 9, 9, 5, uint8_t(EncodingType::Float) }, // RGB9E5F
|
||||
{ 32, 1, 1, 4, 1, 1, 0, 0, 8, 8, 8, 8, uint8_t(EncodingType::Unorm) }, // BGRA8
|
||||
{ 32, 1, 1, 4, 1, 1, 0, 0, 8, 8, 8, 8, uint8_t(EncodingType::Unorm) }, // RGBA8
|
||||
{ 32, 1, 1, 4, 1, 1, 0, 0, 8, 8, 8, 8, uint8_t(EncodingType::Int ) }, // RGBA8I
|
||||
{ 32, 1, 1, 4, 1, 1, 0, 0, 8, 8, 8, 8, uint8_t(EncodingType::Uint ) }, // RGBA8U
|
||||
{ 32, 1, 1, 4, 1, 1, 0, 0, 8, 8, 8, 8, uint8_t(EncodingType::Snorm) }, // RGBA8S
|
||||
{ 64, 1, 1, 8, 1, 1, 0, 0, 16, 16, 16, 16, uint8_t(EncodingType::Unorm) }, // RGBA16
|
||||
{ 64, 1, 1, 8, 1, 1, 0, 0, 16, 16, 16, 16, uint8_t(EncodingType::Int ) }, // RGBA16I
|
||||
{ 64, 1, 1, 8, 1, 1, 0, 0, 16, 16, 16, 16, uint8_t(EncodingType::Uint ) }, // RGBA16U
|
||||
{ 64, 1, 1, 8, 1, 1, 0, 0, 16, 16, 16, 16, uint8_t(EncodingType::Float) }, // RGBA16F
|
||||
{ 64, 1, 1, 8, 1, 1, 0, 0, 16, 16, 16, 16, uint8_t(EncodingType::Snorm) }, // RGBA16S
|
||||
{ 128, 1, 1, 16, 1, 1, 0, 0, 32, 32, 32, 32, uint8_t(EncodingType::Int ) }, // RGBA32I
|
||||
{ 128, 1, 1, 16, 1, 1, 0, 0, 32, 32, 32, 32, uint8_t(EncodingType::Uint ) }, // RGBA32U
|
||||
{ 128, 1, 1, 16, 1, 1, 0, 0, 32, 32, 32, 32, uint8_t(EncodingType::Float) }, // RGBA32F
|
||||
{ 16, 1, 1, 2, 1, 1, 0, 0, 5, 6, 5, 0, uint8_t(EncodingType::Unorm) }, // R5G6B5
|
||||
{ 16, 1, 1, 2, 1, 1, 0, 0, 4, 4, 4, 4, uint8_t(EncodingType::Unorm) }, // RGBA4
|
||||
{ 16, 1, 1, 2, 1, 1, 0, 0, 5, 5, 5, 1, uint8_t(EncodingType::Unorm) }, // RGB5A1
|
||||
{ 32, 1, 1, 4, 1, 1, 0, 0, 10, 10, 10, 2, uint8_t(EncodingType::Unorm) }, // RGB10A2
|
||||
{ 32, 1, 1, 4, 1, 1, 0, 0, 11, 11, 10, 0, uint8_t(EncodingType::Unorm) }, // R11G11B10F
|
||||
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, uint8_t(EncodingType::Count) }, // UnknownDepth
|
||||
{ 16, 1, 1, 2, 1, 1, 16, 0, 0, 0, 0, 0, uint8_t(EncodingType::Unorm) }, // D16
|
||||
{ 24, 1, 1, 3, 1, 1, 24, 0, 0, 0, 0, 0, uint8_t(EncodingType::Unorm) }, // D24
|
||||
{ 32, 1, 1, 4, 1, 1, 24, 8, 0, 0, 0, 0, uint8_t(EncodingType::Unorm) }, // D24S8
|
||||
{ 32, 1, 1, 4, 1, 1, 32, 0, 0, 0, 0, 0, uint8_t(EncodingType::Unorm) }, // D32
|
||||
{ 16, 1, 1, 2, 1, 1, 16, 0, 0, 0, 0, 0, uint8_t(EncodingType::Unorm) }, // D16F
|
||||
{ 24, 1, 1, 3, 1, 1, 24, 0, 0, 0, 0, 0, uint8_t(EncodingType::Unorm) }, // D24F
|
||||
{ 32, 1, 1, 4, 1, 1, 32, 0, 0, 0, 0, 0, uint8_t(EncodingType::Unorm) }, // D32F
|
||||
{ 8, 1, 1, 1, 1, 1, 0, 8, 0, 0, 0, 0, uint8_t(EncodingType::Unorm) }, // D0S8
|
||||
};
|
||||
BX_STATIC_ASSERT(TextureFormat::Count == BX_COUNTOF(s_imageBlockInfo) );
|
||||
|
||||
@ -452,6 +453,100 @@ namespace bgfx
|
||||
}
|
||||
}
|
||||
|
||||
void imageRgba32fToLinear(void* _dst, uint32_t _width, uint32_t _height, uint32_t _pitch, const void* _src)
|
||||
{
|
||||
uint8_t* dst = ( uint8_t*)_dst;
|
||||
const uint8_t* src = (const uint8_t*)_src;
|
||||
|
||||
for (uint32_t yy = 0; yy < _height; ++yy, src += _pitch)
|
||||
{
|
||||
for (uint32_t xx = 0; xx < _width; ++xx, dst += 16)
|
||||
{
|
||||
float* fd = ( float*)dst;
|
||||
const float* fs = (const float*)src;
|
||||
|
||||
fd[0] = bx::fpow(fs[0], 1.0f/2.2f);
|
||||
fd[1] = bx::fpow(fs[1], 1.0f/2.2f);
|
||||
fd[2] = bx::fpow(fs[2], 1.0f/2.2f);
|
||||
fd[3] = fs[3];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void imageRgba32fToGamma(void* _dst, uint32_t _width, uint32_t _height, uint32_t _pitch, const void* _src)
|
||||
{
|
||||
uint8_t* dst = ( uint8_t*)_dst;
|
||||
const uint8_t* src = (const uint8_t*)_src;
|
||||
|
||||
for (uint32_t yy = 0; yy < _height; ++yy, src += _pitch)
|
||||
{
|
||||
for (uint32_t xx = 0; xx < _width; ++xx, dst += 16)
|
||||
{
|
||||
float* fd = ( float*)dst;
|
||||
const float* fs = (const float*)src;
|
||||
|
||||
fd[0] = bx::fpow(fs[0], 2.2f);
|
||||
fd[1] = bx::fpow(fs[1], 2.2f);
|
||||
fd[2] = bx::fpow(fs[2], 2.2f);
|
||||
fd[3] = fs[3];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void imageRgba32fLinearDownsample2x2Ref(uint32_t _width, uint32_t _height, uint32_t _pitch, const void* _src, void* _dst)
|
||||
{
|
||||
const uint32_t dstwidth = _width/2;
|
||||
const uint32_t dstheight = _height/2;
|
||||
|
||||
if (0 == dstwidth
|
||||
|| 0 == dstheight)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
const uint8_t* src = (const uint8_t*)_src;
|
||||
uint8_t* dst = (uint8_t*)_dst;
|
||||
|
||||
for (uint32_t yy = 0, ystep = _pitch*2; yy < dstheight; ++yy, src += ystep)
|
||||
{
|
||||
const float* rgba0 = (const float*)&src[0];
|
||||
const float* rgba1 = (const float*)&src[_pitch];
|
||||
for (uint32_t xx = 0; xx < dstwidth; ++xx, rgba0 += 8, rgba1 += 8, dst += 16)
|
||||
{
|
||||
float xyz[4];
|
||||
xyz[0] = rgba0[0];
|
||||
xyz[1] = rgba0[1];
|
||||
xyz[2] = rgba0[2];
|
||||
xyz[3] = rgba0[3];
|
||||
|
||||
xyz[0] += rgba0[4];
|
||||
xyz[1] += rgba0[5];
|
||||
xyz[2] += rgba0[6];
|
||||
xyz[3] += rgba0[7];
|
||||
|
||||
xyz[0] += rgba1[0];
|
||||
xyz[1] += rgba1[1];
|
||||
xyz[2] += rgba1[2];
|
||||
xyz[3] += rgba1[3];
|
||||
|
||||
xyz[0] += rgba1[4];
|
||||
xyz[1] += rgba1[5];
|
||||
xyz[2] += rgba1[6];
|
||||
xyz[3] += rgba1[7];
|
||||
|
||||
xyz[0] *= 0.25f;
|
||||
xyz[1] *= 0.25f;
|
||||
xyz[2] *= 0.25f;
|
||||
xyz[3] *= 0.25f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void imageRgba32fLinearDownsample2x2(uint32_t _width, uint32_t _height, uint32_t _pitch, const void* _src, void* _dst)
|
||||
{
|
||||
imageRgba32fLinearDownsample2x2Ref(_width, _height, _pitch, _src, _dst);
|
||||
}
|
||||
|
||||
void imageRgba32fDownsample2x2NormalMapRef(uint32_t _width, uint32_t _height, uint32_t _pitch, const void* _src, void* _dst)
|
||||
{
|
||||
const uint32_t dstwidth = _width/2;
|
||||
@ -1563,7 +1658,7 @@ namespace bgfx
|
||||
bool imageConvert(void* _dst, TextureFormat::Enum _dstFormat, const void* _src, TextureFormat::Enum _srcFormat, uint32_t _width, uint32_t _height)
|
||||
{
|
||||
const uint32_t srcBpp = s_imageBlockInfo[_srcFormat].bitsPerPixel;
|
||||
return imageConvert(_dst, _dstFormat, _src, _srcFormat, _width, _height, _width*srcBpp);
|
||||
return imageConvert(_dst, _dstFormat, _src, _srcFormat, _width, _height, _width*srcBpp/8);
|
||||
}
|
||||
|
||||
uint8_t bitRangeConvert(uint32_t _in, uint32_t _from, uint32_t _to)
|
||||
@ -3605,12 +3700,17 @@ namespace bgfx
|
||||
break;
|
||||
|
||||
default:
|
||||
if (isCompressed(_format) )
|
||||
{
|
||||
void* temp = BX_ALLOC(_allocator, imageGetSize(_format, uint16_t(_pitch/4), uint16_t(_height) ) );
|
||||
imageDecodeToRgba8(temp, _src, _width, _height, _pitch, _format);
|
||||
imageRgba8ToRgba32f(_dst, _width, _height, _pitch, temp);
|
||||
BX_FREE(_allocator, temp);
|
||||
}
|
||||
else
|
||||
{
|
||||
imageConvert(_dst, TextureFormat::RGBA32F, _src, _format, _width, _height, _pitch);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
13
3rdparty/bgfx/src/image.h
vendored
13
3rdparty/bgfx/src/image.h
vendored
@ -63,6 +63,10 @@ namespace bgfx
|
||||
uint8_t minBlockY;
|
||||
uint8_t depthBits;
|
||||
uint8_t stencilBits;
|
||||
uint8_t rBits;
|
||||
uint8_t gBits;
|
||||
uint8_t bBits;
|
||||
uint8_t aBits;
|
||||
uint8_t encoding;
|
||||
};
|
||||
|
||||
@ -304,6 +308,15 @@ namespace bgfx
|
||||
///
|
||||
void imageRgba8Downsample2x2(uint32_t _width, uint32_t _height, uint32_t _pitch, const void* _src, void* _dst);
|
||||
|
||||
///
|
||||
void imageRgba32fToLinear(void* _dst, uint32_t _width, uint32_t _height, uint32_t _pitch, const void* _src);
|
||||
|
||||
///
|
||||
void imageRgba32fToGamma(void* _dst, uint32_t _width, uint32_t _height, uint32_t _pitch, const void* _src);
|
||||
|
||||
///
|
||||
void imageRgba32fLinearDownsample2x2(uint32_t _width, uint32_t _height, uint32_t _pitch, const void* _src, void* _dst);
|
||||
|
||||
///
|
||||
void imageRgba32fDownsample2x2NormalMap(uint32_t _width, uint32_t _height, uint32_t _pitch, const void* _src, void* _dst);
|
||||
|
||||
|
15
3rdparty/bgfx/src/renderer_d3d11.cpp
vendored
15
3rdparty/bgfx/src/renderer_d3d11.cpp
vendored
@ -2343,18 +2343,18 @@ BX_PRAGMA_DIAGNOSTIC_POP();
|
||||
m_rasterizerStateCache.invalidate();
|
||||
}
|
||||
|
||||
uint32_t flags = _resolution.m_flags & ~(0
|
||||
const uint32_t maskFlags = ~(0
|
||||
| BGFX_RESET_HMD_RECENTER
|
||||
| BGFX_RESET_MAXANISOTROPY
|
||||
| BGFX_RESET_DEPTH_CLAMP
|
||||
| BGFX_RESET_SUSPEND
|
||||
);
|
||||
|
||||
if (m_resolution.m_width != _resolution.m_width
|
||||
|| m_resolution.m_height != _resolution.m_height
|
||||
|| m_resolution.m_flags != flags)
|
||||
if (m_resolution.m_width != _resolution.m_width
|
||||
|| m_resolution.m_height != _resolution.m_height
|
||||
|| (m_resolution.m_flags&maskFlags) != (_resolution.m_flags&maskFlags) )
|
||||
{
|
||||
flags &= ~BGFX_RESET_INTERNAL_FORCE;
|
||||
uint32_t flags = _resolution.m_flags & (~BGFX_RESET_INTERNAL_FORCE);
|
||||
|
||||
bool resize = true
|
||||
&& !BX_ENABLED(BX_PLATFORM_XBOXONE || BX_PLATFORM_WINRT) // can't use ResizeBuffers on Windows Phone
|
||||
@ -5020,6 +5020,11 @@ BX_PRAGMA_DIAGNOSTIC_POP();
|
||||
return;
|
||||
}
|
||||
|
||||
if (_render->m_capture)
|
||||
{
|
||||
renderDocTriggerCapture();
|
||||
}
|
||||
|
||||
PIX_BEGINEVENT(D3DCOLOR_RGBA(0xff, 0x00, 0x00, 0xff), L"rendererSubmit");
|
||||
BGFX_GPU_PROFILER_BEGIN_DYNAMIC("rendererSubmit");
|
||||
|
||||
|
13
3rdparty/bgfx/src/renderer_d3d12.cpp
vendored
13
3rdparty/bgfx/src/renderer_d3d12.cpp
vendored
@ -367,6 +367,9 @@ namespace bgfx { namespace d3d12
|
||||
static const GUID IID_ID3D12RootSignature = { 0xc54a6b66, 0x72df, 0x4ee8, { 0x8b, 0xe5, 0xa9, 0x46, 0xa1, 0x42, 0x92, 0x14 } };
|
||||
static const GUID IID_ID3D12QueryHeap = { 0x0d9658ae, 0xed45, 0x469e, { 0xa6, 0x1d, 0x97, 0x0e, 0xc5, 0x83, 0xca, 0xb4 } };
|
||||
static const GUID IID_IDXGIFactory4 = { 0x1bc6ea02, 0xef36, 0x464f, { 0xbf, 0x0c, 0x21, 0xca, 0x39, 0xe5, 0x16, 0x8a } };
|
||||
#else
|
||||
static const GUID IID_ID3D12CommandSignature = { 0xc36a797c, 0xec80, 0x4f0a, { 0x89, 0x85, 0xa7, 0xb2, 0x47, 0x50, 0x82, 0xd1 } };
|
||||
static const GUID IID_ID3D12QueryHeap = { 0x0d9658ae, 0xed45, 0x469e, { 0xa6, 0x1d, 0x97, 0x0e, 0xc5, 0x83, 0xca, 0xb4 } };
|
||||
#endif // USE_D3D12_DYNAMIC_LIB
|
||||
|
||||
struct HeapProperty
|
||||
@ -1868,18 +1871,18 @@ data.NumQualityLevels = 0;
|
||||
m_pipelineStateCache.invalidate();
|
||||
}
|
||||
|
||||
uint32_t flags = _resolution.m_flags & ~(0
|
||||
const uint32_t maskFlags = ~(0
|
||||
| BGFX_RESET_HMD_RECENTER
|
||||
| BGFX_RESET_MAXANISOTROPY
|
||||
| BGFX_RESET_DEPTH_CLAMP
|
||||
| BGFX_RESET_SUSPEND
|
||||
);
|
||||
|
||||
if (m_resolution.m_width != _resolution.m_width
|
||||
|| m_resolution.m_height != _resolution.m_height
|
||||
|| m_resolution.m_flags != flags)
|
||||
if (m_resolution.m_width != _resolution.m_width
|
||||
|| m_resolution.m_height != _resolution.m_height
|
||||
|| (m_resolution.m_flags&maskFlags) != (_resolution.m_flags&maskFlags) )
|
||||
{
|
||||
flags &= ~BGFX_RESET_INTERNAL_FORCE;
|
||||
uint32_t flags = _resolution.m_flags & (~BGFX_RESET_INTERNAL_FORCE);
|
||||
|
||||
bool resize = (m_resolution.m_flags&BGFX_RESET_MSAA_MASK) == (_resolution.m_flags&BGFX_RESET_MSAA_MASK);
|
||||
|
||||
|
10
3rdparty/bgfx/src/renderer_d3d9.cpp
vendored
10
3rdparty/bgfx/src/renderer_d3d9.cpp
vendored
@ -1291,18 +1291,18 @@ namespace bgfx { namespace d3d9
|
||||
? m_caps.MaxAnisotropy
|
||||
: 1
|
||||
;
|
||||
uint32_t flags = _resolution.m_flags & ~(0
|
||||
const uint32_t maskFlags = ~(0
|
||||
| BGFX_RESET_HMD_RECENTER
|
||||
| BGFX_RESET_MAXANISOTROPY
|
||||
| BGFX_RESET_DEPTH_CLAMP
|
||||
| BGFX_RESET_SUSPEND
|
||||
);
|
||||
|
||||
if (m_resolution.m_width != _resolution.m_width
|
||||
|| m_resolution.m_height != _resolution.m_height
|
||||
|| m_resolution.m_flags != flags)
|
||||
if (m_resolution.m_width != _resolution.m_width
|
||||
|| m_resolution.m_height != _resolution.m_height
|
||||
|| (m_resolution.m_flags&maskFlags) != (_resolution.m_flags&maskFlags) )
|
||||
{
|
||||
flags &= ~BGFX_RESET_INTERNAL_FORCE;
|
||||
uint32_t flags = _resolution.m_flags & (~BGFX_RESET_INTERNAL_FORCE);
|
||||
|
||||
m_resolution = _resolution;
|
||||
m_resolution.m_flags = flags;
|
||||
|
15
3rdparty/bgfx/src/renderer_gl.cpp
vendored
15
3rdparty/bgfx/src/renderer_gl.cpp
vendored
@ -2507,18 +2507,18 @@ namespace bgfx { namespace gl
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t flags = _resolution.m_flags & ~(0
|
||||
const uint32_t maskFlags = ~(0
|
||||
| BGFX_RESET_HMD_RECENTER
|
||||
| BGFX_RESET_MAXANISOTROPY
|
||||
| BGFX_RESET_DEPTH_CLAMP
|
||||
| BGFX_RESET_SUSPEND
|
||||
);
|
||||
|
||||
if (m_resolution.m_width != _resolution.m_width
|
||||
|| m_resolution.m_height != _resolution.m_height
|
||||
|| m_resolution.m_flags != flags)
|
||||
if (m_resolution.m_width != _resolution.m_width
|
||||
|| m_resolution.m_height != _resolution.m_height
|
||||
|| (m_resolution.m_flags&maskFlags) != (_resolution.m_flags&maskFlags) )
|
||||
{
|
||||
flags &= ~BGFX_RESET_INTERNAL_FORCE;
|
||||
uint32_t flags = _resolution.m_flags & (~BGFX_RESET_INTERNAL_FORCE);
|
||||
|
||||
m_resolution = _resolution;
|
||||
m_resolution.m_flags = flags;
|
||||
@ -5640,6 +5640,11 @@ namespace bgfx { namespace gl
|
||||
{
|
||||
BGFX_GPU_PROFILER_BEGIN_DYNAMIC("rendererSubmit");
|
||||
|
||||
if (_render->m_capture)
|
||||
{
|
||||
renderDocTriggerCapture();
|
||||
}
|
||||
|
||||
if (1 < m_numWindows
|
||||
&& m_vaoSupport)
|
||||
{
|
||||
|
294
3rdparty/bgfx/tools/texturec/texturec.cpp
vendored
294
3rdparty/bgfx/tools/texturec/texturec.cpp
vendored
@ -23,8 +23,39 @@ extern "C" {
|
||||
#include <iqa.h>
|
||||
}
|
||||
|
||||
#define LODEPNG_NO_COMPILE_ENCODER
|
||||
#define LODEPNG_NO_COMPILE_DISK
|
||||
#define LODEPNG_NO_COMPILE_ANCILLARY_CHUNKS
|
||||
#define LODEPNG_NO_COMPILE_ERROR_TEXT
|
||||
#define LODEPNG_NO_COMPILE_ALLOCATORS
|
||||
#define LODEPNG_NO_COMPILE_CPP
|
||||
#include <lodepng/lodepng.cpp>
|
||||
|
||||
void* lodepng_malloc(size_t _size)
|
||||
{
|
||||
return ::malloc(_size);
|
||||
}
|
||||
|
||||
void* lodepng_realloc(void* _ptr, size_t _size)
|
||||
{
|
||||
return ::realloc(_ptr, _size);
|
||||
}
|
||||
|
||||
void lodepng_free(void* _ptr)
|
||||
{
|
||||
::free(_ptr);
|
||||
}
|
||||
|
||||
BX_PRAGMA_DIAGNOSTIC_PUSH();
|
||||
BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG_GCC("-Wmissing-field-initializers");
|
||||
BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG_GCC("-Wshadow");
|
||||
BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG_GCC("-Wint-to-pointer-cast")
|
||||
#define STBI_MALLOC(_size) lodepng_malloc(_size)
|
||||
#define STBI_REALLOC(_ptr, _size) lodepng_realloc(_ptr, _size)
|
||||
#define STBI_FREE(_ptr) lodepng_free(_ptr)
|
||||
#define STB_IMAGE_IMPLEMENTATION
|
||||
#include <stb/stb_image.c>
|
||||
BX_PRAGMA_DIAGNOSTIC_POP();
|
||||
|
||||
#if 0
|
||||
# define BX_TRACE(_format, ...) fprintf(stderr, "" _format "\n", ##__VA_ARGS__)
|
||||
@ -60,6 +91,141 @@ namespace bgfx
|
||||
::free(mem);
|
||||
}
|
||||
|
||||
bool imageParse(ImageContainer& _imageContainer, const void* _data, uint32_t _size, void** _out)
|
||||
{
|
||||
*_out = NULL;
|
||||
bool loaded = imageParse(_imageContainer, _data, _size);
|
||||
if (!loaded)
|
||||
{
|
||||
bgfx::TextureFormat::Enum format = bgfx::TextureFormat::RGBA8;
|
||||
uint32_t bpp = 32;
|
||||
|
||||
uint32_t width = 0;
|
||||
uint32_t height = 0;
|
||||
|
||||
uint8_t* out = NULL;
|
||||
static uint8_t pngMagic[] = { 0x89, 0x50, 0x4E, 0x47, 0x0d, 0x0a };
|
||||
if (0 == memcmp(_data, pngMagic, sizeof(pngMagic) ) )
|
||||
{
|
||||
unsigned error;
|
||||
LodePNGState state;
|
||||
lodepng_state_init(&state);
|
||||
state.decoder.color_convert = 0;
|
||||
error = lodepng_decode(&out, &width, &height, &state, (uint8_t*)_data, _size);
|
||||
|
||||
if (0 == error)
|
||||
{
|
||||
*_out = out;
|
||||
|
||||
switch (state.info_raw.bitdepth)
|
||||
{
|
||||
case 8:
|
||||
switch (state.info_raw.colortype)
|
||||
{
|
||||
case LCT_GREY:
|
||||
format = bgfx::TextureFormat::R8;
|
||||
bpp = 8;
|
||||
break;
|
||||
|
||||
case LCT_GREY_ALPHA:
|
||||
format = bgfx::TextureFormat::RG8;
|
||||
bpp = 16;
|
||||
break;
|
||||
|
||||
case LCT_RGB:
|
||||
format = bgfx::TextureFormat::RGB8;
|
||||
bpp = 24;
|
||||
break;
|
||||
|
||||
case LCT_RGBA:
|
||||
format = bgfx::TextureFormat::RGBA8;
|
||||
bpp = 32;
|
||||
break;
|
||||
|
||||
case LCT_PALETTE:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 16:
|
||||
switch (state.info_raw.colortype)
|
||||
{
|
||||
case LCT_GREY:
|
||||
for (uint32_t ii = 0, num = width*height; ii < num; ++ii)
|
||||
{
|
||||
uint16_t* rgba = (uint16_t*)out + ii*4;
|
||||
rgba[0] = bx::toHostEndian(rgba[0], false);
|
||||
}
|
||||
format = bgfx::TextureFormat::R16;
|
||||
bpp = 16;
|
||||
break;
|
||||
|
||||
case LCT_GREY_ALPHA:
|
||||
for (uint32_t ii = 0, num = width*height; ii < num; ++ii)
|
||||
{
|
||||
uint16_t* rgba = (uint16_t*)out + ii*4;
|
||||
rgba[0] = bx::toHostEndian(rgba[0], false);
|
||||
rgba[1] = bx::toHostEndian(rgba[1], false);
|
||||
}
|
||||
format = bgfx::TextureFormat::R16;
|
||||
bpp = 16;
|
||||
break;
|
||||
|
||||
case LCT_RGBA:
|
||||
for (uint32_t ii = 0, num = width*height; ii < num; ++ii)
|
||||
{
|
||||
uint16_t* rgba = (uint16_t*)out + ii*4;
|
||||
rgba[0] = bx::toHostEndian(rgba[0], false);
|
||||
rgba[1] = bx::toHostEndian(rgba[1], false);
|
||||
rgba[2] = bx::toHostEndian(rgba[2], false);
|
||||
rgba[3] = bx::toHostEndian(rgba[3], false);
|
||||
}
|
||||
format = bgfx::TextureFormat::RGBA16;
|
||||
bpp = 64;
|
||||
break;
|
||||
|
||||
case LCT_RGB:
|
||||
case LCT_PALETTE:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
lodepng_state_cleanup(&state);
|
||||
}
|
||||
else
|
||||
{
|
||||
int comp = 0;
|
||||
*_out = stbi_load_from_memory( (uint8_t*)_data, _size, (int*)&width, (int*)&height, &comp, 4);
|
||||
}
|
||||
|
||||
loaded = NULL != *_out;
|
||||
|
||||
if (loaded)
|
||||
{
|
||||
_imageContainer.m_data = *_out;
|
||||
_imageContainer.m_size = width*height*bpp/8;
|
||||
_imageContainer.m_offset = 0;
|
||||
_imageContainer.m_width = width;
|
||||
_imageContainer.m_height = height;
|
||||
_imageContainer.m_depth = 1;
|
||||
_imageContainer.m_format = format;
|
||||
_imageContainer.m_numMips = 1;
|
||||
_imageContainer.m_hasAlpha = true;
|
||||
_imageContainer.m_cubeMap = false;
|
||||
_imageContainer.m_ktx = false;
|
||||
_imageContainer.m_ktxLE = false;
|
||||
_imageContainer.m_srgb = false;
|
||||
}
|
||||
}
|
||||
|
||||
return loaded;
|
||||
}
|
||||
|
||||
bool imageEncodeFromRgba8(void* _dst, const void* _src, uint32_t _width, uint32_t _height, uint8_t _format)
|
||||
{
|
||||
TextureFormat::Enum format = TextureFormat::Enum(_format);
|
||||
@ -334,7 +500,7 @@ void help(const char* _error = NULL)
|
||||
);
|
||||
|
||||
fprintf(stderr
|
||||
, "Usage: texturec -f <in> -o <out> -t <format>\n"
|
||||
, "Usage: texturec -f <in> -o <out> [-t <format>]\n"
|
||||
|
||||
"\n"
|
||||
"Supported input file types:\n"
|
||||
@ -400,20 +566,6 @@ int main(int _argc, const char* _argv[])
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
const char* type = cmdLine.findOption('t');
|
||||
bgfx::TextureFormat::Enum format = bgfx::TextureFormat::BGRA8;
|
||||
|
||||
if (NULL != type)
|
||||
{
|
||||
format = bgfx::getFormat(type);
|
||||
|
||||
if (!isValid(format) )
|
||||
{
|
||||
help("Invalid format specified.");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
const bool mips = cmdLine.hasArg('m', "mips");
|
||||
const bool normalMap = cmdLine.hasArg('n', "normalmap");
|
||||
const bool iqa = cmdLine.hasArg('\0', "iqa");
|
||||
@ -429,40 +581,29 @@ int main(int _argc, const char* _argv[])
|
||||
uint8_t* decodedImage = NULL;
|
||||
ImageContainer imageContainer;
|
||||
|
||||
bool loaded = imageParse(imageContainer, mem->data, mem->size);
|
||||
if (!loaded)
|
||||
bool loaded = imageParse(imageContainer, mem->data, mem->size, (void**)&decodedImage);
|
||||
if (NULL != decodedImage)
|
||||
{
|
||||
int width = 0;
|
||||
int height = 0;
|
||||
int comp = 0;
|
||||
|
||||
decodedImage = stbi_load_from_memory( (uint8_t*)mem->data, mem->size, &width, &height, &comp, 4);
|
||||
loaded = NULL != decodedImage;
|
||||
|
||||
if (loaded)
|
||||
{
|
||||
release(mem);
|
||||
|
||||
mem = makeRef(decodedImage, width*height*4);
|
||||
|
||||
imageContainer.m_data = mem->data;
|
||||
imageContainer.m_size = mem->size;
|
||||
imageContainer.m_offset = 0;
|
||||
imageContainer.m_width = width;
|
||||
imageContainer.m_height = height;
|
||||
imageContainer.m_depth = 1;
|
||||
imageContainer.m_format = bgfx::TextureFormat::RGBA8;
|
||||
imageContainer.m_numMips = 1;
|
||||
imageContainer.m_hasAlpha = true;
|
||||
imageContainer.m_cubeMap = false;
|
||||
imageContainer.m_ktx = false;
|
||||
imageContainer.m_ktxLE = false;
|
||||
imageContainer.m_srgb = false;
|
||||
}
|
||||
release(mem);
|
||||
mem = makeRef(imageContainer.m_data, imageContainer.m_size);
|
||||
}
|
||||
|
||||
if (loaded)
|
||||
{
|
||||
const char* type = cmdLine.findOption('t');
|
||||
bgfx::TextureFormat::Enum format = imageContainer.m_format;
|
||||
|
||||
if (NULL != type)
|
||||
{
|
||||
format = bgfx::getFormat(type);
|
||||
|
||||
if (!isValid(format) )
|
||||
{
|
||||
help("Invalid format specified.");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
bx::CrtAllocator allocator;
|
||||
const Memory* output = NULL;
|
||||
|
||||
@ -540,6 +681,66 @@ int main(int _argc, const char* _argv[])
|
||||
|
||||
BX_FREE(&allocator, rgbaDst);
|
||||
}
|
||||
else if (8 != getBlockInfo(imageContainer.m_format).rBits)
|
||||
{
|
||||
output = imageAlloc(imageContainer, format, mip.m_width, mip.m_height, 0, false, mips);
|
||||
|
||||
ImageMip dstMip;
|
||||
imageGetRawData(imageContainer, 0, 0, NULL, 0, dstMip);
|
||||
|
||||
if (mip.m_width != dstMip.m_width
|
||||
&& mip.m_height != dstMip.m_height)
|
||||
{
|
||||
printf("Invalid input image size %dx%d, it must be at least %dx%d to be converted to %s format.\n"
|
||||
, mip.m_width
|
||||
, mip.m_height
|
||||
, dstMip.m_width
|
||||
, dstMip.m_height
|
||||
, getName(format)
|
||||
);
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
uint32_t size = imageGetSize(TextureFormat::RGBA32F, dstMip.m_width, dstMip.m_height);
|
||||
temp = BX_ALLOC(&allocator, size);
|
||||
float* rgba = (float*)temp;
|
||||
float* rgbaDst = (float*)BX_ALLOC(&allocator, size);
|
||||
|
||||
imageDecodeToRgba32f(&allocator
|
||||
, rgba
|
||||
, mip.m_data
|
||||
, mip.m_width
|
||||
, mip.m_height
|
||||
, mip.m_width*mip.m_bpp/8
|
||||
, mip.m_format
|
||||
);
|
||||
imageEncodeFromRgba32f(&allocator, output->data, rgba, dstMip.m_width, dstMip.m_height, format);
|
||||
|
||||
imageRgba32fToLinear(rgba
|
||||
, mip.m_width
|
||||
, mip.m_height
|
||||
, mip.m_width*mip.m_bpp/8
|
||||
, rgba
|
||||
);
|
||||
|
||||
for (uint8_t lod = 1; lod < numMips; ++lod)
|
||||
{
|
||||
imageRgba32fLinearDownsample2x2(dstMip.m_width, dstMip.m_height, dstMip.m_width*16, rgba, rgba);
|
||||
imageGetRawData(imageContainer, 0, lod, output->data, output->size, dstMip);
|
||||
uint8_t* data = const_cast<uint8_t*>(dstMip.m_data);
|
||||
|
||||
imageRgba32fToGamma(rgbaDst
|
||||
, mip.m_width
|
||||
, mip.m_height
|
||||
, mip.m_width*mip.m_bpp/8
|
||||
, rgba
|
||||
);
|
||||
|
||||
imageEncodeFromRgba32f(&allocator, data, rgbaDst, dstMip.m_width, dstMip.m_height, format);
|
||||
}
|
||||
|
||||
BX_FREE(&allocator, rgbaDst);
|
||||
}
|
||||
else
|
||||
{
|
||||
output = imageAlloc(imageContainer, format, mip.m_width, mip.m_height, 0, false, mips);
|
||||
@ -649,6 +850,11 @@ int main(int _argc, const char* _argv[])
|
||||
imageFree(output);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
help("Failed to load input file.");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
release(mem);
|
||||
}
|
||||
|
7
3rdparty/bgfx/tools/texturev/texturev.cpp
vendored
7
3rdparty/bgfx/tools/texturev/texturev.cpp
vendored
@ -721,10 +721,10 @@ int _main_(int _argc, char** _argv)
|
||||
|
||||
if (ImGui::BeginPopupModal("Help", NULL, ImGuiWindowFlags_AlwaysAutoResize) )
|
||||
{
|
||||
ImGui::SetWindowFontScale(1.2f);
|
||||
ImGui::SetWindowFontScale(1.0f);
|
||||
|
||||
ImGui::Text(
|
||||
"texturev, bgfx texture viewer tool\n"
|
||||
"texturev, bgfx texture viewer tool " ICON_KI_WRENCH "\n"
|
||||
"Copyright 2011-2016 Branimir Karadzic. All rights reserved.\n"
|
||||
"License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause\n"
|
||||
);
|
||||
@ -733,6 +733,7 @@ int _main_(int _argc, char** _argv)
|
||||
|
||||
ImGui::Text("Key bindings:\n\n");
|
||||
|
||||
ImGui::PushFont(ImGui::Font::Mono);
|
||||
ImGui::TextColored(ImVec4(1.0f, 1.0f, 0.0f, 1.0f), "ESC"); ImGui::SameLine(64); ImGui::Text("Exit.");
|
||||
ImGui::TextColored(ImVec4(1.0f, 1.0f, 0.0f, 1.0f), "h"); ImGui::SameLine(64); ImGui::Text("Toggle help screen.");
|
||||
ImGui::TextColored(ImVec4(1.0f, 1.0f, 0.0f, 1.0f), "f"); ImGui::SameLine(64); ImGui::Text("Toggle full-screen.");
|
||||
@ -753,6 +754,8 @@ int _main_(int _argc, char** _argv)
|
||||
|
||||
ImGui::TextColored(ImVec4(1.0f, 1.0f, 0.0f, 1.0f), "r/g/b"); ImGui::SameLine(64); ImGui::Text("Toggle R, G, or B color channel.");
|
||||
ImGui::TextColored(ImVec4(1.0f, 1.0f, 0.0f, 1.0f), "a"); ImGui::SameLine(64); ImGui::Text("Toggle alpha blending.");
|
||||
ImGui::PopFont();
|
||||
|
||||
ImGui::NextLine();
|
||||
|
||||
ImGui::Dummy(ImVec2(0.0f, 0.0f) );
|
||||
|
24
3rdparty/bx/include/bx/fpumath.h
vendored
24
3rdparty/bx/include/bx/fpumath.h
vendored
@ -341,6 +341,30 @@ namespace bx
|
||||
_result[2] = 1.0f / _a[2];
|
||||
}
|
||||
|
||||
inline void vec3TangentFrame(const float* _n, float* _t, float* _b)
|
||||
{
|
||||
const float nx = _n[0];
|
||||
const float ny = _n[1];
|
||||
const float nz = _n[2];
|
||||
|
||||
if (bx::fabsolute(nx) > bx::fabsolute(nz) )
|
||||
{
|
||||
float invLen = 1.0f / bx::fsqrt(nx*nx + nz*nz);
|
||||
_t[0] = -nz * invLen;
|
||||
_t[1] = 0.0f;
|
||||
_t[2] = nx * invLen;
|
||||
}
|
||||
else
|
||||
{
|
||||
float invLen = 1.0f / bx::fsqrt(ny*ny + nz*nz);
|
||||
_t[0] = 0.0f;
|
||||
_t[1] = nz * invLen;
|
||||
_t[2] = -ny * invLen;
|
||||
}
|
||||
|
||||
bx::vec3Cross(_b, _n, _t);
|
||||
}
|
||||
|
||||
inline void quatIdentity(float* _result)
|
||||
{
|
||||
_result[0] = 0.0f;
|
||||
|
70
3rdparty/bx/scripts/toolchain.lua
vendored
70
3rdparty/bx/scripts/toolchain.lua
vendored
@ -13,30 +13,32 @@ function toolchain(_buildDir, _libDir)
|
||||
value = "GCC",
|
||||
description = "Choose GCC flavor",
|
||||
allowed = {
|
||||
{ "android-arm", "Android - ARM" },
|
||||
{ "android-mips", "Android - MIPS" },
|
||||
{ "android-x86", "Android - x86" },
|
||||
{ "asmjs", "Emscripten/asm.js" },
|
||||
{ "freebsd", "FreeBSD" },
|
||||
{ "linux-gcc", "Linux (GCC compiler)" },
|
||||
{ "linux-gcc-5", "Linux (GCC-5 compiler)" },
|
||||
{ "linux-clang", "Linux (Clang compiler)" },
|
||||
{ "linux-mips-gcc", "Linux (MIPS, GCC compiler)" },
|
||||
{ "linux-arm-gcc", "Linux (ARM, GCC compiler)" },
|
||||
{ "ios-arm", "iOS - ARM" },
|
||||
{ "ios-simulator", "iOS - Simulator" },
|
||||
{ "tvos-arm64", "tvOS - ARM64" },
|
||||
{ "tvos-simulator", "tvOS - Simulator" },
|
||||
{ "mingw-gcc", "MinGW" },
|
||||
{ "mingw-clang", "MinGW (clang compiler)" },
|
||||
{ "nacl", "Native Client" },
|
||||
{ "nacl-arm", "Native Client - ARM" },
|
||||
{ "netbsd", "NetBSD" },
|
||||
{ "osx", "OSX" },
|
||||
{ "pnacl", "Native Client - PNaCl" },
|
||||
{ "ps4", "PS4" },
|
||||
{ "qnx-arm", "QNX/Blackberry - ARM" },
|
||||
{ "rpi", "RaspberryPi" },
|
||||
{ "android-arm", "Android - ARM" },
|
||||
{ "android-mips", "Android - MIPS" },
|
||||
{ "android-x86", "Android - x86" },
|
||||
{ "asmjs", "Emscripten/asm.js" },
|
||||
{ "freebsd", "FreeBSD" },
|
||||
{ "linux-gcc", "Linux (GCC compiler)" },
|
||||
{ "linux-gcc-afl", "Linux (GCC + AFL fuzzer)" },
|
||||
{ "linux-gcc-5", "Linux (GCC-5 compiler)" },
|
||||
{ "linux-clang", "Linux (Clang compiler)" },
|
||||
{ "linux-clang-afl", "Linux (Clang + AFL fuzzer)" },
|
||||
{ "linux-mips-gcc", "Linux (MIPS, GCC compiler)" },
|
||||
{ "linux-arm-gcc", "Linux (ARM, GCC compiler)" },
|
||||
{ "ios-arm", "iOS - ARM" },
|
||||
{ "ios-simulator", "iOS - Simulator" },
|
||||
{ "tvos-arm64", "tvOS - ARM64" },
|
||||
{ "tvos-simulator", "tvOS - Simulator" },
|
||||
{ "mingw-gcc", "MinGW" },
|
||||
{ "mingw-clang", "MinGW (clang compiler)" },
|
||||
{ "nacl", "Native Client" },
|
||||
{ "nacl-arm", "Native Client - ARM" },
|
||||
{ "netbsd", "NetBSD" },
|
||||
{ "osx", "OSX" },
|
||||
{ "pnacl", "Native Client - PNaCl" },
|
||||
{ "ps4", "PS4" },
|
||||
{ "qnx-arm", "QNX/Blackberry - ARM" },
|
||||
{ "rpi", "RaspberryPi" },
|
||||
},
|
||||
}
|
||||
|
||||
@ -120,7 +122,7 @@ function toolchain(_buildDir, _libDir)
|
||||
tvosPlatform = _OPTIONS["with-tvos"]
|
||||
end
|
||||
|
||||
if _ACTION == "gmake" then
|
||||
if _ACTION == "gmake" or _ACTION == "ninja" then
|
||||
|
||||
if nil == _OPTIONS["gcc"] then
|
||||
print("GCC flavor must be specified!")
|
||||
@ -206,6 +208,12 @@ function toolchain(_buildDir, _libDir)
|
||||
elseif "linux-gcc" == _OPTIONS["gcc"] then
|
||||
location (path.join(_buildDir, "projects", _ACTION .. "-linux"))
|
||||
|
||||
elseif "linux-gcc-afl" == _OPTIONS["gcc"] then
|
||||
premake.gcc.cc = "afl-gcc"
|
||||
premake.gcc.cxx = "afl-g++"
|
||||
premake.gcc.ar = "ar"
|
||||
location (path.join(_buildDir, "projects", _ACTION .. "-linux"))
|
||||
|
||||
elseif "linux-gcc-5" == _OPTIONS["gcc"] then
|
||||
premake.gcc.cc = "gcc-5"
|
||||
premake.gcc.cxx = "g++-5"
|
||||
@ -218,6 +226,12 @@ function toolchain(_buildDir, _libDir)
|
||||
premake.gcc.ar = "ar"
|
||||
location (path.join(_buildDir, "projects", _ACTION .. "-linux-clang"))
|
||||
|
||||
elseif "linux-clang-afl" == _OPTIONS["gcc"] then
|
||||
premake.gcc.cc = "afl-clang"
|
||||
premake.gcc.cxx = "afl-clang++"
|
||||
premake.gcc.ar = "ar"
|
||||
location (path.join(_buildDir, "projects", _ACTION .. "-linux-clang"))
|
||||
|
||||
elseif "linux-mips-gcc" == _OPTIONS["gcc"] then
|
||||
location (path.join(_buildDir, "projects", _ACTION .. "-linux-mips-gcc"))
|
||||
|
||||
@ -610,7 +624,7 @@ function toolchain(_buildDir, _libDir)
|
||||
"-mfpmath=sse",
|
||||
}
|
||||
|
||||
configuration { "linux-gcc or linux-clang" }
|
||||
configuration { "linux-gcc* or linux-clang*" }
|
||||
buildoptions {
|
||||
"-msse2",
|
||||
"-Wunused-value",
|
||||
@ -643,7 +657,7 @@ function toolchain(_buildDir, _libDir)
|
||||
"-m64",
|
||||
}
|
||||
|
||||
configuration { "linux-clang", "x32" }
|
||||
configuration { "linux-clang*", "x32" }
|
||||
targetdir (path.join(_buildDir, "linux32_clang/bin"))
|
||||
objdir (path.join(_buildDir, "linux32_clang/obj"))
|
||||
libdirs { path.join(_libDir, "lib/linux32_clang") }
|
||||
@ -651,7 +665,7 @@ function toolchain(_buildDir, _libDir)
|
||||
"-m32",
|
||||
}
|
||||
|
||||
configuration { "linux-clang", "x64" }
|
||||
configuration { "linux-clang*", "x64" }
|
||||
targetdir (path.join(_buildDir, "linux64_clang/bin"))
|
||||
objdir (path.join(_buildDir, "linux64_clang/obj"))
|
||||
libdirs { path.join(_libDir, "lib/linux64_clang") }
|
||||
|
BIN
3rdparty/bx/tools/bin/darwin/genie
vendored
BIN
3rdparty/bx/tools/bin/darwin/genie
vendored
Binary file not shown.
BIN
3rdparty/bx/tools/bin/darwin/ninja
vendored
BIN
3rdparty/bx/tools/bin/darwin/ninja
vendored
Binary file not shown.
BIN
3rdparty/bx/tools/bin/linux/genie
vendored
BIN
3rdparty/bx/tools/bin/linux/genie
vendored
Binary file not shown.
BIN
3rdparty/bx/tools/bin/linux/ninja
vendored
BIN
3rdparty/bx/tools/bin/linux/ninja
vendored
Binary file not shown.
BIN
3rdparty/bx/tools/bin/windows/genie.exe
vendored
BIN
3rdparty/bx/tools/bin/windows/genie.exe
vendored
Binary file not shown.
BIN
3rdparty/bx/tools/bin/windows/ninja.exe
vendored
BIN
3rdparty/bx/tools/bin/windows/ninja.exe
vendored
Binary file not shown.
3
3rdparty/genie/LICENSE
vendored
3
3rdparty/genie/LICENSE
vendored
@ -3,7 +3,8 @@
|
||||
GENie
|
||||
Copyright (c) 2014-2016 Branimir Karadžić, Neil Richardson, Mike Popoloski,
|
||||
Drew Solomon, Ted de Munnik, Miodrag Milanović, Brett Vickers, Bill Freist,
|
||||
Terry Hendrix II, Ryan Juckett, Andrew Johnson, Johan Sköld, Alastair Murray
|
||||
Terry Hendrix II, Ryan Juckett, Andrew Johnson, Johan Sköld, Alastair
|
||||
Murray, Patrick Munns, Jan-Eric Duden, Phil Stevens, Stuart Carnie.
|
||||
All rights reserved.
|
||||
|
||||
https://github.com/bkaradzic/genie
|
||||
|
92
3rdparty/genie/README.md
vendored
92
3rdparty/genie/README.md
vendored
@ -9,8 +9,10 @@ generates project from Lua script, making applying the same settings for
|
||||
multiple projects easy.
|
||||
|
||||
Supported project generators:
|
||||
* Visual Studio 2008, 2010, 2012, 2013, 2015, 15
|
||||
* FASTBuild (experimental)
|
||||
* GNU Makefile
|
||||
* Ninja (experimental)
|
||||
* Visual Studio 2008, 2010, 2012, 2013, 2015, 15
|
||||
* XCode
|
||||
|
||||
Download (stable)
|
||||
@ -18,7 +20,7 @@ Download (stable)
|
||||
|
||||
[](https://travis-ci.org/bkaradzic/GENie)
|
||||
|
||||
version 445 (commit 6798f93ba8ee029b629cfc340e90c653e780d8b1)
|
||||
version 545 (commit 34f239f24d8004777174a375b8f04ff21f2f5b8e)
|
||||
|
||||
Linux:
|
||||
https://github.com/bkaradzic/bx/raw/master/tools/bin/linux/genie
|
||||
@ -41,25 +43,6 @@ Documentation
|
||||
|
||||
[Scripting Reference](https://github.com/bkaradzic/genie/blob/master/docs/scripting-reference.md#scripting-reference)
|
||||
|
||||
Who is using it?
|
||||
----------------
|
||||
|
||||
https://github.com/bkaradzic/bgfx bgfx - Cross-platform, graphics API
|
||||
agnostic, "Bring Your Own Engine/Framework" style rendering library.
|
||||
|
||||
https://github.com/Psybrus/Psybrus Psybrus Engine & Toolchain
|
||||
|
||||
https://github.com/dariomanesku/cmftstudio cmftStudio - cubemap filtering tool
|
||||
|
||||
https://github.com/mamedev/mame MAME - Multiple Arcade Machine Emulator
|
||||
|
||||
http://sol.gfxile.net/soloud SoLoud is an easy to use, free,
|
||||
portable c/c++ audio engine for games.
|
||||
|
||||
https://github.com/andr3wmac/Torque6 Torque 6 is an MIT licensed 3D engine
|
||||
loosely based on Torque2D. Being neither Torque2D or Torque3D it is the 6th
|
||||
derivative of the original Torque Engine.
|
||||
|
||||
History
|
||||
-------
|
||||
|
||||
@ -111,6 +94,68 @@ intention to keep it compatible with it.
|
||||
- Added `NoBufferSecurityCheck` flag to disable security checks in VS.
|
||||
- Added `nopch` file list to exclude files from using PCH.
|
||||
- Added `EnableAVX` and `EnableAVX2` flags to enable enhanced instruction set.
|
||||
- Added FASTBuild (.bff) project generator.
|
||||
- Added Vala language support.
|
||||
- Added MASM support for Visual Studio projects.
|
||||
- Added `userincludedirs` for include header with angle brackets and quotes
|
||||
search path control.
|
||||
- Detect when generated project files are not changing, and skip writing over
|
||||
existing project files.
|
||||
- Added Ninja project generator.
|
||||
|
||||
Debugging GENie scripts
|
||||
-----------------------
|
||||
|
||||
It is possible to debug build scripts using [ZeroBrane Studio][zbs]. You must
|
||||
compile GENie in debug mode
|
||||
|
||||
$ make config=debug
|
||||
|
||||
This ensures the core lua scripts are loaded from disk rather than compiled
|
||||
into the GENie binary. Create a file named `debug.lua` as a sibling to your
|
||||
main `genie.lua` script with the following content:
|
||||
|
||||
local zb_path = <path to ZeroBraneStudio>
|
||||
local cpaths = {
|
||||
string.format("%s/bin/lib?.dylib;%s/bin/clibs53/?.dylib;", zb_path, zb_path),
|
||||
package.cpath,
|
||||
}
|
||||
package.cpath = table.concat(cpaths, ';')
|
||||
|
||||
local paths = {
|
||||
string.format('%s/lualibs/?.lua;%s/lualibs/?/?.lua', zb_path, zb_path),
|
||||
string.format('%s/lualibs/?/init.lua;%s/lualibs/?/?/?.lua', zb_path, zb_path),
|
||||
string.format('%s/lualibs/?/?/init.lua', zb),
|
||||
package.path,
|
||||
}
|
||||
package.path = table.concat(paths, ';')
|
||||
|
||||
require('mobdebug').start()
|
||||
|
||||
**NOTE:** update `zb_path` to refer to the root of your ZeroBrane Studio
|
||||
install. For reference, you should find `lualibs` in you `zb_path` folder
|
||||
|
||||
To debug, make sure ZBS is listening for debug connections and add
|
||||
`dofile("debug.lua")` to `genie.lua`
|
||||
|
||||
Who is using it?
|
||||
----------------
|
||||
|
||||
https://github.com/bkaradzic/bgfx bgfx - Cross-platform, graphics API
|
||||
agnostic, "Bring Your Own Engine/Framework" style rendering library.
|
||||
|
||||
https://github.com/Psybrus/Psybrus Psybrus Engine & Toolchain
|
||||
|
||||
https://github.com/dariomanesku/cmftstudio cmftStudio - cubemap filtering tool
|
||||
|
||||
https://github.com/mamedev/mame MAME - Multiple Arcade Machine Emulator
|
||||
|
||||
http://sol.gfxile.net/soloud SoLoud is an easy to use, free,
|
||||
portable c/c++ audio engine for games.
|
||||
|
||||
https://github.com/andr3wmac/Torque6 Torque 6 is an MIT licensed 3D engine
|
||||
loosely based on Torque2D. Being neither Torque2D or Torque3D it is the 6th
|
||||
derivative of the original Torque Engine.
|
||||
|
||||
[License](https://github.com/bkaradzic/genie/blob/master/LICENSE)
|
||||
-----------------------------------------------------------------
|
||||
@ -118,7 +163,8 @@ intention to keep it compatible with it.
|
||||
GENie
|
||||
Copyright (c) 2014-2016 Branimir Karadžić, Neil Richardson, Mike Popoloski,
|
||||
Drew Solomon, Ted de Munnik, Miodrag Milanović, Brett Vickers, Bill Freist,
|
||||
Terry Hendrix II, Ryan Juckett, Andrew Johnson, Johan Sköld, Alastair Murray
|
||||
Terry Hendrix II, Ryan Juckett, Andrew Johnson, Johan Sköld, Alastair
|
||||
Murray, Patrick Munns, Jan-Eric Duden, Phil Stevens, Stuart Carnie.
|
||||
All rights reserved.
|
||||
|
||||
https://github.com/bkaradzic/genie
|
||||
@ -147,3 +193,5 @@ intention to keep it compatible with it.
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
[zbs]: https://studio.zerobrane.com
|
||||
|
552
3rdparty/genie/build/gmake.darwin/genie.make
vendored
552
3rdparty/genie/build/gmake.darwin/genie.make
vendored
@ -21,7 +21,7 @@ endif
|
||||
ifeq (posix,$(SHELLTYPE))
|
||||
MKDIR = $(SILENT) mkdir -p "$(1)"
|
||||
COPY = $(SILENT) cp -fR "$(1)" "$(2)"
|
||||
RM= $(SILENT) rm -f "$(1)"
|
||||
RM = $(SILENT) rm -f "$(1)"
|
||||
else
|
||||
MKDIR = $(SILENT) mkdir "$(subst /,\\,$(1))" 2> nul || exit 0
|
||||
COPY = $(SILENT) copy /Y "$(subst /,\\,$(1))" "$(subst /,\\,$(2))"
|
||||
@ -41,74 +41,75 @@ ifndef RESCOMP
|
||||
endif
|
||||
|
||||
ifeq ($(config),release)
|
||||
OBJDIR = obj/Release
|
||||
TARGETDIR = ../../bin/darwin
|
||||
override TARGET = $(TARGETDIR)/genie
|
||||
DEFINES += -DNDEBUG -DLUA_COMPAT_MODULE -DLUA_USE_MACOSX
|
||||
INCLUDES += -I../../src/host/lua-5.3.0/src
|
||||
OBJDIR = obj/Release
|
||||
TARGETDIR = ../../bin/darwin
|
||||
override TARGET = $(TARGETDIR)/genie
|
||||
DEFINES += -DNDEBUG -DLUA_COMPAT_MODULE -DLUA_USE_MACOSX
|
||||
INCLUDES += -I../../src/host/lua-5.3.0/src
|
||||
INCLUDES +=
|
||||
ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES)
|
||||
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os -mmacosx-version-min=10.4
|
||||
ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os -mmacosx-version-min=10.4
|
||||
ALL_OBJCFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os -mmacosx-version-min=10.4
|
||||
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
|
||||
ALL_LDFLAGS += $(LDFLAGS) -L. -mmacosx-version-min=10.4
|
||||
LDDEPS +=
|
||||
LIBS += $(LDDEPS) -framework CoreServices
|
||||
LDDEPS +=
|
||||
LIBS += $(LDDEPS) -framework CoreServices
|
||||
EXTERNAL_LIBS +=
|
||||
LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)
|
||||
LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)
|
||||
OBJECTS := \
|
||||
$(OBJDIR)/src/host/os_getcwd.o \
|
||||
$(OBJDIR)/src/host/os_stat.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lapi.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lcode.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lctype.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldo.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldump.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lgc.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/linit.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/liolib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/llex.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lmem.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lobject.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/loslib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lparser.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstate.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstring.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltable.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltm.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lundump.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lvm.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lzio.o \
|
||||
$(OBJDIR)/src/host/os_chdir.o \
|
||||
$(OBJDIR)/src/host/premake_main.o \
|
||||
$(OBJDIR)/src/host/os_uuid.o \
|
||||
$(OBJDIR)/src/host/os_isfile.o \
|
||||
$(OBJDIR)/src/host/os_ticks.o \
|
||||
$(OBJDIR)/src/host/os_copyfile.o \
|
||||
$(OBJDIR)/src/host/os_getcwd.o \
|
||||
$(OBJDIR)/src/host/os_is64bit.o \
|
||||
$(OBJDIR)/src/host/os_isdir.o \
|
||||
$(OBJDIR)/src/host/os_isfile.o \
|
||||
$(OBJDIR)/src/host/os_match.o \
|
||||
$(OBJDIR)/src/host/os_mkdir.o \
|
||||
$(OBJDIR)/src/host/os_pathsearch.o \
|
||||
$(OBJDIR)/src/host/os_rmdir.o \
|
||||
$(OBJDIR)/src/host/os_stat.o \
|
||||
$(OBJDIR)/src/host/os_ticks.o \
|
||||
$(OBJDIR)/src/host/os_uuid.o \
|
||||
$(OBJDIR)/src/host/path_isabsolute.o \
|
||||
$(OBJDIR)/src/host/premake.o \
|
||||
$(OBJDIR)/src/host/premake_main.o \
|
||||
$(OBJDIR)/src/host/scripts.o \
|
||||
$(OBJDIR)/src/host/string_endswith.o \
|
||||
$(OBJDIR)/src/host/string_hash.o \
|
||||
$(OBJDIR)/src/host/os_pathsearch.o \
|
||||
$(OBJDIR)/src/host/os_rmdir.o \
|
||||
$(OBJDIR)/src/host/os_match.o \
|
||||
$(OBJDIR)/src/host/premake.o \
|
||||
$(OBJDIR)/src/host/os_isdir.o \
|
||||
$(OBJDIR)/src/host/os_mkdir.o \
|
||||
$(OBJDIR)/src/host/path_isabsolute.o \
|
||||
$(OBJDIR)/src/host/os_is64bit.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldump.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lvm.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltable.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/liolib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lcode.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lparser.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lzio.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lmem.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lgc.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstring.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/linit.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltm.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lapi.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lctype.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstate.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/llex.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldo.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lundump.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/loslib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lobject.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o \
|
||||
|
||||
define PREBUILDCMDS
|
||||
endef
|
||||
@ -119,74 +120,75 @@ ifeq ($(config),release)
|
||||
endif
|
||||
|
||||
ifeq ($(config),debug)
|
||||
OBJDIR = obj/Debug
|
||||
TARGETDIR = ../../bin/darwin
|
||||
override TARGET = $(TARGETDIR)/genie
|
||||
DEFINES += -D_DEBUG -DLUA_COMPAT_MODULE -DLUA_USE_MACOSX
|
||||
INCLUDES += -I../../src/host/lua-5.3.0/src
|
||||
OBJDIR = obj/Debug
|
||||
TARGETDIR = ../../bin/darwin
|
||||
override TARGET = $(TARGETDIR)/genie
|
||||
DEFINES += -D_DEBUG -DLUA_COMPAT_MODULE -DLUA_USE_MACOSX
|
||||
INCLUDES += -I../../src/host/lua-5.3.0/src
|
||||
INCLUDES +=
|
||||
ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES)
|
||||
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g -mmacosx-version-min=10.4
|
||||
ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g -mmacosx-version-min=10.4
|
||||
ALL_OBJCFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g -mmacosx-version-min=10.4
|
||||
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
|
||||
ALL_LDFLAGS += $(LDFLAGS) -L. -mmacosx-version-min=10.4
|
||||
LDDEPS +=
|
||||
LIBS += $(LDDEPS) -framework CoreServices
|
||||
LDDEPS +=
|
||||
LIBS += $(LDDEPS) -framework CoreServices
|
||||
EXTERNAL_LIBS +=
|
||||
LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)
|
||||
LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)
|
||||
OBJECTS := \
|
||||
$(OBJDIR)/src/host/os_getcwd.o \
|
||||
$(OBJDIR)/src/host/os_stat.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lapi.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lcode.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lctype.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldo.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldump.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lgc.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/linit.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/liolib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/llex.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lmem.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lobject.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/loslib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lparser.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstate.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstring.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltable.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltm.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lundump.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lvm.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lzio.o \
|
||||
$(OBJDIR)/src/host/os_chdir.o \
|
||||
$(OBJDIR)/src/host/premake_main.o \
|
||||
$(OBJDIR)/src/host/os_uuid.o \
|
||||
$(OBJDIR)/src/host/os_isfile.o \
|
||||
$(OBJDIR)/src/host/os_ticks.o \
|
||||
$(OBJDIR)/src/host/os_copyfile.o \
|
||||
$(OBJDIR)/src/host/os_getcwd.o \
|
||||
$(OBJDIR)/src/host/os_is64bit.o \
|
||||
$(OBJDIR)/src/host/os_isdir.o \
|
||||
$(OBJDIR)/src/host/os_isfile.o \
|
||||
$(OBJDIR)/src/host/os_match.o \
|
||||
$(OBJDIR)/src/host/os_mkdir.o \
|
||||
$(OBJDIR)/src/host/os_pathsearch.o \
|
||||
$(OBJDIR)/src/host/os_rmdir.o \
|
||||
$(OBJDIR)/src/host/os_stat.o \
|
||||
$(OBJDIR)/src/host/os_ticks.o \
|
||||
$(OBJDIR)/src/host/os_uuid.o \
|
||||
$(OBJDIR)/src/host/path_isabsolute.o \
|
||||
$(OBJDIR)/src/host/premake.o \
|
||||
$(OBJDIR)/src/host/premake_main.o \
|
||||
$(OBJDIR)/src/host/scripts.o \
|
||||
$(OBJDIR)/src/host/string_endswith.o \
|
||||
$(OBJDIR)/src/host/string_hash.o \
|
||||
$(OBJDIR)/src/host/os_pathsearch.o \
|
||||
$(OBJDIR)/src/host/os_rmdir.o \
|
||||
$(OBJDIR)/src/host/os_match.o \
|
||||
$(OBJDIR)/src/host/premake.o \
|
||||
$(OBJDIR)/src/host/os_isdir.o \
|
||||
$(OBJDIR)/src/host/os_mkdir.o \
|
||||
$(OBJDIR)/src/host/path_isabsolute.o \
|
||||
$(OBJDIR)/src/host/os_is64bit.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldump.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lvm.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltable.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/liolib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lcode.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lparser.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lzio.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lmem.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lgc.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstring.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/linit.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltm.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lapi.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lctype.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstate.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/llex.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldo.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lundump.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/loslib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lobject.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o \
|
||||
|
||||
define PREBUILDCMDS
|
||||
endef
|
||||
@ -198,74 +200,75 @@ endif
|
||||
|
||||
ifeq ($(config),releaseuniv32)
|
||||
AR = libtool
|
||||
OBJDIR = obj/Universal32/Release
|
||||
TARGETDIR = ../../bin/darwin
|
||||
override TARGET = $(TARGETDIR)/genie
|
||||
DEFINES += -DNDEBUG -DLUA_COMPAT_MODULE -DLUA_USE_MACOSX
|
||||
INCLUDES += -I../../src/host/lua-5.3.0/src
|
||||
OBJDIR = obj/Universal32/Release
|
||||
TARGETDIR = ../../bin/darwin
|
||||
override TARGET = $(TARGETDIR)/genie
|
||||
DEFINES += -DNDEBUG -DLUA_COMPAT_MODULE -DLUA_USE_MACOSX
|
||||
INCLUDES += -I../../src/host/lua-5.3.0/src
|
||||
INCLUDES +=
|
||||
ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES)
|
||||
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os -arch i386 -arch ppc -mmacosx-version-min=10.4
|
||||
ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os -arch i386 -arch ppc -mmacosx-version-min=10.4
|
||||
ALL_OBJCFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os -arch i386 -arch ppc -mmacosx-version-min=10.4
|
||||
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
|
||||
ALL_LDFLAGS += $(LDFLAGS) -L. -arch i386 -arch ppc -mmacosx-version-min=10.4
|
||||
LDDEPS +=
|
||||
LIBS += $(LDDEPS) -framework CoreServices
|
||||
LDDEPS +=
|
||||
LIBS += $(LDDEPS) -framework CoreServices
|
||||
EXTERNAL_LIBS +=
|
||||
LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)
|
||||
LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)
|
||||
OBJECTS := \
|
||||
$(OBJDIR)/src/host/os_getcwd.o \
|
||||
$(OBJDIR)/src/host/os_stat.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lapi.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lcode.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lctype.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldo.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldump.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lgc.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/linit.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/liolib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/llex.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lmem.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lobject.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/loslib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lparser.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstate.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstring.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltable.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltm.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lundump.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lvm.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lzio.o \
|
||||
$(OBJDIR)/src/host/os_chdir.o \
|
||||
$(OBJDIR)/src/host/premake_main.o \
|
||||
$(OBJDIR)/src/host/os_uuid.o \
|
||||
$(OBJDIR)/src/host/os_isfile.o \
|
||||
$(OBJDIR)/src/host/os_ticks.o \
|
||||
$(OBJDIR)/src/host/os_copyfile.o \
|
||||
$(OBJDIR)/src/host/os_getcwd.o \
|
||||
$(OBJDIR)/src/host/os_is64bit.o \
|
||||
$(OBJDIR)/src/host/os_isdir.o \
|
||||
$(OBJDIR)/src/host/os_isfile.o \
|
||||
$(OBJDIR)/src/host/os_match.o \
|
||||
$(OBJDIR)/src/host/os_mkdir.o \
|
||||
$(OBJDIR)/src/host/os_pathsearch.o \
|
||||
$(OBJDIR)/src/host/os_rmdir.o \
|
||||
$(OBJDIR)/src/host/os_stat.o \
|
||||
$(OBJDIR)/src/host/os_ticks.o \
|
||||
$(OBJDIR)/src/host/os_uuid.o \
|
||||
$(OBJDIR)/src/host/path_isabsolute.o \
|
||||
$(OBJDIR)/src/host/premake.o \
|
||||
$(OBJDIR)/src/host/premake_main.o \
|
||||
$(OBJDIR)/src/host/scripts.o \
|
||||
$(OBJDIR)/src/host/string_endswith.o \
|
||||
$(OBJDIR)/src/host/string_hash.o \
|
||||
$(OBJDIR)/src/host/os_pathsearch.o \
|
||||
$(OBJDIR)/src/host/os_rmdir.o \
|
||||
$(OBJDIR)/src/host/os_match.o \
|
||||
$(OBJDIR)/src/host/premake.o \
|
||||
$(OBJDIR)/src/host/os_isdir.o \
|
||||
$(OBJDIR)/src/host/os_mkdir.o \
|
||||
$(OBJDIR)/src/host/path_isabsolute.o \
|
||||
$(OBJDIR)/src/host/os_is64bit.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldump.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lvm.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltable.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/liolib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lcode.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lparser.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lzio.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lmem.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lgc.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstring.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/linit.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltm.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lapi.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lctype.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstate.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/llex.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldo.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lundump.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/loslib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lobject.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o \
|
||||
|
||||
define PREBUILDCMDS
|
||||
endef
|
||||
@ -277,74 +280,75 @@ endif
|
||||
|
||||
ifeq ($(config),debuguniv32)
|
||||
AR = libtool
|
||||
OBJDIR = obj/Universal32/Debug
|
||||
TARGETDIR = ../../bin/darwin
|
||||
override TARGET = $(TARGETDIR)/genie
|
||||
DEFINES += -D_DEBUG -DLUA_COMPAT_MODULE -DLUA_USE_MACOSX
|
||||
INCLUDES += -I../../src/host/lua-5.3.0/src
|
||||
OBJDIR = obj/Universal32/Debug
|
||||
TARGETDIR = ../../bin/darwin
|
||||
override TARGET = $(TARGETDIR)/genie
|
||||
DEFINES += -D_DEBUG -DLUA_COMPAT_MODULE -DLUA_USE_MACOSX
|
||||
INCLUDES += -I../../src/host/lua-5.3.0/src
|
||||
INCLUDES +=
|
||||
ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES)
|
||||
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g -arch i386 -arch ppc -mmacosx-version-min=10.4
|
||||
ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g -arch i386 -arch ppc -mmacosx-version-min=10.4
|
||||
ALL_OBJCFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g -arch i386 -arch ppc -mmacosx-version-min=10.4
|
||||
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
|
||||
ALL_LDFLAGS += $(LDFLAGS) -L. -arch i386 -arch ppc -mmacosx-version-min=10.4
|
||||
LDDEPS +=
|
||||
LIBS += $(LDDEPS) -framework CoreServices
|
||||
LDDEPS +=
|
||||
LIBS += $(LDDEPS) -framework CoreServices
|
||||
EXTERNAL_LIBS +=
|
||||
LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)
|
||||
LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)
|
||||
OBJECTS := \
|
||||
$(OBJDIR)/src/host/os_getcwd.o \
|
||||
$(OBJDIR)/src/host/os_stat.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lapi.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lcode.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lctype.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldo.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldump.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lgc.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/linit.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/liolib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/llex.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lmem.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lobject.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/loslib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lparser.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstate.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstring.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltable.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltm.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lundump.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lvm.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lzio.o \
|
||||
$(OBJDIR)/src/host/os_chdir.o \
|
||||
$(OBJDIR)/src/host/premake_main.o \
|
||||
$(OBJDIR)/src/host/os_uuid.o \
|
||||
$(OBJDIR)/src/host/os_isfile.o \
|
||||
$(OBJDIR)/src/host/os_ticks.o \
|
||||
$(OBJDIR)/src/host/os_copyfile.o \
|
||||
$(OBJDIR)/src/host/os_getcwd.o \
|
||||
$(OBJDIR)/src/host/os_is64bit.o \
|
||||
$(OBJDIR)/src/host/os_isdir.o \
|
||||
$(OBJDIR)/src/host/os_isfile.o \
|
||||
$(OBJDIR)/src/host/os_match.o \
|
||||
$(OBJDIR)/src/host/os_mkdir.o \
|
||||
$(OBJDIR)/src/host/os_pathsearch.o \
|
||||
$(OBJDIR)/src/host/os_rmdir.o \
|
||||
$(OBJDIR)/src/host/os_stat.o \
|
||||
$(OBJDIR)/src/host/os_ticks.o \
|
||||
$(OBJDIR)/src/host/os_uuid.o \
|
||||
$(OBJDIR)/src/host/path_isabsolute.o \
|
||||
$(OBJDIR)/src/host/premake.o \
|
||||
$(OBJDIR)/src/host/premake_main.o \
|
||||
$(OBJDIR)/src/host/scripts.o \
|
||||
$(OBJDIR)/src/host/string_endswith.o \
|
||||
$(OBJDIR)/src/host/string_hash.o \
|
||||
$(OBJDIR)/src/host/os_pathsearch.o \
|
||||
$(OBJDIR)/src/host/os_rmdir.o \
|
||||
$(OBJDIR)/src/host/os_match.o \
|
||||
$(OBJDIR)/src/host/premake.o \
|
||||
$(OBJDIR)/src/host/os_isdir.o \
|
||||
$(OBJDIR)/src/host/os_mkdir.o \
|
||||
$(OBJDIR)/src/host/path_isabsolute.o \
|
||||
$(OBJDIR)/src/host/os_is64bit.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldump.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lvm.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltable.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/liolib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lcode.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lparser.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lzio.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lmem.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lgc.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstring.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/linit.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltm.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lapi.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lctype.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstate.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/llex.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldo.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lundump.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/loslib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lobject.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o \
|
||||
|
||||
define PREBUILDCMDS
|
||||
endef
|
||||
@ -356,8 +360,8 @@ endif
|
||||
|
||||
OBJDIRS := \
|
||||
$(OBJDIR) \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src \
|
||||
$(OBJDIR)/src/host \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src \
|
||||
|
||||
RESOURCES := \
|
||||
|
||||
@ -401,211 +405,211 @@ $(GCH): $(PCH) | $(OBJDIR)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) -x c-header $(DEFINES) $(INCLUDES) -o "$@" -c "$<"
|
||||
endif
|
||||
|
||||
$(OBJDIR)/src/host/os_getcwd.o: ../../src/host/os_getcwd.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lapi.o: ../../src/host/lua-5.3.0/src/lapi.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/os_stat.o: ../../src/host/os_stat.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o: ../../src/host/lua-5.3.0/src/lauxlib.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/os_chdir.o: ../../src/host/os_chdir.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o: ../../src/host/lua-5.3.0/src/lbaselib.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/premake_main.o: ../../src/host/premake_main.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o: ../../src/host/lua-5.3.0/src/lbitlib.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/os_uuid.o: ../../src/host/os_uuid.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lcode.o: ../../src/host/lua-5.3.0/src/lcode.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/os_isfile.o: ../../src/host/os_isfile.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o: ../../src/host/lua-5.3.0/src/lcorolib.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/os_ticks.o: ../../src/host/os_ticks.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lctype.o: ../../src/host/lua-5.3.0/src/lctype.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/os_copyfile.o: ../../src/host/os_copyfile.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o: ../../src/host/lua-5.3.0/src/ldblib.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/scripts.o: ../../src/host/scripts.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o: ../../src/host/lua-5.3.0/src/ldebug.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/string_endswith.o: ../../src/host/string_endswith.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldo.o: ../../src/host/lua-5.3.0/src/ldo.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/string_hash.o: ../../src/host/string_hash.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldump.o: ../../src/host/lua-5.3.0/src/ldump.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/os_pathsearch.o: ../../src/host/os_pathsearch.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o: ../../src/host/lua-5.3.0/src/lfunc.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/os_rmdir.o: ../../src/host/os_rmdir.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lgc.o: ../../src/host/lua-5.3.0/src/lgc.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/os_match.o: ../../src/host/os_match.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/linit.o: ../../src/host/lua-5.3.0/src/linit.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/premake.o: ../../src/host/premake.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/liolib.o: ../../src/host/lua-5.3.0/src/liolib.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/os_isdir.o: ../../src/host/os_isdir.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/llex.o: ../../src/host/lua-5.3.0/src/llex.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/os_mkdir.o: ../../src/host/os_mkdir.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o: ../../src/host/lua-5.3.0/src/lmathlib.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/path_isabsolute.o: ../../src/host/path_isabsolute.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lmem.o: ../../src/host/lua-5.3.0/src/lmem.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/os_is64bit.o: ../../src/host/os_is64bit.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o: ../../src/host/lua-5.3.0/src/loadlib.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldump.o: ../../src/host/lua-5.3.0/src/ldump.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lobject.o: ../../src/host/lua-5.3.0/src/lobject.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lvm.o: ../../src/host/lua-5.3.0/src/lvm.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o: ../../src/host/lua-5.3.0/src/lopcodes.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltable.o: ../../src/host/lua-5.3.0/src/ltable.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/loslib.o: ../../src/host/lua-5.3.0/src/loslib.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o: ../../src/host/lua-5.3.0/src/lstrlib.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lparser.o: ../../src/host/lua-5.3.0/src/lparser.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/liolib.o: ../../src/host/lua-5.3.0/src/liolib.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstate.o: ../../src/host/lua-5.3.0/src/lstate.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lcode.o: ../../src/host/lua-5.3.0/src/lcode.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstring.o: ../../src/host/lua-5.3.0/src/lstring.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lparser.o: ../../src/host/lua-5.3.0/src/lparser.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o: ../../src/host/lua-5.3.0/src/lstrlib.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o: ../../src/host/lua-5.3.0/src/loadlib.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltable.o: ../../src/host/lua-5.3.0/src/ltable.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o: ../../src/host/lua-5.3.0/src/lbitlib.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o: ../../src/host/lua-5.3.0/src/ltablib.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lzio.o: ../../src/host/lua-5.3.0/src/lzio.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltm.o: ../../src/host/lua-5.3.0/src/ltm.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o: ../../src/host/lua-5.3.0/src/ldblib.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lundump.o: ../../src/host/lua-5.3.0/src/lundump.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o: ../../src/host/lua-5.3.0/src/lmathlib.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o: ../../src/host/lua-5.3.0/src/lutf8lib.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o: ../../src/host/lua-5.3.0/src/lfunc.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lvm.o: ../../src/host/lua-5.3.0/src/lvm.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lmem.o: ../../src/host/lua-5.3.0/src/lmem.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lzio.o: ../../src/host/lua-5.3.0/src/lzio.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lgc.o: ../../src/host/lua-5.3.0/src/lgc.c $(GCH)
|
||||
$(OBJDIR)/src/host/os_chdir.o: ../../src/host/os_chdir.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstring.o: ../../src/host/lua-5.3.0/src/lstring.c $(GCH)
|
||||
$(OBJDIR)/src/host/os_copyfile.o: ../../src/host/os_copyfile.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/linit.o: ../../src/host/lua-5.3.0/src/linit.c $(GCH)
|
||||
$(OBJDIR)/src/host/os_getcwd.o: ../../src/host/os_getcwd.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltm.o: ../../src/host/lua-5.3.0/src/ltm.c $(GCH)
|
||||
$(OBJDIR)/src/host/os_is64bit.o: ../../src/host/os_is64bit.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lapi.o: ../../src/host/lua-5.3.0/src/lapi.c $(GCH)
|
||||
$(OBJDIR)/src/host/os_isdir.o: ../../src/host/os_isdir.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lctype.o: ../../src/host/lua-5.3.0/src/lctype.c $(GCH)
|
||||
$(OBJDIR)/src/host/os_isfile.o: ../../src/host/os_isfile.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstate.o: ../../src/host/lua-5.3.0/src/lstate.c $(GCH)
|
||||
$(OBJDIR)/src/host/os_match.o: ../../src/host/os_match.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o: ../../src/host/lua-5.3.0/src/lbaselib.c $(GCH)
|
||||
$(OBJDIR)/src/host/os_mkdir.o: ../../src/host/os_mkdir.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o: ../../src/host/lua-5.3.0/src/ltablib.c $(GCH)
|
||||
$(OBJDIR)/src/host/os_pathsearch.o: ../../src/host/os_pathsearch.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o: ../../src/host/lua-5.3.0/src/lauxlib.c $(GCH)
|
||||
$(OBJDIR)/src/host/os_rmdir.o: ../../src/host/os_rmdir.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o: ../../src/host/lua-5.3.0/src/lcorolib.c $(GCH)
|
||||
$(OBJDIR)/src/host/os_stat.o: ../../src/host/os_stat.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/llex.o: ../../src/host/lua-5.3.0/src/llex.c $(GCH)
|
||||
$(OBJDIR)/src/host/os_ticks.o: ../../src/host/os_ticks.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldo.o: ../../src/host/lua-5.3.0/src/ldo.c $(GCH)
|
||||
$(OBJDIR)/src/host/os_uuid.o: ../../src/host/os_uuid.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lundump.o: ../../src/host/lua-5.3.0/src/lundump.c $(GCH)
|
||||
$(OBJDIR)/src/host/path_isabsolute.o: ../../src/host/path_isabsolute.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o: ../../src/host/lua-5.3.0/src/lopcodes.c $(GCH)
|
||||
$(OBJDIR)/src/host/premake.o: ../../src/host/premake.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o: ../../src/host/lua-5.3.0/src/lutf8lib.c $(GCH)
|
||||
$(OBJDIR)/src/host/premake_main.o: ../../src/host/premake_main.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/loslib.o: ../../src/host/lua-5.3.0/src/loslib.c $(GCH)
|
||||
$(OBJDIR)/src/host/scripts.o: ../../src/host/scripts.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lobject.o: ../../src/host/lua-5.3.0/src/lobject.c $(GCH)
|
||||
$(OBJDIR)/src/host/string_endswith.o: ../../src/host/string_endswith.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o: ../../src/host/lua-5.3.0/src/ldebug.c $(GCH)
|
||||
$(OBJDIR)/src/host/string_hash.o: ../../src/host/string_hash.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
|
@ -14,11 +14,14 @@ endif
|
||||
ifeq (/bin,$(findstring /bin,$(SHELL)))
|
||||
SHELLTYPE := posix
|
||||
endif
|
||||
ifeq (/bin,$(findstring /bin,$(MAKESHELL)))
|
||||
SHELLTYPE := posix
|
||||
endif
|
||||
|
||||
ifeq (posix,$(SHELLTYPE))
|
||||
MKDIR = $(SILENT) mkdir -p "$(1)"
|
||||
COPY = $(SILENT) cp -fR "$(1)" "$(2)"
|
||||
RM= $(SILENT) rm -f "$(1)"
|
||||
RM = $(SILENT) rm -f "$(1)"
|
||||
else
|
||||
MKDIR = $(SILENT) mkdir "$(subst /,\\,$(1))" 2> nul || exit 0
|
||||
COPY = $(SILENT) copy /Y "$(subst /,\\,$(1))" "$(subst /,\\,$(2))"
|
||||
@ -38,40 +41,23 @@ ifndef RESCOMP
|
||||
endif
|
||||
|
||||
ifeq ($(config),release)
|
||||
OBJDIR = obj/Release
|
||||
TARGETDIR = ../../bin/bsd
|
||||
override TARGET = $(TARGETDIR)/genie
|
||||
DEFINES += -DNDEBUG -DLUA_COMPAT_MODULE -DLUA_USE_POSIX -DLUA_USE_DLOPEN
|
||||
INCLUDES += -I../../src/host/lua-5.3.0/src
|
||||
ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
|
||||
OBJDIR = obj/Release
|
||||
TARGETDIR = ../../bin/bsd
|
||||
override TARGET = $(TARGETDIR)/genie
|
||||
DEFINES += -DNDEBUG -DLUA_COMPAT_MODULE -DLUA_USE_POSIX -DLUA_USE_DLOPEN
|
||||
INCLUDES += -I../../src/host/lua-5.3.0/src
|
||||
INCLUDES +=
|
||||
ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES)
|
||||
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os
|
||||
ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os
|
||||
ALL_OBJCFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os
|
||||
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
|
||||
ALL_LDFLAGS += $(LDFLAGS) -L. -s -rdynamic
|
||||
LDDEPS +=
|
||||
LIBS += $(LDDEPS) -lm
|
||||
LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)
|
||||
LDDEPS +=
|
||||
LIBS += $(LDDEPS) -lm
|
||||
EXTERNAL_LIBS +=
|
||||
LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)
|
||||
OBJECTS := \
|
||||
$(OBJDIR)/src/host/os_chdir.o \
|
||||
$(OBJDIR)/src/host/os_copyfile.o \
|
||||
$(OBJDIR)/src/host/os_getcwd.o \
|
||||
$(OBJDIR)/src/host/os_is64bit.o \
|
||||
$(OBJDIR)/src/host/os_isdir.o \
|
||||
$(OBJDIR)/src/host/os_isfile.o \
|
||||
$(OBJDIR)/src/host/os_match.o \
|
||||
$(OBJDIR)/src/host/os_mkdir.o \
|
||||
$(OBJDIR)/src/host/os_pathsearch.o \
|
||||
$(OBJDIR)/src/host/os_rmdir.o \
|
||||
$(OBJDIR)/src/host/os_stat.o \
|
||||
$(OBJDIR)/src/host/os_ticks.o \
|
||||
$(OBJDIR)/src/host/os_uuid.o \
|
||||
$(OBJDIR)/src/host/path_isabsolute.o \
|
||||
$(OBJDIR)/src/host/premake.o \
|
||||
$(OBJDIR)/src/host/premake_main.o \
|
||||
$(OBJDIR)/src/host/scripts.o \
|
||||
$(OBJDIR)/src/host/string_endswith.o \
|
||||
$(OBJDIR)/src/host/string_hash.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lapi.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o \
|
||||
@ -105,6 +91,25 @@ ifeq ($(config),release)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lvm.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lzio.o \
|
||||
$(OBJDIR)/src/host/os_chdir.o \
|
||||
$(OBJDIR)/src/host/os_copyfile.o \
|
||||
$(OBJDIR)/src/host/os_getcwd.o \
|
||||
$(OBJDIR)/src/host/os_is64bit.o \
|
||||
$(OBJDIR)/src/host/os_isdir.o \
|
||||
$(OBJDIR)/src/host/os_isfile.o \
|
||||
$(OBJDIR)/src/host/os_match.o \
|
||||
$(OBJDIR)/src/host/os_mkdir.o \
|
||||
$(OBJDIR)/src/host/os_pathsearch.o \
|
||||
$(OBJDIR)/src/host/os_rmdir.o \
|
||||
$(OBJDIR)/src/host/os_stat.o \
|
||||
$(OBJDIR)/src/host/os_ticks.o \
|
||||
$(OBJDIR)/src/host/os_uuid.o \
|
||||
$(OBJDIR)/src/host/path_isabsolute.o \
|
||||
$(OBJDIR)/src/host/premake.o \
|
||||
$(OBJDIR)/src/host/premake_main.o \
|
||||
$(OBJDIR)/src/host/scripts.o \
|
||||
$(OBJDIR)/src/host/string_endswith.o \
|
||||
$(OBJDIR)/src/host/string_hash.o \
|
||||
|
||||
define PREBUILDCMDS
|
||||
endef
|
||||
@ -115,40 +120,23 @@ ifeq ($(config),release)
|
||||
endif
|
||||
|
||||
ifeq ($(config),debug)
|
||||
OBJDIR = obj/Debug
|
||||
TARGETDIR = ../../bin/bsd
|
||||
override TARGET = $(TARGETDIR)/genie
|
||||
DEFINES += -D_DEBUG -DLUA_COMPAT_MODULE -DLUA_USE_POSIX -DLUA_USE_DLOPEN
|
||||
INCLUDES += -I../../src/host/lua-5.3.0/src
|
||||
ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES)
|
||||
OBJDIR = obj/Debug
|
||||
TARGETDIR = ../../bin/bsd
|
||||
override TARGET = $(TARGETDIR)/genie
|
||||
DEFINES += -D_DEBUG -DLUA_COMPAT_MODULE -DLUA_USE_POSIX -DLUA_USE_DLOPEN
|
||||
INCLUDES += -I../../src/host/lua-5.3.0/src
|
||||
INCLUDES +=
|
||||
ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES)
|
||||
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g
|
||||
ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g
|
||||
ALL_OBJCFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g
|
||||
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
|
||||
ALL_LDFLAGS += $(LDFLAGS) -L. -rdynamic
|
||||
LDDEPS +=
|
||||
LIBS += $(LDDEPS) -lm
|
||||
LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)
|
||||
LDDEPS +=
|
||||
LIBS += $(LDDEPS) -lm
|
||||
EXTERNAL_LIBS +=
|
||||
LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)
|
||||
OBJECTS := \
|
||||
$(OBJDIR)/src/host/os_chdir.o \
|
||||
$(OBJDIR)/src/host/os_copyfile.o \
|
||||
$(OBJDIR)/src/host/os_getcwd.o \
|
||||
$(OBJDIR)/src/host/os_is64bit.o \
|
||||
$(OBJDIR)/src/host/os_isdir.o \
|
||||
$(OBJDIR)/src/host/os_isfile.o \
|
||||
$(OBJDIR)/src/host/os_match.o \
|
||||
$(OBJDIR)/src/host/os_mkdir.o \
|
||||
$(OBJDIR)/src/host/os_pathsearch.o \
|
||||
$(OBJDIR)/src/host/os_rmdir.o \
|
||||
$(OBJDIR)/src/host/os_stat.o \
|
||||
$(OBJDIR)/src/host/os_ticks.o \
|
||||
$(OBJDIR)/src/host/os_uuid.o \
|
||||
$(OBJDIR)/src/host/path_isabsolute.o \
|
||||
$(OBJDIR)/src/host/premake.o \
|
||||
$(OBJDIR)/src/host/premake_main.o \
|
||||
$(OBJDIR)/src/host/scripts.o \
|
||||
$(OBJDIR)/src/host/string_endswith.o \
|
||||
$(OBJDIR)/src/host/string_hash.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lapi.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o \
|
||||
@ -182,6 +170,25 @@ ifeq ($(config),debug)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lvm.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lzio.o \
|
||||
$(OBJDIR)/src/host/os_chdir.o \
|
||||
$(OBJDIR)/src/host/os_copyfile.o \
|
||||
$(OBJDIR)/src/host/os_getcwd.o \
|
||||
$(OBJDIR)/src/host/os_is64bit.o \
|
||||
$(OBJDIR)/src/host/os_isdir.o \
|
||||
$(OBJDIR)/src/host/os_isfile.o \
|
||||
$(OBJDIR)/src/host/os_match.o \
|
||||
$(OBJDIR)/src/host/os_mkdir.o \
|
||||
$(OBJDIR)/src/host/os_pathsearch.o \
|
||||
$(OBJDIR)/src/host/os_rmdir.o \
|
||||
$(OBJDIR)/src/host/os_stat.o \
|
||||
$(OBJDIR)/src/host/os_ticks.o \
|
||||
$(OBJDIR)/src/host/os_uuid.o \
|
||||
$(OBJDIR)/src/host/path_isabsolute.o \
|
||||
$(OBJDIR)/src/host/premake.o \
|
||||
$(OBJDIR)/src/host/premake_main.o \
|
||||
$(OBJDIR)/src/host/scripts.o \
|
||||
$(OBJDIR)/src/host/string_endswith.o \
|
||||
$(OBJDIR)/src/host/string_hash.o \
|
||||
|
||||
define PREBUILDCMDS
|
||||
endef
|
||||
@ -193,17 +200,17 @@ endif
|
||||
|
||||
OBJDIRS := \
|
||||
$(OBJDIR) \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src \
|
||||
$(OBJDIR)/src/host \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src \
|
||||
|
||||
RESOURCES := \
|
||||
|
||||
.PHONY: clean prebuild prelink
|
||||
|
||||
all: $(TARGETDIR) $(OBJDIRS) prebuild prelink $(TARGET)
|
||||
all: $(OBJDIRS) prebuild prelink $(TARGET) | $(TARGETDIR)
|
||||
@:
|
||||
|
||||
$(TARGET): $(GCH) $(OBJECTS) $(LDDEPS) $(RESOURCES)
|
||||
$(TARGET): $(GCH) $(OBJECTS) $(LDDEPS) $(EXTERNAL_LIBS) $(RESOURCES) | $(TARGETDIR) $(OBJDIRS)
|
||||
@echo Linking genie
|
||||
$(SILENT) $(LINKCMD)
|
||||
$(POSTBUILDCMDS)
|
||||
@ -233,218 +240,218 @@ prelink:
|
||||
$(PRELINKCMDS)
|
||||
|
||||
ifneq (,$(PCH))
|
||||
$(GCH): $(PCH)
|
||||
$(GCH): $(PCH) | $(OBJDIR)
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) -x c-header $(ALL_CFLAGS) -MMD -MP $(DEFINES) $(INCLUDES) -o "$@" -MF "$(@:%.gch=%.d)" -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) -x c-header $(DEFINES) $(INCLUDES) -o "$@" -c "$<"
|
||||
endif
|
||||
|
||||
$(OBJDIR)/src/host/os_chdir.o: ../../src/host/os_chdir.c
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lapi.o: ../../src/host/lua-5.3.0/src/lapi.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/os_copyfile.o: ../../src/host/os_copyfile.c
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o: ../../src/host/lua-5.3.0/src/lauxlib.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/os_getcwd.o: ../../src/host/os_getcwd.c
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o: ../../src/host/lua-5.3.0/src/lbaselib.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/os_is64bit.o: ../../src/host/os_is64bit.c
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o: ../../src/host/lua-5.3.0/src/lbitlib.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/os_isdir.o: ../../src/host/os_isdir.c
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lcode.o: ../../src/host/lua-5.3.0/src/lcode.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/os_isfile.o: ../../src/host/os_isfile.c
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o: ../../src/host/lua-5.3.0/src/lcorolib.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/os_match.o: ../../src/host/os_match.c
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lctype.o: ../../src/host/lua-5.3.0/src/lctype.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/os_mkdir.o: ../../src/host/os_mkdir.c
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o: ../../src/host/lua-5.3.0/src/ldblib.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/os_pathsearch.o: ../../src/host/os_pathsearch.c
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o: ../../src/host/lua-5.3.0/src/ldebug.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/os_rmdir.o: ../../src/host/os_rmdir.c
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldo.o: ../../src/host/lua-5.3.0/src/ldo.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/os_stat.o: ../../src/host/os_stat.c
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldump.o: ../../src/host/lua-5.3.0/src/ldump.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/os_ticks.o: ../../src/host/os_ticks.c
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o: ../../src/host/lua-5.3.0/src/lfunc.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/os_uuid.o: ../../src/host/os_uuid.c
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lgc.o: ../../src/host/lua-5.3.0/src/lgc.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/path_isabsolute.o: ../../src/host/path_isabsolute.c
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/linit.o: ../../src/host/lua-5.3.0/src/linit.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/premake.o: ../../src/host/premake.c
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/liolib.o: ../../src/host/lua-5.3.0/src/liolib.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/premake_main.o: ../../src/host/premake_main.c
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/llex.o: ../../src/host/lua-5.3.0/src/llex.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/scripts.o: ../../src/host/scripts.c
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o: ../../src/host/lua-5.3.0/src/lmathlib.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/string_endswith.o: ../../src/host/string_endswith.c
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lmem.o: ../../src/host/lua-5.3.0/src/lmem.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/string_hash.o: ../../src/host/string_hash.c
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o: ../../src/host/lua-5.3.0/src/loadlib.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lapi.o: ../../src/host/lua-5.3.0/src/lapi.c
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lobject.o: ../../src/host/lua-5.3.0/src/lobject.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o: ../../src/host/lua-5.3.0/src/lauxlib.c
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o: ../../src/host/lua-5.3.0/src/lopcodes.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o: ../../src/host/lua-5.3.0/src/lbaselib.c
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/loslib.o: ../../src/host/lua-5.3.0/src/loslib.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o: ../../src/host/lua-5.3.0/src/lbitlib.c
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lparser.o: ../../src/host/lua-5.3.0/src/lparser.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lcode.o: ../../src/host/lua-5.3.0/src/lcode.c
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstate.o: ../../src/host/lua-5.3.0/src/lstate.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o: ../../src/host/lua-5.3.0/src/lcorolib.c
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstring.o: ../../src/host/lua-5.3.0/src/lstring.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lctype.o: ../../src/host/lua-5.3.0/src/lctype.c
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o: ../../src/host/lua-5.3.0/src/lstrlib.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o: ../../src/host/lua-5.3.0/src/ldblib.c
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltable.o: ../../src/host/lua-5.3.0/src/ltable.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o: ../../src/host/lua-5.3.0/src/ldebug.c
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o: ../../src/host/lua-5.3.0/src/ltablib.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldo.o: ../../src/host/lua-5.3.0/src/ldo.c
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltm.o: ../../src/host/lua-5.3.0/src/ltm.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldump.o: ../../src/host/lua-5.3.0/src/ldump.c
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lundump.o: ../../src/host/lua-5.3.0/src/lundump.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o: ../../src/host/lua-5.3.0/src/lfunc.c
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o: ../../src/host/lua-5.3.0/src/lutf8lib.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lgc.o: ../../src/host/lua-5.3.0/src/lgc.c
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lvm.o: ../../src/host/lua-5.3.0/src/lvm.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/linit.o: ../../src/host/lua-5.3.0/src/linit.c
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lzio.o: ../../src/host/lua-5.3.0/src/lzio.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/liolib.o: ../../src/host/lua-5.3.0/src/liolib.c
|
||||
$(OBJDIR)/src/host/os_chdir.o: ../../src/host/os_chdir.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/llex.o: ../../src/host/lua-5.3.0/src/llex.c
|
||||
$(OBJDIR)/src/host/os_copyfile.o: ../../src/host/os_copyfile.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o: ../../src/host/lua-5.3.0/src/lmathlib.c
|
||||
$(OBJDIR)/src/host/os_getcwd.o: ../../src/host/os_getcwd.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lmem.o: ../../src/host/lua-5.3.0/src/lmem.c
|
||||
$(OBJDIR)/src/host/os_is64bit.o: ../../src/host/os_is64bit.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o: ../../src/host/lua-5.3.0/src/loadlib.c
|
||||
$(OBJDIR)/src/host/os_isdir.o: ../../src/host/os_isdir.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lobject.o: ../../src/host/lua-5.3.0/src/lobject.c
|
||||
$(OBJDIR)/src/host/os_isfile.o: ../../src/host/os_isfile.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o: ../../src/host/lua-5.3.0/src/lopcodes.c
|
||||
$(OBJDIR)/src/host/os_match.o: ../../src/host/os_match.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/loslib.o: ../../src/host/lua-5.3.0/src/loslib.c
|
||||
$(OBJDIR)/src/host/os_mkdir.o: ../../src/host/os_mkdir.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lparser.o: ../../src/host/lua-5.3.0/src/lparser.c
|
||||
$(OBJDIR)/src/host/os_pathsearch.o: ../../src/host/os_pathsearch.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstate.o: ../../src/host/lua-5.3.0/src/lstate.c
|
||||
$(OBJDIR)/src/host/os_rmdir.o: ../../src/host/os_rmdir.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstring.o: ../../src/host/lua-5.3.0/src/lstring.c
|
||||
$(OBJDIR)/src/host/os_stat.o: ../../src/host/os_stat.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o: ../../src/host/lua-5.3.0/src/lstrlib.c
|
||||
$(OBJDIR)/src/host/os_ticks.o: ../../src/host/os_ticks.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltable.o: ../../src/host/lua-5.3.0/src/ltable.c
|
||||
$(OBJDIR)/src/host/os_uuid.o: ../../src/host/os_uuid.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o: ../../src/host/lua-5.3.0/src/ltablib.c
|
||||
$(OBJDIR)/src/host/path_isabsolute.o: ../../src/host/path_isabsolute.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltm.o: ../../src/host/lua-5.3.0/src/ltm.c
|
||||
$(OBJDIR)/src/host/premake.o: ../../src/host/premake.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lundump.o: ../../src/host/lua-5.3.0/src/lundump.c
|
||||
$(OBJDIR)/src/host/premake_main.o: ../../src/host/premake_main.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o: ../../src/host/lua-5.3.0/src/lutf8lib.c
|
||||
$(OBJDIR)/src/host/scripts.o: ../../src/host/scripts.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lvm.o: ../../src/host/lua-5.3.0/src/lvm.c
|
||||
$(OBJDIR)/src/host/string_endswith.o: ../../src/host/string_endswith.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lzio.o: ../../src/host/lua-5.3.0/src/lzio.c
|
||||
$(OBJDIR)/src/host/string_hash.o: ../../src/host/string_hash.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -MF $(@:%.o=%.d) -c "$<"
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
-include $(OBJECTS:%.o=%.d)
|
||||
ifneq (,$(PCH))
|
328
3rdparty/genie/build/gmake.linux/genie.make
vendored
328
3rdparty/genie/build/gmake.linux/genie.make
vendored
@ -21,7 +21,7 @@ endif
|
||||
ifeq (posix,$(SHELLTYPE))
|
||||
MKDIR = $(SILENT) mkdir -p "$(1)"
|
||||
COPY = $(SILENT) cp -fR "$(1)" "$(2)"
|
||||
RM= $(SILENT) rm -f "$(1)"
|
||||
RM = $(SILENT) rm -f "$(1)"
|
||||
else
|
||||
MKDIR = $(SILENT) mkdir "$(subst /,\\,$(1))" 2> nul || exit 0
|
||||
COPY = $(SILENT) copy /Y "$(subst /,\\,$(1))" "$(subst /,\\,$(2))"
|
||||
@ -41,74 +41,75 @@ ifndef RESCOMP
|
||||
endif
|
||||
|
||||
ifeq ($(config),release)
|
||||
OBJDIR = obj/Release
|
||||
TARGETDIR = ../../bin/linux
|
||||
override TARGET = $(TARGETDIR)/genie
|
||||
DEFINES += -DNDEBUG -DLUA_COMPAT_MODULE -DLUA_USE_POSIX -DLUA_USE_DLOPEN
|
||||
INCLUDES += -I../../src/host/lua-5.3.0/src
|
||||
OBJDIR = obj/Release
|
||||
TARGETDIR = ../../bin/linux
|
||||
override TARGET = $(TARGETDIR)/genie
|
||||
DEFINES += -DNDEBUG -DLUA_COMPAT_MODULE -DLUA_USE_POSIX -DLUA_USE_DLOPEN
|
||||
INCLUDES += -I../../src/host/lua-5.3.0/src
|
||||
INCLUDES +=
|
||||
ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES)
|
||||
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os
|
||||
ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os
|
||||
ALL_OBJCFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os
|
||||
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
|
||||
ALL_LDFLAGS += $(LDFLAGS) -L. -s -rdynamic
|
||||
LDDEPS +=
|
||||
LIBS += $(LDDEPS) -ldl -lm
|
||||
LDDEPS +=
|
||||
LIBS += $(LDDEPS) -ldl -lm
|
||||
EXTERNAL_LIBS +=
|
||||
LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)
|
||||
LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)
|
||||
OBJECTS := \
|
||||
$(OBJDIR)/src/host/os_getcwd.o \
|
||||
$(OBJDIR)/src/host/os_stat.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lapi.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lcode.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lctype.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldo.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldump.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lgc.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/linit.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/liolib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/llex.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lmem.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lobject.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/loslib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lparser.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstate.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstring.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltable.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltm.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lundump.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lvm.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lzio.o \
|
||||
$(OBJDIR)/src/host/os_chdir.o \
|
||||
$(OBJDIR)/src/host/premake_main.o \
|
||||
$(OBJDIR)/src/host/os_uuid.o \
|
||||
$(OBJDIR)/src/host/os_isfile.o \
|
||||
$(OBJDIR)/src/host/os_ticks.o \
|
||||
$(OBJDIR)/src/host/os_copyfile.o \
|
||||
$(OBJDIR)/src/host/os_getcwd.o \
|
||||
$(OBJDIR)/src/host/os_is64bit.o \
|
||||
$(OBJDIR)/src/host/os_isdir.o \
|
||||
$(OBJDIR)/src/host/os_isfile.o \
|
||||
$(OBJDIR)/src/host/os_match.o \
|
||||
$(OBJDIR)/src/host/os_mkdir.o \
|
||||
$(OBJDIR)/src/host/os_pathsearch.o \
|
||||
$(OBJDIR)/src/host/os_rmdir.o \
|
||||
$(OBJDIR)/src/host/os_stat.o \
|
||||
$(OBJDIR)/src/host/os_ticks.o \
|
||||
$(OBJDIR)/src/host/os_uuid.o \
|
||||
$(OBJDIR)/src/host/path_isabsolute.o \
|
||||
$(OBJDIR)/src/host/premake.o \
|
||||
$(OBJDIR)/src/host/premake_main.o \
|
||||
$(OBJDIR)/src/host/scripts.o \
|
||||
$(OBJDIR)/src/host/string_endswith.o \
|
||||
$(OBJDIR)/src/host/string_hash.o \
|
||||
$(OBJDIR)/src/host/os_pathsearch.o \
|
||||
$(OBJDIR)/src/host/os_rmdir.o \
|
||||
$(OBJDIR)/src/host/os_match.o \
|
||||
$(OBJDIR)/src/host/premake.o \
|
||||
$(OBJDIR)/src/host/os_isdir.o \
|
||||
$(OBJDIR)/src/host/os_mkdir.o \
|
||||
$(OBJDIR)/src/host/path_isabsolute.o \
|
||||
$(OBJDIR)/src/host/os_is64bit.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldump.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lvm.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltable.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/liolib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lcode.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lparser.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lzio.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lmem.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lgc.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstring.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/linit.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltm.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lapi.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lctype.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstate.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/llex.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldo.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lundump.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/loslib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lobject.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o \
|
||||
|
||||
define PREBUILDCMDS
|
||||
endef
|
||||
@ -119,74 +120,75 @@ ifeq ($(config),release)
|
||||
endif
|
||||
|
||||
ifeq ($(config),debug)
|
||||
OBJDIR = obj/Debug
|
||||
TARGETDIR = ../../bin/linux
|
||||
override TARGET = $(TARGETDIR)/genie
|
||||
DEFINES += -D_DEBUG -DLUA_COMPAT_MODULE -DLUA_USE_POSIX -DLUA_USE_DLOPEN
|
||||
INCLUDES += -I../../src/host/lua-5.3.0/src
|
||||
OBJDIR = obj/Debug
|
||||
TARGETDIR = ../../bin/linux
|
||||
override TARGET = $(TARGETDIR)/genie
|
||||
DEFINES += -D_DEBUG -DLUA_COMPAT_MODULE -DLUA_USE_POSIX -DLUA_USE_DLOPEN
|
||||
INCLUDES += -I../../src/host/lua-5.3.0/src
|
||||
INCLUDES +=
|
||||
ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES)
|
||||
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g
|
||||
ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g
|
||||
ALL_OBJCFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g
|
||||
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
|
||||
ALL_LDFLAGS += $(LDFLAGS) -L. -rdynamic
|
||||
LDDEPS +=
|
||||
LIBS += $(LDDEPS) -ldl -lm
|
||||
LDDEPS +=
|
||||
LIBS += $(LDDEPS) -ldl -lm
|
||||
EXTERNAL_LIBS +=
|
||||
LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)
|
||||
LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)
|
||||
OBJECTS := \
|
||||
$(OBJDIR)/src/host/os_getcwd.o \
|
||||
$(OBJDIR)/src/host/os_stat.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lapi.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lcode.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lctype.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldo.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldump.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lgc.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/linit.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/liolib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/llex.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lmem.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lobject.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/loslib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lparser.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstate.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstring.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltable.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltm.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lundump.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lvm.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lzio.o \
|
||||
$(OBJDIR)/src/host/os_chdir.o \
|
||||
$(OBJDIR)/src/host/premake_main.o \
|
||||
$(OBJDIR)/src/host/os_uuid.o \
|
||||
$(OBJDIR)/src/host/os_isfile.o \
|
||||
$(OBJDIR)/src/host/os_ticks.o \
|
||||
$(OBJDIR)/src/host/os_copyfile.o \
|
||||
$(OBJDIR)/src/host/os_getcwd.o \
|
||||
$(OBJDIR)/src/host/os_is64bit.o \
|
||||
$(OBJDIR)/src/host/os_isdir.o \
|
||||
$(OBJDIR)/src/host/os_isfile.o \
|
||||
$(OBJDIR)/src/host/os_match.o \
|
||||
$(OBJDIR)/src/host/os_mkdir.o \
|
||||
$(OBJDIR)/src/host/os_pathsearch.o \
|
||||
$(OBJDIR)/src/host/os_rmdir.o \
|
||||
$(OBJDIR)/src/host/os_stat.o \
|
||||
$(OBJDIR)/src/host/os_ticks.o \
|
||||
$(OBJDIR)/src/host/os_uuid.o \
|
||||
$(OBJDIR)/src/host/path_isabsolute.o \
|
||||
$(OBJDIR)/src/host/premake.o \
|
||||
$(OBJDIR)/src/host/premake_main.o \
|
||||
$(OBJDIR)/src/host/scripts.o \
|
||||
$(OBJDIR)/src/host/string_endswith.o \
|
||||
$(OBJDIR)/src/host/string_hash.o \
|
||||
$(OBJDIR)/src/host/os_pathsearch.o \
|
||||
$(OBJDIR)/src/host/os_rmdir.o \
|
||||
$(OBJDIR)/src/host/os_match.o \
|
||||
$(OBJDIR)/src/host/premake.o \
|
||||
$(OBJDIR)/src/host/os_isdir.o \
|
||||
$(OBJDIR)/src/host/os_mkdir.o \
|
||||
$(OBJDIR)/src/host/path_isabsolute.o \
|
||||
$(OBJDIR)/src/host/os_is64bit.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldump.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lvm.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltable.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/liolib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lcode.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lparser.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lzio.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lmem.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lgc.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstring.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/linit.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltm.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lapi.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lctype.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstate.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/llex.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldo.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lundump.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/loslib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lobject.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o \
|
||||
|
||||
define PREBUILDCMDS
|
||||
endef
|
||||
@ -243,211 +245,211 @@ $(GCH): $(PCH) | $(OBJDIR)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) -x c-header $(DEFINES) $(INCLUDES) -o "$@" -c "$<"
|
||||
endif
|
||||
|
||||
$(OBJDIR)/src/host/os_getcwd.o: ../../src/host/os_getcwd.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lapi.o: ../../src/host/lua-5.3.0/src/lapi.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/os_stat.o: ../../src/host/os_stat.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o: ../../src/host/lua-5.3.0/src/lauxlib.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/os_chdir.o: ../../src/host/os_chdir.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o: ../../src/host/lua-5.3.0/src/lbaselib.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/premake_main.o: ../../src/host/premake_main.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o: ../../src/host/lua-5.3.0/src/lbitlib.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/os_uuid.o: ../../src/host/os_uuid.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lcode.o: ../../src/host/lua-5.3.0/src/lcode.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/os_isfile.o: ../../src/host/os_isfile.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o: ../../src/host/lua-5.3.0/src/lcorolib.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/os_ticks.o: ../../src/host/os_ticks.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lctype.o: ../../src/host/lua-5.3.0/src/lctype.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/os_copyfile.o: ../../src/host/os_copyfile.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o: ../../src/host/lua-5.3.0/src/ldblib.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/scripts.o: ../../src/host/scripts.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o: ../../src/host/lua-5.3.0/src/ldebug.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/string_endswith.o: ../../src/host/string_endswith.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldo.o: ../../src/host/lua-5.3.0/src/ldo.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/string_hash.o: ../../src/host/string_hash.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldump.o: ../../src/host/lua-5.3.0/src/ldump.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/os_pathsearch.o: ../../src/host/os_pathsearch.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o: ../../src/host/lua-5.3.0/src/lfunc.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/os_rmdir.o: ../../src/host/os_rmdir.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lgc.o: ../../src/host/lua-5.3.0/src/lgc.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/os_match.o: ../../src/host/os_match.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/linit.o: ../../src/host/lua-5.3.0/src/linit.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/premake.o: ../../src/host/premake.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/liolib.o: ../../src/host/lua-5.3.0/src/liolib.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/os_isdir.o: ../../src/host/os_isdir.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/llex.o: ../../src/host/lua-5.3.0/src/llex.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/os_mkdir.o: ../../src/host/os_mkdir.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o: ../../src/host/lua-5.3.0/src/lmathlib.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/path_isabsolute.o: ../../src/host/path_isabsolute.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lmem.o: ../../src/host/lua-5.3.0/src/lmem.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/os_is64bit.o: ../../src/host/os_is64bit.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o: ../../src/host/lua-5.3.0/src/loadlib.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldump.o: ../../src/host/lua-5.3.0/src/ldump.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lobject.o: ../../src/host/lua-5.3.0/src/lobject.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lvm.o: ../../src/host/lua-5.3.0/src/lvm.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o: ../../src/host/lua-5.3.0/src/lopcodes.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltable.o: ../../src/host/lua-5.3.0/src/ltable.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/loslib.o: ../../src/host/lua-5.3.0/src/loslib.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o: ../../src/host/lua-5.3.0/src/lstrlib.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lparser.o: ../../src/host/lua-5.3.0/src/lparser.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/liolib.o: ../../src/host/lua-5.3.0/src/liolib.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstate.o: ../../src/host/lua-5.3.0/src/lstate.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lcode.o: ../../src/host/lua-5.3.0/src/lcode.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstring.o: ../../src/host/lua-5.3.0/src/lstring.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lparser.o: ../../src/host/lua-5.3.0/src/lparser.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o: ../../src/host/lua-5.3.0/src/lstrlib.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o: ../../src/host/lua-5.3.0/src/loadlib.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltable.o: ../../src/host/lua-5.3.0/src/ltable.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o: ../../src/host/lua-5.3.0/src/lbitlib.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o: ../../src/host/lua-5.3.0/src/ltablib.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lzio.o: ../../src/host/lua-5.3.0/src/lzio.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltm.o: ../../src/host/lua-5.3.0/src/ltm.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o: ../../src/host/lua-5.3.0/src/ldblib.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lundump.o: ../../src/host/lua-5.3.0/src/lundump.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o: ../../src/host/lua-5.3.0/src/lmathlib.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o: ../../src/host/lua-5.3.0/src/lutf8lib.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o: ../../src/host/lua-5.3.0/src/lfunc.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lvm.o: ../../src/host/lua-5.3.0/src/lvm.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lmem.o: ../../src/host/lua-5.3.0/src/lmem.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lzio.o: ../../src/host/lua-5.3.0/src/lzio.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lgc.o: ../../src/host/lua-5.3.0/src/lgc.c $(GCH)
|
||||
$(OBJDIR)/src/host/os_chdir.o: ../../src/host/os_chdir.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstring.o: ../../src/host/lua-5.3.0/src/lstring.c $(GCH)
|
||||
$(OBJDIR)/src/host/os_copyfile.o: ../../src/host/os_copyfile.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/linit.o: ../../src/host/lua-5.3.0/src/linit.c $(GCH)
|
||||
$(OBJDIR)/src/host/os_getcwd.o: ../../src/host/os_getcwd.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltm.o: ../../src/host/lua-5.3.0/src/ltm.c $(GCH)
|
||||
$(OBJDIR)/src/host/os_is64bit.o: ../../src/host/os_is64bit.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lapi.o: ../../src/host/lua-5.3.0/src/lapi.c $(GCH)
|
||||
$(OBJDIR)/src/host/os_isdir.o: ../../src/host/os_isdir.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lctype.o: ../../src/host/lua-5.3.0/src/lctype.c $(GCH)
|
||||
$(OBJDIR)/src/host/os_isfile.o: ../../src/host/os_isfile.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstate.o: ../../src/host/lua-5.3.0/src/lstate.c $(GCH)
|
||||
$(OBJDIR)/src/host/os_match.o: ../../src/host/os_match.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o: ../../src/host/lua-5.3.0/src/lbaselib.c $(GCH)
|
||||
$(OBJDIR)/src/host/os_mkdir.o: ../../src/host/os_mkdir.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o: ../../src/host/lua-5.3.0/src/ltablib.c $(GCH)
|
||||
$(OBJDIR)/src/host/os_pathsearch.o: ../../src/host/os_pathsearch.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o: ../../src/host/lua-5.3.0/src/lauxlib.c $(GCH)
|
||||
$(OBJDIR)/src/host/os_rmdir.o: ../../src/host/os_rmdir.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o: ../../src/host/lua-5.3.0/src/lcorolib.c $(GCH)
|
||||
$(OBJDIR)/src/host/os_stat.o: ../../src/host/os_stat.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/llex.o: ../../src/host/lua-5.3.0/src/llex.c $(GCH)
|
||||
$(OBJDIR)/src/host/os_ticks.o: ../../src/host/os_ticks.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldo.o: ../../src/host/lua-5.3.0/src/ldo.c $(GCH)
|
||||
$(OBJDIR)/src/host/os_uuid.o: ../../src/host/os_uuid.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lundump.o: ../../src/host/lua-5.3.0/src/lundump.c $(GCH)
|
||||
$(OBJDIR)/src/host/path_isabsolute.o: ../../src/host/path_isabsolute.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o: ../../src/host/lua-5.3.0/src/lopcodes.c $(GCH)
|
||||
$(OBJDIR)/src/host/premake.o: ../../src/host/premake.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o: ../../src/host/lua-5.3.0/src/lutf8lib.c $(GCH)
|
||||
$(OBJDIR)/src/host/premake_main.o: ../../src/host/premake_main.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/loslib.o: ../../src/host/lua-5.3.0/src/loslib.c $(GCH)
|
||||
$(OBJDIR)/src/host/scripts.o: ../../src/host/scripts.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lobject.o: ../../src/host/lua-5.3.0/src/lobject.c $(GCH)
|
||||
$(OBJDIR)/src/host/string_endswith.o: ../../src/host/string_endswith.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o: ../../src/host/lua-5.3.0/src/ldebug.c $(GCH)
|
||||
$(OBJDIR)/src/host/string_hash.o: ../../src/host/string_hash.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
|
330
3rdparty/genie/build/gmake.windows/genie.make
vendored
330
3rdparty/genie/build/gmake.windows/genie.make
vendored
@ -21,7 +21,7 @@ endif
|
||||
ifeq (posix,$(SHELLTYPE))
|
||||
MKDIR = $(SILENT) mkdir -p "$(1)"
|
||||
COPY = $(SILENT) cp -fR "$(1)" "$(2)"
|
||||
RM= $(SILENT) rm -f "$(1)"
|
||||
RM = $(SILENT) rm -f "$(1)"
|
||||
else
|
||||
MKDIR = $(SILENT) mkdir "$(subst /,\\,$(1))" 2> nul || exit 0
|
||||
COPY = $(SILENT) copy /Y "$(subst /,\\,$(1))" "$(subst /,\\,$(2))"
|
||||
@ -41,74 +41,75 @@ ifndef RESCOMP
|
||||
endif
|
||||
|
||||
ifeq ($(config),release)
|
||||
OBJDIR = obj/Release
|
||||
TARGETDIR = ../../bin/windows
|
||||
override TARGET = $(TARGETDIR)/genie.exe
|
||||
DEFINES += -DNDEBUG -DLUA_COMPAT_MODULE
|
||||
INCLUDES += -I../../src/host/lua-5.3.0/src
|
||||
OBJDIR = obj/Release
|
||||
TARGETDIR = ../../bin/windows
|
||||
override TARGET = $(TARGETDIR)/genie.exe
|
||||
DEFINES += -DNDEBUG -DLUA_COMPAT_MODULE
|
||||
INCLUDES += -I../../src/host/lua-5.3.0/src
|
||||
INCLUDES +=
|
||||
ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES)
|
||||
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os
|
||||
ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os
|
||||
ALL_OBJCFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os
|
||||
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
|
||||
ALL_LDFLAGS += $(LDFLAGS) -L. -s
|
||||
LDDEPS +=
|
||||
LIBS += $(LDDEPS) -lole32
|
||||
LDDEPS +=
|
||||
LIBS += $(LDDEPS) -lole32
|
||||
EXTERNAL_LIBS +=
|
||||
LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)
|
||||
LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)
|
||||
OBJECTS := \
|
||||
$(OBJDIR)/src/host/os_getcwd.o \
|
||||
$(OBJDIR)/src/host/os_stat.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lapi.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lcode.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lctype.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldo.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldump.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lgc.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/linit.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/liolib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/llex.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lmem.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lobject.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/loslib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lparser.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstate.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstring.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltable.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltm.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lundump.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lvm.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lzio.o \
|
||||
$(OBJDIR)/src/host/os_chdir.o \
|
||||
$(OBJDIR)/src/host/premake_main.o \
|
||||
$(OBJDIR)/src/host/os_uuid.o \
|
||||
$(OBJDIR)/src/host/os_isfile.o \
|
||||
$(OBJDIR)/src/host/os_ticks.o \
|
||||
$(OBJDIR)/src/host/os_copyfile.o \
|
||||
$(OBJDIR)/src/host/os_getcwd.o \
|
||||
$(OBJDIR)/src/host/os_is64bit.o \
|
||||
$(OBJDIR)/src/host/os_isdir.o \
|
||||
$(OBJDIR)/src/host/os_isfile.o \
|
||||
$(OBJDIR)/src/host/os_match.o \
|
||||
$(OBJDIR)/src/host/os_mkdir.o \
|
||||
$(OBJDIR)/src/host/os_pathsearch.o \
|
||||
$(OBJDIR)/src/host/os_rmdir.o \
|
||||
$(OBJDIR)/src/host/os_stat.o \
|
||||
$(OBJDIR)/src/host/os_ticks.o \
|
||||
$(OBJDIR)/src/host/os_uuid.o \
|
||||
$(OBJDIR)/src/host/path_isabsolute.o \
|
||||
$(OBJDIR)/src/host/premake.o \
|
||||
$(OBJDIR)/src/host/premake_main.o \
|
||||
$(OBJDIR)/src/host/scripts.o \
|
||||
$(OBJDIR)/src/host/string_endswith.o \
|
||||
$(OBJDIR)/src/host/string_hash.o \
|
||||
$(OBJDIR)/src/host/os_pathsearch.o \
|
||||
$(OBJDIR)/src/host/os_rmdir.o \
|
||||
$(OBJDIR)/src/host/os_match.o \
|
||||
$(OBJDIR)/src/host/premake.o \
|
||||
$(OBJDIR)/src/host/os_isdir.o \
|
||||
$(OBJDIR)/src/host/os_mkdir.o \
|
||||
$(OBJDIR)/src/host/path_isabsolute.o \
|
||||
$(OBJDIR)/src/host/os_is64bit.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldump.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lvm.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltable.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/liolib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lcode.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lparser.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lzio.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lmem.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lgc.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstring.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/linit.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltm.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lapi.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lctype.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstate.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/llex.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldo.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lundump.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/loslib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lobject.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o \
|
||||
|
||||
define PREBUILDCMDS
|
||||
endef
|
||||
@ -119,74 +120,75 @@ ifeq ($(config),release)
|
||||
endif
|
||||
|
||||
ifeq ($(config),debug)
|
||||
OBJDIR = obj/Debug
|
||||
TARGETDIR = ../../bin/windows
|
||||
override TARGET = $(TARGETDIR)/genie.exe
|
||||
DEFINES += -D_DEBUG -DLUA_COMPAT_MODULE
|
||||
INCLUDES += -I../../src/host/lua-5.3.0/src
|
||||
OBJDIR = obj/Debug
|
||||
TARGETDIR = ../../bin/windows
|
||||
override TARGET = $(TARGETDIR)/genie.exe
|
||||
DEFINES += -D_DEBUG -DLUA_COMPAT_MODULE
|
||||
INCLUDES += -I../../src/host/lua-5.3.0/src
|
||||
INCLUDES +=
|
||||
ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -MP $(DEFINES) $(INCLUDES)
|
||||
ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g
|
||||
ALL_CXXFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g
|
||||
ALL_OBJCFLAGS += $(CXXFLAGS) $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g
|
||||
ALL_RESFLAGS += $(RESFLAGS) $(DEFINES) $(INCLUDES)
|
||||
ALL_LDFLAGS += $(LDFLAGS) -L.
|
||||
LDDEPS +=
|
||||
LIBS += $(LDDEPS) -lole32
|
||||
LDDEPS +=
|
||||
LIBS += $(LDDEPS) -lole32
|
||||
EXTERNAL_LIBS +=
|
||||
LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)
|
||||
LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)
|
||||
OBJECTS := \
|
||||
$(OBJDIR)/src/host/os_getcwd.o \
|
||||
$(OBJDIR)/src/host/os_stat.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lapi.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lcode.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lctype.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldo.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldump.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lgc.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/linit.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/liolib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/llex.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lmem.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lobject.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/loslib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lparser.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstate.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstring.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltable.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltm.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lundump.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lvm.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lzio.o \
|
||||
$(OBJDIR)/src/host/os_chdir.o \
|
||||
$(OBJDIR)/src/host/premake_main.o \
|
||||
$(OBJDIR)/src/host/os_uuid.o \
|
||||
$(OBJDIR)/src/host/os_isfile.o \
|
||||
$(OBJDIR)/src/host/os_ticks.o \
|
||||
$(OBJDIR)/src/host/os_copyfile.o \
|
||||
$(OBJDIR)/src/host/os_getcwd.o \
|
||||
$(OBJDIR)/src/host/os_is64bit.o \
|
||||
$(OBJDIR)/src/host/os_isdir.o \
|
||||
$(OBJDIR)/src/host/os_isfile.o \
|
||||
$(OBJDIR)/src/host/os_match.o \
|
||||
$(OBJDIR)/src/host/os_mkdir.o \
|
||||
$(OBJDIR)/src/host/os_pathsearch.o \
|
||||
$(OBJDIR)/src/host/os_rmdir.o \
|
||||
$(OBJDIR)/src/host/os_stat.o \
|
||||
$(OBJDIR)/src/host/os_ticks.o \
|
||||
$(OBJDIR)/src/host/os_uuid.o \
|
||||
$(OBJDIR)/src/host/path_isabsolute.o \
|
||||
$(OBJDIR)/src/host/premake.o \
|
||||
$(OBJDIR)/src/host/premake_main.o \
|
||||
$(OBJDIR)/src/host/scripts.o \
|
||||
$(OBJDIR)/src/host/string_endswith.o \
|
||||
$(OBJDIR)/src/host/string_hash.o \
|
||||
$(OBJDIR)/src/host/os_pathsearch.o \
|
||||
$(OBJDIR)/src/host/os_rmdir.o \
|
||||
$(OBJDIR)/src/host/os_match.o \
|
||||
$(OBJDIR)/src/host/premake.o \
|
||||
$(OBJDIR)/src/host/os_isdir.o \
|
||||
$(OBJDIR)/src/host/os_mkdir.o \
|
||||
$(OBJDIR)/src/host/path_isabsolute.o \
|
||||
$(OBJDIR)/src/host/os_is64bit.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldump.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lvm.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltable.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/liolib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lcode.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lparser.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lzio.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lmem.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lgc.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstring.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/linit.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltm.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lapi.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lctype.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstate.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/llex.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldo.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lundump.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/loslib.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lobject.o \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o \
|
||||
|
||||
define PREBUILDCMDS
|
||||
endef
|
||||
@ -198,8 +200,8 @@ endif
|
||||
|
||||
OBJDIRS := \
|
||||
$(OBJDIR) \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src \
|
||||
$(OBJDIR)/src/host \
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src \
|
||||
|
||||
RESOURCES := \
|
||||
|
||||
@ -243,211 +245,211 @@ $(GCH): $(PCH) | $(OBJDIR)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) -x c-header $(DEFINES) $(INCLUDES) -o "$@" -c "$<"
|
||||
endif
|
||||
|
||||
$(OBJDIR)/src/host/os_getcwd.o: ../../src/host/os_getcwd.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lapi.o: ../../src/host/lua-5.3.0/src/lapi.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/os_stat.o: ../../src/host/os_stat.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o: ../../src/host/lua-5.3.0/src/lauxlib.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/os_chdir.o: ../../src/host/os_chdir.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o: ../../src/host/lua-5.3.0/src/lbaselib.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/premake_main.o: ../../src/host/premake_main.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o: ../../src/host/lua-5.3.0/src/lbitlib.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/os_uuid.o: ../../src/host/os_uuid.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lcode.o: ../../src/host/lua-5.3.0/src/lcode.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/os_isfile.o: ../../src/host/os_isfile.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o: ../../src/host/lua-5.3.0/src/lcorolib.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/os_ticks.o: ../../src/host/os_ticks.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lctype.o: ../../src/host/lua-5.3.0/src/lctype.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/os_copyfile.o: ../../src/host/os_copyfile.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o: ../../src/host/lua-5.3.0/src/ldblib.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/scripts.o: ../../src/host/scripts.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o: ../../src/host/lua-5.3.0/src/ldebug.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/string_endswith.o: ../../src/host/string_endswith.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldo.o: ../../src/host/lua-5.3.0/src/ldo.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/string_hash.o: ../../src/host/string_hash.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldump.o: ../../src/host/lua-5.3.0/src/ldump.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/os_pathsearch.o: ../../src/host/os_pathsearch.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o: ../../src/host/lua-5.3.0/src/lfunc.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/os_rmdir.o: ../../src/host/os_rmdir.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lgc.o: ../../src/host/lua-5.3.0/src/lgc.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/os_match.o: ../../src/host/os_match.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/linit.o: ../../src/host/lua-5.3.0/src/linit.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/premake.o: ../../src/host/premake.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/liolib.o: ../../src/host/lua-5.3.0/src/liolib.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/os_isdir.o: ../../src/host/os_isdir.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/llex.o: ../../src/host/lua-5.3.0/src/llex.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/os_mkdir.o: ../../src/host/os_mkdir.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o: ../../src/host/lua-5.3.0/src/lmathlib.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/path_isabsolute.o: ../../src/host/path_isabsolute.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lmem.o: ../../src/host/lua-5.3.0/src/lmem.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/os_is64bit.o: ../../src/host/os_is64bit.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o: ../../src/host/lua-5.3.0/src/loadlib.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldump.o: ../../src/host/lua-5.3.0/src/ldump.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lobject.o: ../../src/host/lua-5.3.0/src/lobject.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lvm.o: ../../src/host/lua-5.3.0/src/lvm.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o: ../../src/host/lua-5.3.0/src/lopcodes.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltable.o: ../../src/host/lua-5.3.0/src/ltable.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/loslib.o: ../../src/host/lua-5.3.0/src/loslib.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o: ../../src/host/lua-5.3.0/src/lstrlib.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lparser.o: ../../src/host/lua-5.3.0/src/lparser.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/liolib.o: ../../src/host/lua-5.3.0/src/liolib.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstate.o: ../../src/host/lua-5.3.0/src/lstate.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lcode.o: ../../src/host/lua-5.3.0/src/lcode.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstring.o: ../../src/host/lua-5.3.0/src/lstring.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lparser.o: ../../src/host/lua-5.3.0/src/lparser.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstrlib.o: ../../src/host/lua-5.3.0/src/lstrlib.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/loadlib.o: ../../src/host/lua-5.3.0/src/loadlib.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltable.o: ../../src/host/lua-5.3.0/src/ltable.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lbitlib.o: ../../src/host/lua-5.3.0/src/lbitlib.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o: ../../src/host/lua-5.3.0/src/ltablib.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lzio.o: ../../src/host/lua-5.3.0/src/lzio.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltm.o: ../../src/host/lua-5.3.0/src/ltm.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldblib.o: ../../src/host/lua-5.3.0/src/ldblib.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lundump.o: ../../src/host/lua-5.3.0/src/lundump.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lmathlib.o: ../../src/host/lua-5.3.0/src/lmathlib.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o: ../../src/host/lua-5.3.0/src/lutf8lib.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lfunc.o: ../../src/host/lua-5.3.0/src/lfunc.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lvm.o: ../../src/host/lua-5.3.0/src/lvm.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lmem.o: ../../src/host/lua-5.3.0/src/lmem.c $(GCH)
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lzio.o: ../../src/host/lua-5.3.0/src/lzio.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lgc.o: ../../src/host/lua-5.3.0/src/lgc.c $(GCH)
|
||||
$(OBJDIR)/src/host/os_chdir.o: ../../src/host/os_chdir.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstring.o: ../../src/host/lua-5.3.0/src/lstring.c $(GCH)
|
||||
$(OBJDIR)/src/host/os_copyfile.o: ../../src/host/os_copyfile.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/linit.o: ../../src/host/lua-5.3.0/src/linit.c $(GCH)
|
||||
$(OBJDIR)/src/host/os_getcwd.o: ../../src/host/os_getcwd.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltm.o: ../../src/host/lua-5.3.0/src/ltm.c $(GCH)
|
||||
$(OBJDIR)/src/host/os_is64bit.o: ../../src/host/os_is64bit.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lapi.o: ../../src/host/lua-5.3.0/src/lapi.c $(GCH)
|
||||
$(OBJDIR)/src/host/os_isdir.o: ../../src/host/os_isdir.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lctype.o: ../../src/host/lua-5.3.0/src/lctype.c $(GCH)
|
||||
$(OBJDIR)/src/host/os_isfile.o: ../../src/host/os_isfile.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lstate.o: ../../src/host/lua-5.3.0/src/lstate.c $(GCH)
|
||||
$(OBJDIR)/src/host/os_match.o: ../../src/host/os_match.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lbaselib.o: ../../src/host/lua-5.3.0/src/lbaselib.c $(GCH)
|
||||
$(OBJDIR)/src/host/os_mkdir.o: ../../src/host/os_mkdir.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ltablib.o: ../../src/host/lua-5.3.0/src/ltablib.c $(GCH)
|
||||
$(OBJDIR)/src/host/os_pathsearch.o: ../../src/host/os_pathsearch.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lauxlib.o: ../../src/host/lua-5.3.0/src/lauxlib.c $(GCH)
|
||||
$(OBJDIR)/src/host/os_rmdir.o: ../../src/host/os_rmdir.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lcorolib.o: ../../src/host/lua-5.3.0/src/lcorolib.c $(GCH)
|
||||
$(OBJDIR)/src/host/os_stat.o: ../../src/host/os_stat.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/llex.o: ../../src/host/lua-5.3.0/src/llex.c $(GCH)
|
||||
$(OBJDIR)/src/host/os_ticks.o: ../../src/host/os_ticks.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldo.o: ../../src/host/lua-5.3.0/src/ldo.c $(GCH)
|
||||
$(OBJDIR)/src/host/os_uuid.o: ../../src/host/os_uuid.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lundump.o: ../../src/host/lua-5.3.0/src/lundump.c $(GCH)
|
||||
$(OBJDIR)/src/host/path_isabsolute.o: ../../src/host/path_isabsolute.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lopcodes.o: ../../src/host/lua-5.3.0/src/lopcodes.c $(GCH)
|
||||
$(OBJDIR)/src/host/premake.o: ../../src/host/premake.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lutf8lib.o: ../../src/host/lua-5.3.0/src/lutf8lib.c $(GCH)
|
||||
$(OBJDIR)/src/host/premake_main.o: ../../src/host/premake_main.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/loslib.o: ../../src/host/lua-5.3.0/src/loslib.c $(GCH)
|
||||
$(OBJDIR)/src/host/scripts.o: ../../src/host/scripts.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/lobject.o: ../../src/host/lua-5.3.0/src/lobject.c $(GCH)
|
||||
$(OBJDIR)/src/host/string_endswith.o: ../../src/host/string_endswith.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
$(OBJDIR)/src/host/lua-5.3.0/src/ldebug.o: ../../src/host/lua-5.3.0/src/ldebug.c $(GCH)
|
||||
$(OBJDIR)/src/host/string_hash.o: ../../src/host/string_hash.c $(GCH) genie.make
|
||||
@echo $(notdir $<)
|
||||
$(SILENT) $(CC) $(ALL_CFLAGS) $(FORCE_INCLUDE) -o "$@" -c "$<"
|
||||
|
||||
|
36
3rdparty/genie/docs/scripting-reference.md
vendored
36
3rdparty/genie/docs/scripting-reference.md
vendored
@ -72,7 +72,7 @@
|
||||
* [path.getrelative](#pathgetrelativesrc-dest)
|
||||
* [path.isabsolute](#pathisabsolutepath)
|
||||
* [path.iscfile](#pathiscfilepath)
|
||||
* [path.iscppfile](#pathiscppfilepath)
|
||||
* [path.isSourceFile](#pathiscppfilepath)
|
||||
* [path.isresourcefile](#pathisresourcefilepath)
|
||||
* [path.join](#pathjoinleading-trailing)
|
||||
* [path.rebase](#pathrebasepath-oldbase-newbase)
|
||||
@ -101,6 +101,7 @@
|
||||
* [targetname](#targetnamename)
|
||||
* [targetprefix](#targetprefixprefix)
|
||||
* [targetsuffix](#targetsuffixsuffix)
|
||||
* [userincludedirs](#userincludedirspaths)
|
||||
* [uuid](#uuidprojectuuid)
|
||||
* [vpaths](#vpathsgroup--pattern)
|
||||
* Additional Information
|
||||
@ -547,6 +548,7 @@ _flags_ - List of flag names from list below. Names are case-insensitive and ign
|
||||
* _Symbols_ - Generate debugging information.
|
||||
* _Unicode_ - Enable Unicode strings. If not specified, the default toolset behavior is used.
|
||||
* _Unsafe_ - Enable the use of unsafe code in .NET applications.
|
||||
* _UseFullPaths_ - Enable absolute paths for `__FILE__`.
|
||||
* _WinMain_ - Use WinMain() as the entry point for Windows applications, rather than main().
|
||||
|
||||
**Note:** When not set, options will default to the tool default.
|
||||
@ -779,12 +781,12 @@ project "MyProject"
|
||||
|
||||
---
|
||||
### language(_lang_)
|
||||
Sets the programming language used by a project. GENie currently supports C, C++, and C#. Not all languages are supported by all of the generators. For instance, SharpDevelop does not currently support C or C++ development, and Code::Blocks does not support the .NET languages (C#, managed C++).
|
||||
Sets the programming language used by a project. GENie currently supports C, C++, C# and Vala. Not all languages are supported by all of the generators. For instance, SharpDevelop does not currently support C or C++ development, and Code::Blocks does not support the .NET languages (C#, managed C++).
|
||||
|
||||
**Scope:** solutions, projects
|
||||
|
||||
#### Arguments
|
||||
_lang_ - language identifier string ("C", "C++", or "C#"). Case insensitive.
|
||||
_lang_ - language identifier string ("C", "C++", "C#" or "Vala"). Case insensitive.
|
||||
|
||||
#### Examples
|
||||
```lua
|
||||
@ -1276,6 +1278,32 @@ Table of values:
|
||||
|
||||
[Back to top](#table-of-contents)
|
||||
|
||||
---
|
||||
### userincludedirs({_paths_...})
|
||||
Specifies the user include file search paths. Multiple calls are concatenated.
|
||||
|
||||
For XCode, it maps to setting the USER INCLUDE SEARCH PATH.
|
||||
|
||||
For clang/gcc, it maps to setting the include directory using the iquote option.
|
||||
|
||||
On the other build systems, it behaves like [includedirs](#includedirspaths).
|
||||
|
||||
**Scope:** solutions, projects, configurations
|
||||
|
||||
#### Arguments
|
||||
_paths_ - list of user include file search directories, relative to the currently-executing script file.
|
||||
|
||||
#### Examples
|
||||
Define two include file search paths
|
||||
```lua
|
||||
userincludedirs { "../lua/include", "../zlib" }
|
||||
```
|
||||
You can also use [wildcards](#wildcards) to match multiple directories.
|
||||
```lua
|
||||
userincludedirs { "../includes/**" }
|
||||
```
|
||||
[Back to top](#table-of-contents)
|
||||
|
||||
---
|
||||
### os.uuid()
|
||||
Returns a Universally Unique Identifier
|
||||
@ -1397,7 +1425,7 @@ _path_ - path to check
|
||||
[Back to top](#table-of-contents)
|
||||
|
||||
---
|
||||
### path.iscppfile(_path_)
|
||||
### path.isSourceFile(_path_)
|
||||
Determines whether a file is a C++ source code file, based on extension.
|
||||
|
||||
#### Arguments
|
||||
|
10
3rdparty/genie/makefile
vendored
10
3rdparty/genie/makefile
vendored
@ -31,12 +31,18 @@ SILENT?=@
|
||||
$(GENIE):
|
||||
$(SILENT) $(MAKE) -C build/gmake.$(OS)
|
||||
|
||||
all: $(GENIE)
|
||||
all: $(SILENT) $(GENIE)
|
||||
|
||||
clean:
|
||||
$(SILENT) $(MAKE) -C build/gmake.$(OS) clean
|
||||
$(SILENT) -rm -rf bin
|
||||
|
||||
projgen:
|
||||
$(SILENT) $(GENIE) --to=../build/gmake.windows --os=windows gmake
|
||||
$(SILENT) $(GENIE) --to=../build/gmake.linux --os=linux gmake
|
||||
$(SILENT) $(GENIE) --to=../build/gmake.darwin --os=macosx --platform=universal32 gmake
|
||||
$(SILENT) $(GENIE) --to=../build/gmake.freebsd --os=bsd gmake
|
||||
|
||||
rebuild:
|
||||
$(SILENT) $(MAKE) -C build/gmake.$(OS) clean all
|
||||
|
||||
@ -47,7 +53,7 @@ release-windows release-darwin: $(GENIE)
|
||||
|
||||
release-linux: $(GENIE)
|
||||
$(SILENT) $(GENIE) release
|
||||
$(SILENT) $(MAKE) -C build/gmake.darwin clean all CC=x86_64-apple-darwin13-clang
|
||||
$(SILENT) $(MAKE) -C build/gmake.darwin clean all CC=x86_64-apple-darwin15-clang
|
||||
$(SILENT) $(MAKE) -C build/gmake.linux clean all
|
||||
$(SILENT) $(MAKE) -C build/gmake.windows clean all CC=i686-w64-mingw32-gcc
|
||||
$(SILENT) git checkout src/host/version.h
|
||||
|
2
3rdparty/genie/scripts/release.lua
vendored
2
3rdparty/genie/scripts/release.lua
vendored
@ -36,7 +36,7 @@ function dorelease()
|
||||
|
||||
|
||||
print("Generating project files...")
|
||||
|
||||
|
||||
exec("genie /to=../build/gmake.windows /os=windows gmake")
|
||||
exec("genie /to=../build/gmake.linux /os=linux gmake")
|
||||
exec("genie /to=../build/gmake.darwin /os=macosx /platform=universal32 gmake")
|
||||
|
9
3rdparty/genie/src/_manifest.lua
vendored
9
3rdparty/genie/src/_manifest.lua
vendored
@ -33,9 +33,11 @@
|
||||
"tools/msc.lua",
|
||||
"tools/ow.lua",
|
||||
"tools/snc.lua",
|
||||
"tools/valac.lua",
|
||||
"base/validate.lua",
|
||||
"base/help.lua",
|
||||
"base/premake.lua",
|
||||
"base/iter.lua",
|
||||
|
||||
-- CodeBlocks action
|
||||
"actions/codeblocks/_codeblocks.lua",
|
||||
@ -57,6 +59,7 @@
|
||||
"actions/make/make_solution.lua",
|
||||
"actions/make/make_cpp.lua",
|
||||
"actions/make/make_csharp.lua",
|
||||
"actions/make/make_vala.lua",
|
||||
|
||||
-- Visual Studio actions
|
||||
"actions/vstudio/_vstudio.lua",
|
||||
@ -87,4 +90,10 @@
|
||||
"actions/fastbuild/_fastbuild.lua",
|
||||
"actions/fastbuild/fastbuild_project.lua",
|
||||
"actions/fastbuild/fastbuild_solution.lua",
|
||||
|
||||
-- ninja action
|
||||
"actions/ninja/_ninja.lua",
|
||||
"actions/ninja/ninja_base.lua",
|
||||
"actions/ninja/ninja_solution.lua",
|
||||
"actions/ninja/ninja_cpp.lua",
|
||||
}
|
||||
|
@ -88,6 +88,8 @@
|
||||
_p(2,'<Build>')
|
||||
for _, platform in ipairs(platforms) do
|
||||
for cfg in premake.eachconfig(prj, platform) do
|
||||
local includedirs = table.join(cfg.userincludedirs, cfg.includedirs)
|
||||
|
||||
_p(3,'<Target title="%s">', premake.esc(cfg.longname))
|
||||
|
||||
_p(4,'<Option output="%s" prefix_auto="0" extension_auto="0" />', premake.esc(cfg.buildtarget.fullpath))
|
||||
@ -118,7 +120,7 @@
|
||||
_p(5,'<Add option="-Winvalid-pch" />')
|
||||
_p(5,'<Add option="-include "%s"" />', premake.esc(cfg.pchheader))
|
||||
end
|
||||
for _,v in ipairs(cfg.includedirs) do
|
||||
for _,v in ipairs(includedirs) do
|
||||
_p(5,'<Add directory="%s" />', premake.esc(v))
|
||||
end
|
||||
_p(4,'</Compiler>')
|
||||
@ -141,7 +143,7 @@
|
||||
-- begin resource compiler block --
|
||||
if premake.findfile(cfg, ".rc") then
|
||||
_p(4,'<ResourceCompiler>')
|
||||
for _,v in ipairs(cfg.includedirs) do
|
||||
for _,v in ipairs(includedirs) do
|
||||
_p(5,'<Add directory="%s" />', premake.esc(v))
|
||||
end
|
||||
for _,v in ipairs(cfg.resincludedirs) do
|
||||
|
@ -75,12 +75,14 @@
|
||||
local rundir = cfg.debugdir or cfg.buildtarget.directory
|
||||
local runargs = table.concat(cfg.debugargs, " ")
|
||||
local pause = iif(cfg.kind == "WindowedApp", "no", "yes")
|
||||
local includedirs = table.join(cfg.userincludedirs, cfg.includedirs)
|
||||
_p(' <General OutputFile="%s" IntermediateDirectory="%s" Command="./%s" CommandArguments="%s" WorkingDirectory="%s" PauseExecWhenProcTerminates="%s"/>', fname, objdir, runcmd, runargs, rundir, pause)
|
||||
|
||||
-- begin compiler block --
|
||||
local flags = premake.esc(table.join(premake.gcc.getcflags(cfg), premake.gcc.getcxxflags(cfg), cfg.buildoptions))
|
||||
_p(' <Compiler Required="yes" Options="%s">', table.concat(flags, ";"))
|
||||
for _,v in ipairs(cfg.includedirs) do
|
||||
|
||||
for _,v in ipairs(includedirs) do
|
||||
_p(' <IncludePath Value="%s"/>', premake.esc(v))
|
||||
end
|
||||
for _,v in ipairs(cfg.defines) do
|
||||
|
@ -1,19 +1,15 @@
|
||||
-- Generates a FastBuild config file for a project
|
||||
-- Generates a FASTBuild config file for a project.
|
||||
|
||||
-- Note that table order iteration should be deterministic, so the .bff file content is not
|
||||
-- arbitrarily changed each time it's generated. There are several places in this file
|
||||
-- where sorts are done for that reason.
|
||||
|
||||
-- Remaining flags to handle:
|
||||
-- MFC = 1,
|
||||
-- No64BitChecks = 1,
|
||||
-- NoExceptions = 1,
|
||||
-- NoFramePointer = 1,
|
||||
-- NoImportLib = 1,
|
||||
-- NoIncrementalLink = 1,
|
||||
-- NoManifest = 1,
|
||||
-- NoPCH = 1,
|
||||
-- NoRTTI = 1,
|
||||
-- SingleOutputDir = 1,
|
||||
-- DebugRuntime = 1,
|
||||
-- ReleaseRuntime = 1,
|
||||
-- SEH = 1,
|
||||
-- StaticATL = 1,
|
||||
-- Symbols = 1,
|
||||
-- Unicode = 1,
|
||||
@ -27,11 +23,11 @@ local function add_trailing_backslash(dir)
|
||||
return dir
|
||||
end
|
||||
|
||||
local function compile(indentlevel, prj, cfg)
|
||||
local function compile(indentlevel, prj, cfg, commonbasepath)
|
||||
|
||||
local firstflag = true
|
||||
for _, cfgexclude in ipairs(cfg.excludes) do
|
||||
if path.iscppfile(cfgexclude) then
|
||||
if path.isSourceFile(cfgexclude) then
|
||||
if firstflag then
|
||||
_p(indentlevel, '// Excluded files:')
|
||||
firstflag = false
|
||||
@ -47,19 +43,59 @@ local function compile(indentlevel, prj, cfg)
|
||||
|
||||
_p(indentlevel, ".Defines = ''")
|
||||
for _, define in ipairs(cfg.defines) do
|
||||
_p(indentlevel, " + ' /D%s'", define)
|
||||
_p(indentlevel+1, "+ ' /D%s'", define)
|
||||
end
|
||||
|
||||
if cfg.kind == 'SharedLib' then
|
||||
_p(indentlevel, " + ' /D_WINDLL'")
|
||||
_p(indentlevel+1, "+ ' /D_WINDLL'")
|
||||
end
|
||||
|
||||
_p(indentlevel, ".IncludeDirs = ''")
|
||||
local sortedincdirs = {}
|
||||
for _, includedir in ipairs(cfg.userincludedirs) do
|
||||
if includedir ~= nil then
|
||||
table.insert(sortedincdirs, includedir)
|
||||
end
|
||||
end
|
||||
for _, includedir in ipairs(cfg.includedirs) do
|
||||
_p(indentlevel, " + ' /I\"%s\"'", includedir)
|
||||
if includedir ~= nil then
|
||||
table.insert(sortedincdirs, includedir)
|
||||
end
|
||||
end
|
||||
|
||||
_p(indentlevel, " + .MSVCIncludes")
|
||||
-- Setup for special include dir sort to ensure that 'nearby' dirs get precedence over others.
|
||||
-- Gets the relative path from commonbasepath and counts the steps in that path.
|
||||
local function getpathnodecount(p)
|
||||
local nodefinder = string.gmatch(p, "[^\\/]+")
|
||||
local result = 0
|
||||
local node = nodefinder()
|
||||
while node do
|
||||
result = result + ((node ~= '.' and 1) or 0)
|
||||
node = nodefinder()
|
||||
end
|
||||
return result
|
||||
end
|
||||
|
||||
local stepsfrombase = {}
|
||||
|
||||
for _, includedir in ipairs(sortedincdirs) do
|
||||
stepsfrombase[includedir] = getpathnodecount(path.getrelative(commonbasepath, includedir))
|
||||
end
|
||||
|
||||
local function includesort(a, b)
|
||||
if stepsfrombase[a] == stepsfrombase[b] then
|
||||
return a < b
|
||||
else
|
||||
return stepsfrombase[a] < stepsfrombase[b]
|
||||
end
|
||||
end
|
||||
|
||||
table.sort(sortedincdirs, includesort)
|
||||
for _, includedir in ipairs(sortedincdirs) do
|
||||
_p(indentlevel+1, "+ ' /I\"%s\"'", includedir)
|
||||
end
|
||||
|
||||
_p(indentlevel+1, "+ .MSVCIncludes")
|
||||
|
||||
local compileroptions = {
|
||||
'"%1"',
|
||||
@ -83,7 +119,7 @@ local function compile(indentlevel, prj, cfg)
|
||||
|
||||
if (cfg.flags.EnableMinimalRebuild or
|
||||
cfg.flags.NoMultiProcessorCompilation) then
|
||||
os.exit(1) -- Not compatible with FastBuild
|
||||
-- Not compatible with FastBuild
|
||||
end
|
||||
|
||||
if cfg.flags.FloatFast then
|
||||
@ -119,14 +155,18 @@ local function compile(indentlevel, prj, cfg)
|
||||
end
|
||||
|
||||
if cfg.flags.Symbols then
|
||||
if (premake.config.isoptimizedbuild(cfg.flags)
|
||||
or cfg.flags.NoEditAndContinue) then
|
||||
table.insert(compileroptions, '/Zi')
|
||||
if (cfg.flags.C7DebugInfo) then
|
||||
table.insert(compileroptions, '/Z7')
|
||||
else
|
||||
table.insert(compileroptions, '/ZI')
|
||||
if (premake.config.isoptimizedbuild(cfg.flags)
|
||||
or cfg.flags.NoEditAndContinue) then
|
||||
table.insert(compileroptions, '/Zi')
|
||||
else
|
||||
table.insert(compileroptions, '/ZI')
|
||||
end
|
||||
local targetdir = add_trailing_backslash(cfg.buildtarget.directory)
|
||||
table.insert(compileroptions, string.format("/Fd\"%s%s.pdb\"", targetdir, cfg.buildtarget.basename))
|
||||
end
|
||||
local targetdir = add_trailing_backslash(cfg.buildtarget.directory)
|
||||
table.insert(compileroptions, string.format("/Fd\"%s%s.pdb\"", targetdir, cfg.buildtarget.basename))
|
||||
end
|
||||
|
||||
local isoptimised = true
|
||||
@ -161,17 +201,38 @@ local function compile(indentlevel, prj, cfg)
|
||||
end
|
||||
end
|
||||
|
||||
if cfg.flags.NoExceptions then
|
||||
else
|
||||
if cfg.flags.SEH then
|
||||
table.insert(compileroptions, '/EHa')
|
||||
else
|
||||
table.insert(compileroptions, '/EHsc')
|
||||
end
|
||||
end
|
||||
|
||||
if cfg.flags.NoRTTI then
|
||||
table.insert(compileroptions, '/GR-')
|
||||
else
|
||||
table.insert(compileroptions, '/GR')
|
||||
end
|
||||
|
||||
if cfg.flags.NoFramePointer then
|
||||
table.insert(compileroptions, '/Oy-')
|
||||
else
|
||||
table.insert(compileroptions, '/Oy')
|
||||
end
|
||||
|
||||
for _, addloption in ipairs(cfg.buildoptions) do
|
||||
table.insert(compileroptions, addloption)
|
||||
end
|
||||
|
||||
_p(indentlevel, ".CompilerOptions = ''")
|
||||
for _, option in ipairs(compileroptions) do
|
||||
_p(indentlevel, " + ' %s'", option)
|
||||
_p(indentlevel+1, "+ ' %s'", option)
|
||||
end
|
||||
|
||||
_p(indentlevel, " + .IncludeDirs")
|
||||
_p(indentlevel, " + .Defines")
|
||||
_p(indentlevel+1, "+ .IncludeDirs")
|
||||
_p(indentlevel+1, "+ .Defines")
|
||||
|
||||
if not cfg.flags.NoPCH and cfg.pchheader then
|
||||
_p(indentlevel, ".CompilerInputFiles - '%s'", cfg.pchsource)
|
||||
@ -179,19 +240,19 @@ local function compile(indentlevel, prj, cfg)
|
||||
_p(indentlevel, ".PCHOutputFile = .CompilerOutputPath + '%s.pch'", prj.name)
|
||||
_p(indentlevel, ".CompilerOptions + ' /Fp\"' + .CompilerOutputPath + '%s.pch\"'", prj.name)
|
||||
_p(indentlevel, ".PCHOptions = .CompilerOptions")
|
||||
_p(indentlevel, " + ' /Yc\"%s\"'", cfg.pchheader)
|
||||
_p(indentlevel, " + ' /Fo\"%%3\"'")
|
||||
_p(indentlevel+1, "+ ' /Yc\"%s\"'", cfg.pchheader)
|
||||
_p(indentlevel+1, "+ ' /Fo\"%%3\"'")
|
||||
_p(indentlevel, ".CompilerOptions + ' /Yu\"%s\"'", cfg.pchheader)
|
||||
end
|
||||
_p(indentlevel, " + ' /Fo\"%%2\"'") -- make sure the previous property is .CompilerOptions
|
||||
_p(indentlevel+1, "+ ' /Fo\"%%2\"'") -- make sure the previous property is .CompilerOptions
|
||||
end
|
||||
|
||||
local function library(prj, cfg, useconfig)
|
||||
local function library(prj, cfg, useconfig, commonbasepath)
|
||||
_p(1, "Library('%s-%s-%s')", prj.name, cfg.name, cfg.platform)
|
||||
_p(1, '{')
|
||||
|
||||
useconfig(2)
|
||||
compile(2, prj, cfg)
|
||||
compile(2, prj, cfg, commonbasepath)
|
||||
|
||||
local librarianoptions = {
|
||||
'"%1"',
|
||||
@ -207,7 +268,7 @@ local function library(prj, cfg, useconfig)
|
||||
|
||||
_p(2, ".LibrarianOptions = ''")
|
||||
for _, option in ipairs(librarianoptions) do
|
||||
_p(2, " + ' %s'", option)
|
||||
_p(3, "+ ' %s'", option)
|
||||
end
|
||||
|
||||
_p(2, ".LibrarianOutput = '%s'", cfg.buildtarget.fullpath)
|
||||
@ -216,12 +277,12 @@ local function library(prj, cfg, useconfig)
|
||||
_p('')
|
||||
end
|
||||
|
||||
local function binary(prj, cfg, useconfig, bintype)
|
||||
local function binary(prj, cfg, useconfig, bintype, commonbasepath)
|
||||
_p(1, "ObjectList('%s_obj-%s-%s')", prj.name, cfg.name, cfg.platform)
|
||||
_p(1, '{')
|
||||
|
||||
useconfig(2)
|
||||
compile(2, prj, cfg)
|
||||
compile(2, prj, cfg, commonbasepath)
|
||||
|
||||
_p(1, '}')
|
||||
_p('')
|
||||
@ -233,8 +294,13 @@ local function binary(prj, cfg, useconfig, bintype)
|
||||
_p(2, '.Libraries = {')
|
||||
_p(3, "'%s_obj-%s-%s',", prj.name, cfg.name, cfg.platform) -- Refer to the ObjectList
|
||||
|
||||
local sorteddeplibs = {}
|
||||
for _, deplib in ipairs(premake.getlinks(cfg, "dependencies", "basename")) do
|
||||
_p(3, "'%s-%s-%s',", deplib, cfg.name, cfg.platform)
|
||||
table.insert(sorteddeplibs, string.format("'%s-%s-%s',", deplib, cfg.name, cfg.platform))
|
||||
end
|
||||
table.sort(sorteddeplibs)
|
||||
for _, deplib in ipairs(sorteddeplibs) do
|
||||
_p(3, deplib)
|
||||
end
|
||||
_p(3, '}')
|
||||
|
||||
@ -285,6 +351,10 @@ local function binary(prj, cfg, useconfig, bintype)
|
||||
table.insert(linkeroptions, '/DEF:%s', deffile)
|
||||
end
|
||||
|
||||
if (cfg.flags.Symbols ~= nil) then
|
||||
table.insert(linkeroptions, '/DEBUG')
|
||||
end
|
||||
|
||||
if premake.config.isoptimizedbuild(cfg.flags) then
|
||||
table.insert(linkeroptions, '/OPT:REF')
|
||||
table.insert(linkeroptions, '/OPT:ICF')
|
||||
@ -302,11 +372,13 @@ local function binary(prj, cfg, useconfig, bintype)
|
||||
table.insert(linkeroptions, path.getname(linklib))
|
||||
end
|
||||
|
||||
table.sort(linkeroptions)
|
||||
|
||||
_p(2, ".LinkerOptions = ''")
|
||||
for _, option in ipairs(linkeroptions) do
|
||||
_p(2, " + ' %s'", option)
|
||||
_p(3, "+ ' %s'", option)
|
||||
end
|
||||
_p(2, " + .MSVCLibPaths")
|
||||
_p(3, "+ .MSVCLibPaths")
|
||||
|
||||
_p(2, ".LinkerOutput = '%s'", cfg.buildtarget.fullpath)
|
||||
|
||||
@ -314,12 +386,12 @@ local function binary(prj, cfg, useconfig, bintype)
|
||||
_p('')
|
||||
end
|
||||
|
||||
local function executable(prj, cfg, useconfig)
|
||||
binary(prj, cfg, useconfig, 'Executable')
|
||||
local function executable(prj, cfg, useconfig, commonbasepath)
|
||||
binary(prj, cfg, useconfig, 'Executable', commonbasepath)
|
||||
end
|
||||
|
||||
local function dll(prj, cfg, useconfig)
|
||||
binary(prj, cfg, useconfig, 'DLL')
|
||||
local function dll(prj, cfg, useconfig, commonbasepath)
|
||||
binary(prj, cfg, useconfig, 'DLL', commonbasepath)
|
||||
end
|
||||
|
||||
local function alias(prj, cfg, target)
|
||||
@ -332,17 +404,14 @@ end
|
||||
|
||||
function premake.fastbuild.project(prj)
|
||||
io.indent = ' '
|
||||
_p('// FastBuild project configuration file. Generated by GENie.')
|
||||
_p('//------------------------------------------------------------------------------------')
|
||||
_p('// %s', prj.name)
|
||||
_p('//------------------------------------------------------------------------------------')
|
||||
_p('// FASTBuild project configuration file autogenerated by GENie.')
|
||||
_p('')
|
||||
|
||||
_p('{')
|
||||
|
||||
local cppfiles = {}
|
||||
for file in premake.project.eachfile(prj) do
|
||||
if path.iscppfile(file.name) then
|
||||
if path.isSourceFile(file.name) then
|
||||
table.insert(cppfiles, file.name)
|
||||
end
|
||||
end
|
||||
@ -359,7 +428,7 @@ function premake.fastbuild.project(prj)
|
||||
for _, file in ipairs(cppfiles) do
|
||||
_p(2, "'%s',", file)
|
||||
end
|
||||
_p(2, '}')
|
||||
_p(1, '}')
|
||||
_p('')
|
||||
|
||||
local targetkindmap = {
|
||||
@ -387,7 +456,7 @@ function premake.fastbuild.project(prj)
|
||||
if cfg.platform == 'Native' then
|
||||
alias(prj, cfg, string.format('%s-%s-%s', prj.name, cfg.name, nativeplatform))
|
||||
else
|
||||
targetkindmap[prj.kind](prj, cfg, useconfigmap[cfg.platform])
|
||||
targetkindmap[prj.kind](prj, cfg, useconfigmap[cfg.platform], commonbasepath)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -1,5 +1,12 @@
|
||||
-- Generates a FASTBuild config file for a solution.
|
||||
|
||||
-- Note that table order iteration should be deterministic, so the .bff file content is not
|
||||
-- arbitrarily changed each time it's generated. There are several places in this file
|
||||
-- where sorts are done for that reason.
|
||||
|
||||
function premake.fastbuild.solution(sln)
|
||||
-- Presuppose we are building a fastbuild config for vs2015 only.
|
||||
|
||||
io.indent = ' '
|
||||
_p('// FastBuild solution configuration file. Generated by GENie.')
|
||||
_p('//------------------------------------------------------------------------------------')
|
||||
@ -8,100 +15,146 @@
|
||||
|
||||
_p('#import VS140COMNTOOLS')
|
||||
|
||||
-- Create a batch file to run vcvarsall, and capture the variables it sets:
|
||||
local is64bit = os.is64bit()
|
||||
local target64 = (is64bit and ' amd64') or ' x86_amd64'
|
||||
local target32 = (is64bit and ' amd64_x86') or ''
|
||||
|
||||
-- Find vsvarsall.bat, run it to get the standard includes and libpaths:
|
||||
local vstoolspath = os.getenv('VS140COMNTOOLS')
|
||||
local getvcvarspatt = 'call "%s..\\..\\VC\\vcvarsall.bat"%s & cmd /c echo %%INCLUDE%% & cmd /c echo %%LIB%%'
|
||||
local includeslibsrawx64 = os.outputof(string.format(getvcvarspatt, vstoolspath, target64))
|
||||
local getvcvarscontent = [[
|
||||
@set INCLUDE=
|
||||
@set LIB=
|
||||
@set CommandPromptType=
|
||||
@set PreferredToolArchitecture=
|
||||
@set Platform=
|
||||
@set Path=%SystemRoot%\System32;%SystemRoot%;%SystemRoot%\System32\wbem
|
||||
|
||||
@call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" %1
|
||||
|
||||
@echo %INCLUDE%
|
||||
@echo %LIB%
|
||||
@echo %CommandPromptType%
|
||||
@echo %PreferredToolArchitecture%
|
||||
@echo %Platform%
|
||||
@echo %Path%
|
||||
]]
|
||||
|
||||
-- Save the temp file.
|
||||
|
||||
local getvcvarsfilepath = os.getenv('TEMP')..'\\getvcvars.bat'
|
||||
|
||||
local getvcvarsfile = assert(io.open(getvcvarsfilepath, 'w'))
|
||||
getvcvarsfile:write(getvcvarscontent)
|
||||
getvcvarsfile:close()
|
||||
|
||||
local vcvarsrawx86 = os.outputof(string.format('call "%s"%s', getvcvarsfilepath, target32))
|
||||
local vcvarsrawx64 = os.outputof(string.format('call "%s"%s', getvcvarsfilepath, target64))
|
||||
|
||||
os.remove(getvcvarsfilepath)
|
||||
|
||||
local msvcvars = {}
|
||||
msvcvars.x32 = {}
|
||||
msvcvars.x64 = {}
|
||||
local includeslibssplitter = string.gmatch(includeslibsrawx64, "[^\n]+")
|
||||
|
||||
local includeslibssplitter = string.gmatch(vcvarsrawx64, "[^\n]+")
|
||||
msvcvars.x64.includesraw = includeslibssplitter()
|
||||
msvcvars.x64.libpathsraw = includeslibssplitter()
|
||||
local includeslibsrawx86 = os.outputof(string.format(getvcvarspatt, vstoolspath, target32))
|
||||
msvcvars.x32 = {}
|
||||
includeslibssplitter = string.gmatch(includeslibsrawx86, "[^\n]+")
|
||||
msvcvars.x64.commandprompttype = includeslibssplitter()
|
||||
msvcvars.x64.preferredtoolarchitecture = includeslibssplitter()
|
||||
msvcvars.x64.platform = includeslibssplitter()
|
||||
msvcvars.x64.pathraw = includeslibssplitter()
|
||||
|
||||
includeslibssplitter = string.gmatch(vcvarsrawx86, "[^\n]+")
|
||||
msvcvars.x32.includesraw = includeslibssplitter()
|
||||
msvcvars.x32.libpathsraw = includeslibssplitter()
|
||||
msvcvars.x32.commandprompttype = includeslibssplitter()
|
||||
msvcvars.x32.preferredtoolarchitecture = includeslibssplitter()
|
||||
msvcvars.x32.platform = includeslibssplitter()
|
||||
msvcvars.x32.pathraw = includeslibssplitter()
|
||||
|
||||
local function printincludes(includesraw)
|
||||
_p(1, ".MSVCIncludes = ''")
|
||||
for i in string.gmatch(includesraw, "[^;]+") do
|
||||
_p(2, "+ ' /I\"%s\"'", i)
|
||||
end
|
||||
end
|
||||
|
||||
local function printlibpaths(libpathsraw)
|
||||
_p(1, ".MSVCLibPaths = ''")
|
||||
for i in string.gmatch(libpathsraw, "[^;]+") do
|
||||
_p(2, "+ ' /LIBPATH:\"%s\"'", i)
|
||||
end
|
||||
end
|
||||
|
||||
if is64bit then
|
||||
_p('.MSVCx64Config =')
|
||||
_p('[')
|
||||
_p(1, ".Compiler = '$VS140COMNTOOLS$..\\..\\VC\\bin\\amd64\\cl.exe'")
|
||||
_p(1, ".Compiler = '$VS140COMNTOOLS$..\\..\\VC\\bin\\amd64\\cl.exe'")
|
||||
_p(1, ".Librarian = '$VS140COMNTOOLS$..\\..\\VC\\bin\\amd64\\lib.exe'")
|
||||
_p(1, ".Linker = '$VS140COMNTOOLS$..\\..\\VC\\bin\\amd64\\link.exe'")
|
||||
_p(1, ".MSVCIncludes = ''")
|
||||
for i in string.gmatch(msvcvars.x64.includesraw, "[^;]+") do
|
||||
_p(1, " + ' /I\"%s\"'", i)
|
||||
end
|
||||
_p(1, ".MSVCLibPaths = ''")
|
||||
for i in string.gmatch(msvcvars.x64.libpathsraw, "[^;]+") do
|
||||
_p(1, " + ' /LIBPATH:\"%s\"'", i)
|
||||
end
|
||||
_p(1, ".Linker = '$VS140COMNTOOLS$..\\..\\VC\\bin\\amd64\\link.exe'")
|
||||
printincludes(msvcvars.x64.includesraw)
|
||||
printlibpaths(msvcvars.x64.libpathsraw)
|
||||
_p(']')
|
||||
_p('')
|
||||
|
||||
_p('.MSVCx86Config =')
|
||||
_p('[')
|
||||
_p(1, ".Compiler = '$VS140COMNTOOLS$..\\..\\VC\\bin\\amd64_x86\\cl.exe'")
|
||||
_p(1, ".Compiler = '$VS140COMNTOOLS$..\\..\\VC\\bin\\amd64_x86\\cl.exe'")
|
||||
_p(1, ".Librarian = '$VS140COMNTOOLS$..\\..\\VC\\bin\\amd64_x86\\lib.exe'")
|
||||
_p(1, ".Linker = '$VS140COMNTOOLS$..\\..\\VC\\bin\\amd64_x86\\link.exe'")
|
||||
_p(1, ".MSVCIncludes = ''")
|
||||
for i in string.gmatch(msvcvars.x32.includesraw, "[^;]+") do
|
||||
_p(1, " + ' /I\"%s\"'", i)
|
||||
end
|
||||
_p(1, ".MSVCLibPaths = ''")
|
||||
for i in string.gmatch(msvcvars.x32.libpathsraw, "[^;]+") do
|
||||
_p(1, " + ' /LIBPATH:\"%s\"'", i)
|
||||
end
|
||||
_p(1, ".Linker = '$VS140COMNTOOLS$..\\..\\VC\\bin\\amd64_x86\\link.exe'")
|
||||
printincludes(msvcvars.x32.includesraw)
|
||||
printlibpaths(msvcvars.x32.libpathsraw)
|
||||
_p(']')
|
||||
_p('')
|
||||
else
|
||||
_p('.MSVCx64Config =')
|
||||
_p('[')
|
||||
_p(1, ".Compiler = '$VS140COMNTOOLS$..\\..\\VC\\bin\\x86_amd64\\cl.exe'")
|
||||
_p(1, ".Compiler = '$VS140COMNTOOLS$..\\..\\VC\\bin\\x86_amd64\\cl.exe'")
|
||||
_p(1, ".Librarian = '$VS140COMNTOOLS$..\\..\\VC\\bin\\x86_amd64\\lib.exe'")
|
||||
_p(1, ".Linker = '$VS140COMNTOOLS$..\\..\\VC\\bin\\x86_amd64\\link.exe'")
|
||||
_p(1, ".MSVCIncludes = ''")
|
||||
for i in string.gmatch(msvcvars.x64.includesraw, "[^;]+") do
|
||||
_p(1, " + ' /I\"%s\"'", i)
|
||||
end
|
||||
_p(1, ".MSVCLibPaths = ''")
|
||||
for i in string.gmatch(msvcvars.x64.libpathsraw, "[^;]+") do
|
||||
_p(1, " + ' /LIBPATH:\"%s\"'", i)
|
||||
end
|
||||
_p(1, ".Linker = '$VS140COMNTOOLS$..\\..\\VC\\bin\\x86_amd64\\link.exe'")
|
||||
printincludes(msvcvars.x64.includesraw)
|
||||
printlibpaths(msvcvars.x64.libpathsraw)
|
||||
_p(']')
|
||||
_p('')
|
||||
|
||||
_p('.MSVCx86Config =')
|
||||
_p('[')
|
||||
_p(1, ".Compiler = '$VS140COMNTOOLS$..\\..\\VC\\bin\\cl.exe'")
|
||||
_p(1, ".Compiler = '$VS140COMNTOOLS$..\\..\\VC\\bin\\cl.exe'")
|
||||
_p(1, ".Librarian = '$VS140COMNTOOLS$..\\..\\VC\\bin\\lib.exe'")
|
||||
_p(1, ".Linker = '$VS140COMNTOOLS$..\\..\\VC\\bin\\link.exe'")
|
||||
_p(1, ".MSVCIncludes = ''")
|
||||
for i in string.gmatch(msvcvars.x32.includesraw, "[^;]+") do
|
||||
_p(1, " + ' /I\"%s\"'", i)
|
||||
end
|
||||
_p(1, ".MSVCLibPaths = ''")
|
||||
for i in string.gmatch(msvcvars.x32.libpathsraw, "[^;]+") do
|
||||
_p(1, " + ' /LIBPATH:\"%s\"'", i)
|
||||
end
|
||||
_p(1, ".Linker = '$VS140COMNTOOLS$..\\..\\VC\\bin\\link.exe'")
|
||||
printincludes(msvcvars.x32.includesraw)
|
||||
printlibpaths(msvcvars.x32.libpathsraw)
|
||||
_p(']')
|
||||
_p('')
|
||||
end
|
||||
|
||||
local msvcbin = '$VS140COMNTOOLS$..\\..\\VC\\bin' .. ((is64bit and '\\amd64') or '')
|
||||
_p('#import Path')
|
||||
_p('#import TMP')
|
||||
_p('#import SystemRoot')
|
||||
_p('')
|
||||
_p('Settings')
|
||||
_p('{')
|
||||
_p(1, '.Environment = {')
|
||||
_p(2, "'Path=%s;$Path$',", msvcbin)
|
||||
_p(2, "'TMP=$TMP$',")
|
||||
_p(2, "'SystemRoot=$SystemRoot$',")
|
||||
_p(2, '}')
|
||||
_p('}')
|
||||
_p('')
|
||||
|
||||
local function projkindsort(a, b)
|
||||
local projvaluemap = {
|
||||
ConsoleApp = 3,
|
||||
ConsoleApp = 3,
|
||||
WindowedApp = 3,
|
||||
SharedLib = 2,
|
||||
StaticLib = 1,
|
||||
}
|
||||
SharedLib = 2,
|
||||
StaticLib = 1,
|
||||
}
|
||||
|
||||
return projvaluemap[a.kind] < projvaluemap[b.kind]
|
||||
if projvaluemap[a.kind] == projvaluemap[b.kind] then
|
||||
return a.name < b.name
|
||||
else
|
||||
return projvaluemap[a.kind] < projvaluemap[b.kind]
|
||||
end
|
||||
end
|
||||
|
||||
local sortedprojs = {}
|
||||
@ -125,7 +178,7 @@
|
||||
_p(1, "'%s-%s',", cfg, plat)
|
||||
end
|
||||
end
|
||||
_p(1, '}')
|
||||
_p('}')
|
||||
_p('')
|
||||
|
||||
_p('ForEach(.Variant in .ProjectVariants)')
|
||||
@ -133,10 +186,10 @@
|
||||
_p(1, "Alias('all-$Variant$')")
|
||||
_p(1, '{')
|
||||
_p(2, '.Targets = {')
|
||||
for prj in premake.solution.eachproject(sln) do
|
||||
for _, prj in ipairs(sortedprojs) do
|
||||
_p(3, "'%s-$Variant$',", prj.name)
|
||||
end
|
||||
_p(3, '}')
|
||||
_p(2, '}')
|
||||
_p(1, '}')
|
||||
_p('}')
|
||||
end
|
||||
|
7
3rdparty/genie/src/actions/make/_make.lua
vendored
7
3rdparty/genie/src/actions/make/_make.lua
vendored
@ -134,11 +134,12 @@
|
||||
|
||||
valid_kinds = { "ConsoleApp", "WindowedApp", "StaticLib", "SharedLib" },
|
||||
|
||||
valid_languages = { "C", "C++", "C#" },
|
||||
valid_languages = { "C", "C++", "C#", "Vala" },
|
||||
|
||||
valid_tools = {
|
||||
cc = { "gcc", "ghs" },
|
||||
dotnet = { "mono", "msnet", "pnet" },
|
||||
valac = { "valac" },
|
||||
},
|
||||
|
||||
onsolution = function(sln)
|
||||
@ -149,8 +150,10 @@
|
||||
local makefile = _MAKE.getmakefilename(prj, true)
|
||||
if premake.isdotnetproject(prj) then
|
||||
premake.generate(prj, makefile, premake.make_csharp)
|
||||
else
|
||||
elseif premake.iscppproject(prj) then
|
||||
premake.generate(prj, makefile, premake.make_cpp)
|
||||
else
|
||||
premake.generate(prj, makefile, premake.make_vala)
|
||||
end
|
||||
end,
|
||||
|
||||
|
40
3rdparty/genie/src/actions/make/make_cpp.lua
vendored
40
3rdparty/genie/src/actions/make/make_cpp.lua
vendored
@ -9,7 +9,6 @@
|
||||
local cpp = premake.make.cpp
|
||||
local make = premake.make
|
||||
|
||||
|
||||
function premake.make_cpp(prj)
|
||||
|
||||
-- create a shortcut to the compiler interface
|
||||
@ -26,6 +25,8 @@
|
||||
end
|
||||
end
|
||||
|
||||
table.sort(prj.files)
|
||||
|
||||
-- list object directories
|
||||
local objdirs = {}
|
||||
local additionalobjdirs = {}
|
||||
@ -43,10 +44,10 @@
|
||||
|
||||
_p('OBJDIRS := \\')
|
||||
_p('\t$(OBJDIR) \\')
|
||||
for dir, _ in pairs(objdirs) do
|
||||
for dir, _ in iter.sortByKeys(objdirs) do
|
||||
_p('\t$(OBJDIR)/%s \\', dir)
|
||||
end
|
||||
for dir, _ in pairs(additionalobjdirs) do
|
||||
for dir, _ in iter.sortByKeys(additionalobjdirs) do
|
||||
_p('\t%s \\', dir)
|
||||
end
|
||||
_p('')
|
||||
@ -236,7 +237,7 @@
|
||||
_p('ifeq (posix,$(SHELLTYPE))')
|
||||
_p(' MKDIR = $(SILENT) mkdir -p "$(1)"')
|
||||
_p(' COPY = $(SILENT) cp -fR "$(1)" "$(2)"')
|
||||
_p(' RM = $(SILENT) rm -f "$(1)"')
|
||||
_p(' RM = $(SILENT) rm -f "$(1)"')
|
||||
_p('else')
|
||||
_p(' MKDIR = $(SILENT) mkdir "$(subst /,\\\\,$(1))" 2> nul || exit 0')
|
||||
_p(' COPY = $(SILENT) copy /Y "$(subst /,\\\\,$(1))" "$(subst /,\\\\,$(2))"')
|
||||
@ -270,11 +271,13 @@
|
||||
-- if this platform requires a special compiler or linker, list it here
|
||||
cpp.platformtools(cfg, cc)
|
||||
|
||||
_p(' ' .. (table.contains(premake.make.override,"OBJDIR") and "override " or "") .. 'OBJDIR = %s', _MAKE.esc(cfg.objectsdir))
|
||||
_p(' ' .. (table.contains(premake.make.override,"TARGETDIR") and "override " or "") .. 'TARGETDIR = %s', _MAKE.esc(cfg.buildtarget.directory))
|
||||
_p(' ' .. (table.contains(premake.make.override,"TARGET") and "override " or "") .. 'TARGET = $(TARGETDIR)/%s', _MAKE.esc(cfg.buildtarget.name))
|
||||
_p(' DEFINES +=%s', make.list(cc.getdefines(cfg.defines)))
|
||||
_p(' INCLUDES +=%s', make.list(cc.getincludedirs(cfg.includedirs)))
|
||||
_p(' ' .. (table.contains(premake.make.override,"OBJDIR") and "override " or "") .. 'OBJDIR = %s', _MAKE.esc(cfg.objectsdir))
|
||||
_p(' ' .. (table.contains(premake.make.override,"TARGETDIR") and "override " or "") .. 'TARGETDIR = %s', _MAKE.esc(cfg.buildtarget.directory))
|
||||
_p(' ' .. (table.contains(premake.make.override,"TARGET") and "override " or "") .. 'TARGET = $(TARGETDIR)/%s', _MAKE.esc(cfg.buildtarget.name))
|
||||
_p(' DEFINES +=%s', make.list(cc.getdefines(cfg.defines)))
|
||||
_p(' INCLUDES +=%s', make.list(cc.getincludedirs(cfg.includedirs)))
|
||||
_p(' INCLUDES +=%s', make.list(cc.getquoteincludedirs(cfg.userincludedirs)))
|
||||
|
||||
|
||||
-- set up precompiled headers
|
||||
cpp.pchconfig(cfg)
|
||||
@ -285,6 +288,8 @@
|
||||
-- write out libraries, linker flags, and the link command
|
||||
cpp.linker(prj, cfg, cc)
|
||||
|
||||
table.sort(prj.files)
|
||||
|
||||
-- add objects for compilation, and remove any that are excluded per config.
|
||||
_p(' OBJECTS := \\')
|
||||
for _, file in ipairs(prj.files) do
|
||||
@ -383,16 +388,16 @@
|
||||
-- Patch #3401184 changed the order
|
||||
_p(' ALL_LDFLAGS += $(LDFLAGS)%s', make.list(table.join(cc.getlibdirflags(cfg), cc.getldflags(cfg), cfg.linkoptions)))
|
||||
|
||||
_p(' LDDEPS +=%s', make.list(_MAKE.esc(premake.getlinks(cfg, "siblings", "fullpath"))))
|
||||
_p(' LIBS += $(LDDEPS)%s', make.list(cc.getlinkflags(cfg)))
|
||||
_p(' LDDEPS +=%s', make.list(_MAKE.esc(premake.getlinks(cfg, "siblings", "fullpath"))))
|
||||
_p(' LIBS += $(LDDEPS)%s', make.list(cc.getlinkflags(cfg)))
|
||||
_p(' EXTERNAL_LIBS +=%s', make.list(cc.getlibfiles(cfg)))
|
||||
|
||||
if cfg.kind == "StaticLib" then
|
||||
if (not prj.options.ArchiveSplit) then
|
||||
_p(' LINKCMD = $(AR) %s $(TARGET)', make.list(cc.getarchiveflags(prj, cfg, false)))
|
||||
_p(' LINKCMD = $(AR) %s $(TARGET)', make.list(cc.getarchiveflags(prj, cfg, false)))
|
||||
else
|
||||
_p(' LINKCMD = $(AR) %s $(TARGET)', make.list(cc.getarchiveflags(prj, cfg, false)))
|
||||
_p(' LINKCMD_NDX= $(AR) %s $(TARGET)', make.list(cc.getarchiveflags(prj, cfg, true)))
|
||||
_p(' LINKCMD = $(AR) %s $(TARGET)', make.list(cc.getarchiveflags(prj, cfg, false)))
|
||||
_p(' LINKCMD_NDX = $(AR) %s $(TARGET)', make.list(cc.getarchiveflags(prj, cfg, true)))
|
||||
end
|
||||
else
|
||||
|
||||
@ -402,7 +407,7 @@
|
||||
-- $(LIBS) moved to end (http://sourceforge.net/p/premake/bugs/279/)
|
||||
|
||||
local tool = iif(cfg.language == "C", "CC", "CXX")
|
||||
_p(' LINKCMD = $(%s) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)', tool)
|
||||
_p(' LINKCMD = $(%s) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(ALL_LDFLAGS) $(LIBS)', tool)
|
||||
|
||||
end
|
||||
end
|
||||
@ -444,8 +449,8 @@
|
||||
end
|
||||
end
|
||||
|
||||
_p(' PCH = %s', _MAKE.esc(pch))
|
||||
_p(' GCH = $(OBJDIR)/$(notdir $(PCH)).gch')
|
||||
_p(' PCH = %s', _MAKE.esc(pch))
|
||||
_p(' GCH = $(OBJDIR)/$(notdir $(PCH)).gch')
|
||||
|
||||
end
|
||||
|
||||
@ -472,6 +477,7 @@
|
||||
--
|
||||
|
||||
function cpp.fileRules(prj)
|
||||
table.sort(prj.files)
|
||||
for _, file in ipairs(prj.files or {}) do
|
||||
if path.isSourceFile(file) then
|
||||
_p('$(OBJDIR)/%s.o: %s $(GCH)'
|
||||
|
@ -15,7 +15,7 @@
|
||||
_p('# %s solution makefile autogenerated by GENie', premake.action.current().shortname)
|
||||
_p('# Type "make help" for usage help')
|
||||
_p('')
|
||||
|
||||
|
||||
-- set a default configuration
|
||||
_p('ifndef config')
|
||||
_p(' config=%s', _MAKE.esc(premake.getconfigname(sln.configurations[1], platforms[1], true)))
|
||||
@ -23,8 +23,11 @@
|
||||
_p('export config')
|
||||
_p('')
|
||||
|
||||
local projects = table.extract(sln.projects, "name")
|
||||
table.sort(projects)
|
||||
|
||||
-- list the projects included in the solution
|
||||
_p('PROJECTS := %s', table.concat(_MAKE.esc(table.extract(sln.projects, "name")), " "))
|
||||
_p('PROJECTS := %s', table.concat(_MAKE.esc(projects), " "))
|
||||
_p('')
|
||||
_p('.PHONY: all clean help $(PROJECTS)')
|
||||
_p('')
|
||||
@ -47,7 +50,7 @@
|
||||
_p('\t@${MAKE} --no-print-directory -C %s -f %s clean', _MAKE.esc(path.getrelative(sln.location, prj.location)), _MAKE.esc(_MAKE.getmakefilename(prj, true)))
|
||||
end
|
||||
_p('')
|
||||
|
||||
|
||||
-- help rule
|
||||
_p('help:')
|
||||
_p(1,'@echo "Usage: make [config=name] [target]"')
|
||||
@ -72,5 +75,5 @@
|
||||
|
||||
_p(1,'@echo ""')
|
||||
_p(1,'@echo "For more information, see https://github.com/bkaradzic/genie"')
|
||||
|
||||
|
||||
end
|
||||
|
153
3rdparty/genie/src/actions/make/make_vala.lua
vendored
Normal file
153
3rdparty/genie/src/actions/make/make_vala.lua
vendored
Normal file
@ -0,0 +1,153 @@
|
||||
--
|
||||
-- make_vala.lua
|
||||
-- Generate a Vala project makefile.
|
||||
--
|
||||
|
||||
local make = premake.make
|
||||
|
||||
function premake.make_vala(prj)
|
||||
|
||||
-- create a shortcut to the compiler interface
|
||||
local valac = premake.gettool(prj)
|
||||
|
||||
-- build a list of supported target platforms that also includes a generic build
|
||||
local platforms = premake.filterplatforms(prj.solution, valac.platforms, "Native")
|
||||
|
||||
_p('# %s project makefile autogenerated by GENie', premake.action.current().shortname)
|
||||
|
||||
-- set up the environment
|
||||
_p('ifndef config')
|
||||
_p(' config=%s', _MAKE.esc(premake.getconfigname(prj.solution.configurations[1], platforms[1], true)))
|
||||
_p('endif')
|
||||
_p('')
|
||||
|
||||
_p('ifndef verbose')
|
||||
_p(' SILENT = @')
|
||||
_p('endif')
|
||||
_p('')
|
||||
|
||||
-- identify the shell type
|
||||
_p('SHELLTYPE := msdos')
|
||||
_p('ifeq (,$(ComSpec)$(COMSPEC))')
|
||||
_p(' SHELLTYPE := posix')
|
||||
_p('endif')
|
||||
_p('ifeq (/bin,$(findstring /bin,$(SHELL)))')
|
||||
_p(' SHELLTYPE := posix')
|
||||
_p('endif')
|
||||
_p('ifeq (/bin,$(findstring /bin,$(MAKESHELL)))')
|
||||
_p(' SHELLTYPE := posix')
|
||||
_p('endif')
|
||||
_p('')
|
||||
|
||||
_p('ifeq (posix,$(SHELLTYPE))')
|
||||
_p(' MKDIR = $(SILENT) mkdir -p "$(1)"')
|
||||
_p(' COPY = $(SILENT) cp -fR "$(1)" "$(2)"')
|
||||
_p(' RM = $(SILENT) rm -f "$(1)"')
|
||||
_p('else')
|
||||
_p(' MKDIR = $(SILENT) mkdir "$(subst /,\\\\,$(1))" 2> nul || exit 0')
|
||||
_p(' COPY = $(SILENT) copy /Y "$(subst /,\\\\,$(1))" "$(subst /,\\\\,$(2))"')
|
||||
_p(' RM = $(SILENT) del /F "$(subst /,\\\\,$(1))" 2> nul || exit 0')
|
||||
_p('endif')
|
||||
_p('')
|
||||
|
||||
_p('VALAC = %s', valac.valac)
|
||||
_p('CC = %s', valac.cc)
|
||||
_p('')
|
||||
|
||||
-- write configuration blocks
|
||||
for _, platform in ipairs(platforms) do
|
||||
for cfg in premake.eachconfig(prj, platform) do
|
||||
premake.gmake_valac_config(prj, cfg, valac)
|
||||
end
|
||||
end
|
||||
|
||||
-- list sources
|
||||
_p('SOURCES := \\')
|
||||
for _, file in ipairs(prj.files) do
|
||||
if path.isSourceFile(file) then
|
||||
-- check if file is excluded.
|
||||
if not table.icontains(prj.excludes, file) then
|
||||
-- if not excluded, add it.
|
||||
_p('\t%s \\', _MAKE.esc(file))
|
||||
end
|
||||
end
|
||||
end
|
||||
_p('')
|
||||
|
||||
-- main build rule(s)
|
||||
_p('.PHONY: clean prebuild prelink')
|
||||
_p('')
|
||||
|
||||
-- target build rule
|
||||
_p('$(TARGET): $(SOURCES) | $(TARGETDIR)')
|
||||
_p('\t$(SILENT) $(VALAC) -o $(TARGET) --cc=$(CC) $(FLAGS) $(SOURCES)')
|
||||
_p('\t$(POSTBUILDCMDS)')
|
||||
_p('')
|
||||
|
||||
-- Create destination directories. Can't use $@ for this because it loses the
|
||||
-- escaping, causing issues with spaces and parenthesis
|
||||
_p('$(TARGETDIR):')
|
||||
premake.make_mkdirrule("$(TARGETDIR)")
|
||||
|
||||
-- clean target
|
||||
_p('clean:')
|
||||
if (not prj.solution.messageskip) or (not table.contains(prj.solution.messageskip, "SkipCleaningMessage")) then
|
||||
_p('\t@echo Cleaning %s', prj.name)
|
||||
end
|
||||
_p('ifeq (posix,$(SHELLTYPE))')
|
||||
_p('\t$(SILENT) rm -f $(TARGET)')
|
||||
_p('else')
|
||||
_p('\t$(SILENT) if exist $(subst /,\\\\,$(TARGET)) del $(subst /,\\\\,$(TARGET))')
|
||||
_p('endif')
|
||||
_p('')
|
||||
|
||||
-- custom build step targets
|
||||
_p('prebuild:')
|
||||
_p('\t$(PREBUILDCMDS)')
|
||||
_p('')
|
||||
|
||||
_p('prelink:')
|
||||
_p('\t$(PRELINKCMDS)')
|
||||
_p('')
|
||||
end
|
||||
|
||||
|
||||
|
||||
--
|
||||
-- Write a block of configuration settings.
|
||||
--
|
||||
|
||||
function premake.gmake_valac_config(prj, cfg, valac)
|
||||
|
||||
_p('ifeq ($(config),%s)', _MAKE.esc(cfg.shortname))
|
||||
|
||||
_p(' TARGETDIR = %s', _MAKE.esc(cfg.buildtarget.directory))
|
||||
_p(' TARGET = $(TARGETDIR)/%s', _MAKE.esc(cfg.buildtarget.name))
|
||||
_p(' DEFINES +=%s', make.list(valac.getdefines(cfg.defines)))
|
||||
_p(' PKGS +=%s', make.list(valac.getlinks(cfg.links)))
|
||||
_p(' FLAGS += $(DEFINES) $(PKGS)%s', make.list(table.join(valac.getvalaflags(cfg), valac.getbuildoptions(cfg.buildoptions), valac.getbuildoptions(cfg.buildoptions_c))))
|
||||
|
||||
_p(' define PREBUILDCMDS')
|
||||
if #cfg.prebuildcommands > 0 then
|
||||
_p('\t@echo Running pre-build commands')
|
||||
_p('\t%s', table.implode(cfg.prebuildcommands, "", "", "\n\t"))
|
||||
end
|
||||
_p(' endef')
|
||||
|
||||
_p(' define PRELINKCMDS')
|
||||
if #cfg.prelinkcommands > 0 then
|
||||
_p('\t@echo Running pre-link commands')
|
||||
_p('\t%s', table.implode(cfg.prelinkcommands, "", "", "\n\t"))
|
||||
end
|
||||
_p(' endef')
|
||||
|
||||
_p(' define POSTBUILDCMDS')
|
||||
if #cfg.postbuildcommands > 0 then
|
||||
_p('\t@echo Running post-build commands')
|
||||
_p('\t%s', table.implode(cfg.postbuildcommands, "", "", "\n\t"))
|
||||
end
|
||||
_p(' endef')
|
||||
|
||||
_p('endif')
|
||||
_p('')
|
||||
end
|
50
3rdparty/genie/src/actions/ninja/_ninja.lua
vendored
Normal file
50
3rdparty/genie/src/actions/ninja/_ninja.lua
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
premake.ninja = { }
|
||||
|
||||
local p = premake
|
||||
|
||||
newaction
|
||||
{
|
||||
-- Metadata for the command line and help system
|
||||
trigger = "ninja",
|
||||
shortname = "ninja",
|
||||
description = "Ninja is a small build system with a focus on speed",
|
||||
module = "ninja",
|
||||
|
||||
-- The capabilities of this action
|
||||
valid_kinds = {"ConsoleApp", "WindowedApp", "SharedLib", "StaticLib"},
|
||||
valid_languages = {"C", "C++"},
|
||||
valid_tools = {
|
||||
cc = { "gcc" }
|
||||
},
|
||||
|
||||
-- Solution and project generation logic
|
||||
onsolution = function(sln)
|
||||
io.eol = "\r\n"
|
||||
io.indent = "\t"
|
||||
io.escaper(p.ninja.esc)
|
||||
p.generate(sln, "Makefile", p.ninja.generate_solution)
|
||||
io.indent = " "
|
||||
p.ninja.generate_ninja_builds(sln)
|
||||
end,
|
||||
|
||||
onproject = function(prj)
|
||||
io.eol = "\r\n"
|
||||
io.indent = " "
|
||||
io.escaper(p.ninja.esc)
|
||||
p.ninja.generate_project(prj)
|
||||
end,
|
||||
|
||||
oncleansolution = function(sln)
|
||||
for _,name in ipairs(sln.configurations) do
|
||||
premake.clean.file(sln, p.ninja.get_solution_name(sln, name))
|
||||
end
|
||||
end,
|
||||
|
||||
oncleanproject = function(prj)
|
||||
-- TODO
|
||||
end,
|
||||
|
||||
oncleantarget = function(prj)
|
||||
-- TODO
|
||||
end,
|
||||
}
|
143
3rdparty/genie/src/actions/ninja/ninja_base.lua
vendored
Normal file
143
3rdparty/genie/src/actions/ninja/ninja_base.lua
vendored
Normal file
@ -0,0 +1,143 @@
|
||||
--
|
||||
-- Name: ninja_base.lua
|
||||
-- Purpose: Define the ninja action.
|
||||
-- Author: Stuart Carnie (stuart.carnie at gmail.com)
|
||||
--
|
||||
|
||||
local ninja = premake.ninja
|
||||
|
||||
function ninja.esc(value)
|
||||
value = value:gsub("%$", "$$") -- TODO maybe there is better way
|
||||
value = value:gsub(":", "$:")
|
||||
value = value:gsub("\n", "$\n")
|
||||
value = value:gsub(" ", "$ ")
|
||||
return value
|
||||
end
|
||||
|
||||
-- in some cases we write file names in rule commands directly
|
||||
-- so we need to propely escape them
|
||||
function ninja.shesc(value)
|
||||
if type(value) == "table" then
|
||||
local result = {}
|
||||
local n = #value
|
||||
for i = 1, n do
|
||||
table.insert(result, ninja.shesc(value[i]))
|
||||
end
|
||||
return result
|
||||
end
|
||||
|
||||
if value:find(" ") then
|
||||
return "\"" .. value .. "\""
|
||||
end
|
||||
|
||||
return value
|
||||
end
|
||||
|
||||
function ninja.list(value)
|
||||
if #value > 0 then
|
||||
return " " .. table.concat(value, " ")
|
||||
else
|
||||
return ""
|
||||
end
|
||||
end
|
||||
|
||||
-- generate all build files for every project configuration
|
||||
function ninja.generate_project(prj)
|
||||
ninja.generate_cpp(prj)
|
||||
end
|
||||
|
||||
local function innerget(self, key)
|
||||
return rawget(getmetatable(self), key) or self.__inner[key]
|
||||
end
|
||||
|
||||
local prj_proxy = { __index = innerget }
|
||||
|
||||
local cfg_proxy = { __index = innerget }
|
||||
|
||||
function new_prj_proxy(prj)
|
||||
prj = prj.project or prj
|
||||
|
||||
local v = { __inner = prj }
|
||||
|
||||
local __configs = {}
|
||||
for key, cfg in pairs(prj.__configs) do
|
||||
if key ~= "" then
|
||||
__configs[key] = ninja.get_proxy("cfg", cfg)
|
||||
else
|
||||
__configs[key] = cfg
|
||||
end
|
||||
end
|
||||
v.__configs = __configs
|
||||
|
||||
return setmetatable(v, prj_proxy)
|
||||
end
|
||||
|
||||
local function rebasekeys(t, keys, old, new)
|
||||
for _,key in ipairs(keys) do
|
||||
t[key] = path.rebase(t[key], old, new)
|
||||
end
|
||||
return t
|
||||
end
|
||||
|
||||
local function rebasearray(t, old, new)
|
||||
local res = { }
|
||||
for _,f in ipairs(t) do
|
||||
table.insert(res, path.rebase(f, old, new))
|
||||
end
|
||||
return res
|
||||
end
|
||||
|
||||
function new_cfg_proxy(cfg)
|
||||
local keys = { "directory", "fullpath", "bundlepath" }
|
||||
|
||||
local old = cfg.location
|
||||
local new = path.join(cfg.location, cfg.shortname)
|
||||
local v = {
|
||||
__inner = cfg,
|
||||
location = new,
|
||||
objectsdir = path.rebase(cfg.objectsdir, old, new),
|
||||
buildtarget = rebasekeys(table.deepcopy(cfg.buildtarget), keys, old, new),
|
||||
linktarget = rebasekeys(table.deepcopy(cfg.buildtarget), keys, old, new),
|
||||
}
|
||||
|
||||
v.files = rebasearray(cfg.files, old, new)
|
||||
v.includedirs = rebasearray(cfg.includedirs, old, new)
|
||||
v.userincludedirs = rebasearray(cfg.userincludedirs, old, new)
|
||||
|
||||
return setmetatable(v, cfg_proxy)
|
||||
end
|
||||
|
||||
function cfg_proxy:getprojectfilename(fullpath)
|
||||
local name = self.project.name .. ".ninja"
|
||||
|
||||
if fullpath ~= nil then
|
||||
return path.join(self.location, name)
|
||||
end
|
||||
|
||||
return name
|
||||
end
|
||||
|
||||
function cfg_proxy:getoutputfilename()
|
||||
return path.join(self.buildtarget.directory, self.buildtarget.name)
|
||||
end
|
||||
|
||||
local proxy_cache = {
|
||||
prj = { new = new_prj_proxy },
|
||||
cfg = { new = new_cfg_proxy },
|
||||
}
|
||||
|
||||
function get_proxy(cache, obj)
|
||||
if not cache[obj] then
|
||||
cache[obj] = cache.new(obj)
|
||||
end
|
||||
return cache[obj]
|
||||
end
|
||||
|
||||
function ninja.get_proxy(typ, obj)
|
||||
if not proxy_cache[typ] then
|
||||
error("invalid proxy type")
|
||||
end
|
||||
|
||||
return get_proxy(proxy_cache[typ], obj)
|
||||
end
|
||||
|
149
3rdparty/genie/src/actions/ninja/ninja_cpp.lua
vendored
Normal file
149
3rdparty/genie/src/actions/ninja/ninja_cpp.lua
vendored
Normal file
@ -0,0 +1,149 @@
|
||||
premake.ninja.cpp = { }
|
||||
local ninja = premake.ninja
|
||||
local cpp = premake.ninja.cpp
|
||||
local p = premake
|
||||
local tree = p.tree
|
||||
|
||||
-- generate project + config build file
|
||||
function ninja.generate_cpp(prj)
|
||||
local pxy = ninja.get_proxy("prj", prj)
|
||||
local tool = premake.gettool(prj)
|
||||
|
||||
-- build a list of supported target platforms that also includes a generic build
|
||||
local platforms = premake.filterplatforms(prj.solution, tool.platforms, "Native")
|
||||
|
||||
for _, platform in ipairs(platforms) do
|
||||
for cfg in p.eachconfig(pxy, platform) do
|
||||
p.generate(cfg, cfg:getprojectfilename(), function() cpp.generate_config(prj, cfg) end)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function cpp.generate_config(prj, cfg)
|
||||
local tool = premake.gettool(prj)
|
||||
|
||||
_p("# project build file")
|
||||
_p("# generated with GENie ninja")
|
||||
_p("")
|
||||
|
||||
-- needed for implicit outputs, introduced in 1.7
|
||||
_p("ninja_required_version = 1.7")
|
||||
_p("")
|
||||
|
||||
local flags = {
|
||||
defines = ninja.list(tool.getdefines(cfg.defines)),
|
||||
includes = ninja.list(table.join(tool.getincludedirs(cfg.includedirs), tool.getquoteincludedirs(cfg.userincludedirs))),
|
||||
cppflags = ninja.list(tool.getcppflags(cfg)),
|
||||
cflags = ninja.list(table.join(tool.getcflags(cfg), cfg.buildoptions, cfg.buildoptions_c)),
|
||||
cxxflags = ninja.list(table.join(tool.getcflags(cfg), tool.getcxxflags(cfg), cfg.buildoptions, cfg.buildoptions_cpp)),
|
||||
objcflags = ninja.list(table.join(tool.getcflags(cfg), tool.getcxxflags(cfg), cfg.buildoptions, cfg.buildoptions_objc)),
|
||||
}
|
||||
|
||||
_p("")
|
||||
|
||||
_p("# core rules for " .. cfg.name)
|
||||
_p("rule cc")
|
||||
_p(" command = " .. tool.cc .. " $defines $includes $flags -MMD -MF $out.d -c -o $out $in")
|
||||
_p(" description = cc $out")
|
||||
_p(" depfile = $out.d")
|
||||
_p(" deps = gcc")
|
||||
_p("")
|
||||
_p("rule cxx")
|
||||
_p(" command = " .. tool.cxx .. " $defines $includes $flags -MMD -MF $out.d -c -o $out $in")
|
||||
_p(" description = cxx $out")
|
||||
_p(" depfile = $out.d")
|
||||
_p(" deps = gcc")
|
||||
_p("")
|
||||
_p("rule ar")
|
||||
_p(" command = " .. tool.ar .. " $flags $out $in $libs " .. (os.is("MacOSX") and " 2>&1 > /dev/null | sed -e '/.o) has no symbols$$/d'" or ""))
|
||||
_p(" description = ar $out")
|
||||
_p("")
|
||||
|
||||
|
||||
local link = iif(cfg.language == "C", tool.cc, tool.cxx)
|
||||
_p("rule link")
|
||||
_p(" command = " .. link .. " -o $out $in $all_ldflags $libs")
|
||||
_p(" description = link $out")
|
||||
_p("")
|
||||
|
||||
cpp.file_rules(cfg, flags)
|
||||
|
||||
local objfiles = {}
|
||||
|
||||
for _, file in ipairs(cfg.files) do
|
||||
if path.isSourceFile(file) then
|
||||
table.insert(objfiles, cpp.objectname(cfg, file))
|
||||
end
|
||||
end
|
||||
_p('')
|
||||
|
||||
cpp.linker(prj, cfg, objfiles, tool, flags)
|
||||
|
||||
_p("")
|
||||
end
|
||||
|
||||
function cpp.objectname(cfg, file)
|
||||
return path.join(cfg.objectsdir, path.trimdots(path.removeext(file)) .. ".o")
|
||||
end
|
||||
|
||||
function cpp.file_rules(cfg, flags)
|
||||
_p("# build files")
|
||||
|
||||
for _, file in ipairs(cfg.files) do
|
||||
if path.isSourceFile(file) then
|
||||
local objfilename = cpp.objectname(cfg, file)
|
||||
|
||||
local cflags = "cflags"
|
||||
if path.isobjcfile(file) then
|
||||
_p("build " .. objfilename .. ": cxx " .. file)
|
||||
cflags = "objcflags"
|
||||
elseif path.iscfile(file) and not cfg.options.ForceCPP then
|
||||
_p("build " .. objfilename .. ": cc " .. file)
|
||||
else
|
||||
_p("build " .. objfilename .. ": cxx " .. file)
|
||||
cflags = "cxxflags"
|
||||
end
|
||||
|
||||
_p(1, "flags = " .. flags[cflags])
|
||||
_p(1, "includes = " .. flags.includes)
|
||||
_p(1, "defines = " .. flags.defines)
|
||||
elseif path.isresourcefile(file) then
|
||||
-- TODO
|
||||
end
|
||||
end
|
||||
|
||||
_p("")
|
||||
end
|
||||
|
||||
function cpp.linker(prj, cfg, objfiles, tool)
|
||||
local all_ldflags = ninja.list(table.join(tool.getlibdirflags(cfg), tool.getldflags(cfg), cfg.linkoptions))
|
||||
local lddeps = ninja.list(premake.getlinks(cfg, "siblings", "fullpath"))
|
||||
local libs = lddeps .. " " .. ninja.list(tool.getlinkflags(cfg))
|
||||
|
||||
local function writevars()
|
||||
_p(1, "all_ldflags = " .. all_ldflags)
|
||||
_p(1, "libs = " .. libs)
|
||||
end
|
||||
|
||||
if cfg.kind == "StaticLib" then
|
||||
local ar_flags = ninja.list(tool.getarchiveflags(cfg, cfg, false))
|
||||
_p("# link static lib")
|
||||
_p("build " .. cfg:getoutputfilename() .. ": ar " .. table.concat(objfiles, " ") .. " | " .. lddeps)
|
||||
_p(1, "flags = " .. ninja.list(tool.getarchiveflags(cfg, cfg, false)))
|
||||
elseif cfg.kind == "SharedLib" then
|
||||
local output = cfg:getoutputfilename()
|
||||
_p("# link shared lib")
|
||||
_p("build " .. output .. ": link " .. table.concat(objfiles, " ") .. " | " .. libs)
|
||||
writevars()
|
||||
elseif (cfg.kind == "ConsoleApp") or (cfg.kind == "WindowedApp") then
|
||||
_p("# link executable")
|
||||
_p("build " .. cfg:getoutputfilename() .. ": link " .. table.concat(objfiles, " ") .. " | " .. lddeps)
|
||||
writevars()
|
||||
else
|
||||
p.error("ninja action doesn't support this kind of target " .. cfg.kind)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
162
3rdparty/genie/src/actions/ninja/ninja_solution.lua
vendored
Normal file
162
3rdparty/genie/src/actions/ninja/ninja_solution.lua
vendored
Normal file
@ -0,0 +1,162 @@
|
||||
local ninja = premake.ninja
|
||||
local p = premake
|
||||
local solution = p.solution
|
||||
|
||||
function ninja.generate_solution(sln)
|
||||
-- create a shortcut to the compiler interface
|
||||
local cc = premake[_OPTIONS.cc]
|
||||
|
||||
-- build a list of supported target platforms that also includes a generic build
|
||||
local platforms = premake.filterplatforms(sln, cc.platforms, "Native")
|
||||
|
||||
-- write a header showing the build options
|
||||
_p('# %s solution makefile autogenerated by GENie', premake.action.current().shortname)
|
||||
_p('# Type "make help" for usage help')
|
||||
_p('')
|
||||
_p('NINJA=ninja')
|
||||
|
||||
-- set a default configuration
|
||||
_p('ifndef config')
|
||||
_p(' config=%s', _MAKE.esc(premake.getconfigname(sln.configurations[1], platforms[1], true)))
|
||||
_p('endif')
|
||||
_p('')
|
||||
|
||||
local projects = table.extract(sln.projects, "name")
|
||||
table.sort(projects)
|
||||
|
||||
_p('')
|
||||
_p('.PHONY: all clean help $(PROJECTS)')
|
||||
_p('')
|
||||
_p('all:')
|
||||
if (not sln.messageskip) or (not table.contains(sln.messageskip, "SkipBuildingMessage")) then
|
||||
_p(1, '@echo "==== Building all ($(config)) ===="')
|
||||
end
|
||||
_p(1, '@${NINJA} -C ${config} all')
|
||||
_p('')
|
||||
|
||||
-- write the project build rules
|
||||
for _, prj in ipairs(sln.projects) do
|
||||
local prjx = ninja.get_proxy("prj", prj)
|
||||
_p('%s:', _MAKE.esc(prj.name))
|
||||
if (not sln.messageskip) or (not table.contains(sln.messageskip, "SkipBuildingMessage")) then
|
||||
_p(1, '@echo "==== Building %s ($(config)) ===="', prj.name)
|
||||
end
|
||||
_p(1, '@${NINJA} -C ${config} %s', prj.name)
|
||||
_p('')
|
||||
end
|
||||
|
||||
-- clean rules
|
||||
_p('clean:')
|
||||
_p(1, '@${NINJA} -C ${config} -t clean')
|
||||
_p('')
|
||||
|
||||
-- help rule
|
||||
_p('help:')
|
||||
_p(1,'@echo "Usage: make [config=name] [target]"')
|
||||
_p(1,'@echo ""')
|
||||
_p(1,'@echo "CONFIGURATIONS:"')
|
||||
|
||||
local cfgpairs = { }
|
||||
for _, platform in ipairs(platforms) do
|
||||
for _, cfgname in ipairs(sln.configurations) do
|
||||
_p(1,'@echo " %s"', premake.getconfigname(cfgname, platform, true))
|
||||
end
|
||||
end
|
||||
|
||||
_p(1,'@echo ""')
|
||||
_p(1,'@echo "TARGETS:"')
|
||||
_p(1,'@echo " all (default)"')
|
||||
_p(1,'@echo " clean"')
|
||||
|
||||
for _, prj in ipairs(sln.projects) do
|
||||
_p(1,'@echo " %s"', prj.name)
|
||||
end
|
||||
|
||||
_p(1,'@echo ""')
|
||||
_p(1,'@echo "For more information, see https://github.com/bkaradzic/genie"')
|
||||
end
|
||||
|
||||
-- generate solution that will call ninja for projects
|
||||
local generate
|
||||
|
||||
local function getconfigs(sln, name, plat)
|
||||
local cfgs = {}
|
||||
for prj in solution.eachproject(sln) do
|
||||
prj = ninja.get_proxy("prj", prj)
|
||||
for cfg in p.eachconfig(prj, plat) do
|
||||
if cfg.name == name then
|
||||
table.insert(cfgs, cfg)
|
||||
end
|
||||
end
|
||||
end
|
||||
return cfgs
|
||||
end
|
||||
|
||||
function ninja.generate_ninja_builds(sln)
|
||||
-- create a shortcut to the compiler interface
|
||||
local cc = premake[_OPTIONS.cc]
|
||||
|
||||
sln.getlocation = function(cfg, plat)
|
||||
return path.join(sln.location, premake.getconfigname(cfg, plat, true))
|
||||
end
|
||||
|
||||
-- build a list of supported target platforms that also includes a generic build
|
||||
local platforms = premake.filterplatforms(sln, cc.platforms, "Native")
|
||||
|
||||
for _,plat in ipairs(platforms) do
|
||||
for _,name in ipairs(sln.configurations) do
|
||||
p.generate(sln, ninja.get_solution_name(sln, name, plat), function(sln)
|
||||
generate(getconfigs(sln, name, plat))
|
||||
end)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function ninja.get_solution_name(sln, cfg, plat)
|
||||
return path.join(sln.getlocation(cfg, plat), "build.ninja")
|
||||
end
|
||||
|
||||
function generate(prjcfgs)
|
||||
local cfgs = {}
|
||||
local cfg_first = nil
|
||||
local cfg_first_lib = nil
|
||||
|
||||
_p("# solution build file")
|
||||
_p("# generated with GENie ninja")
|
||||
_p("")
|
||||
|
||||
_p("# build projects")
|
||||
for _,cfg in ipairs(prjcfgs) do
|
||||
local key = cfg.project.name
|
||||
|
||||
-- fill list of output files
|
||||
if not cfgs[key] then cfgs[key] = "" end
|
||||
cfgs[key] = cfg:getoutputfilename() .. " "
|
||||
|
||||
if not cfgs["all"] then cfgs["all"] = "" end
|
||||
cfgs["all"] = cfgs["all"] .. cfg:getoutputfilename() .. " "
|
||||
|
||||
-- set first configuration name
|
||||
if (cfg_first == nil) and (cfg.kind == "ConsoleApp" or cfg.kind == "WindowedApp") then
|
||||
cfg_first = key
|
||||
end
|
||||
if (cfg_first_lib == nil) and (cfg.kind == "StaticLib" or cfg.kind == "SharedLib") then
|
||||
cfg_first_lib = key
|
||||
end
|
||||
|
||||
-- include other ninja file
|
||||
_p("subninja " .. cfg:getprojectfilename())
|
||||
end
|
||||
|
||||
_p("")
|
||||
|
||||
_p("# targets")
|
||||
for cfg, outputs in iter.sortByKeys(cfgs) do
|
||||
_p("build " .. cfg .. ": phony " .. outputs)
|
||||
end
|
||||
_p("")
|
||||
|
||||
_p("# default target")
|
||||
_p("default " .. (cfg_first or cfg_first_lib))
|
||||
_p("")
|
||||
end
|
@ -241,8 +241,11 @@
|
||||
_p(4,'OmitFramePointers="%s"', bool(true))
|
||||
end
|
||||
|
||||
if #cfg.includedirs > 0 then
|
||||
_p(4,'AdditionalIncludeDirectories="%s"', premake.esc(path.translate(table.concat(cfg.includedirs, ";"), '\\')))
|
||||
|
||||
local includedirs = table.join(cfg.userincludedirs, cfg.includedirs)
|
||||
|
||||
if #includedirs > 0 then
|
||||
_p(4,'AdditionalIncludeDirectories="%s"', premake.esc(path.translate(table.concat(includedirs, ";"), '\\')))
|
||||
end
|
||||
|
||||
if #cfg.defines > 0 then
|
||||
@ -448,8 +451,10 @@
|
||||
|
||||
_p(4,'AdditionalOptions="%s"', premake.esc(table.concat(buildoptions, " ")))
|
||||
|
||||
if #cfg.includedirs > 0 then
|
||||
_p(4,'AdditionalIncludeDirectories="%s"', premake.esc(path.translate(table.concat(cfg.includedirs, ";"), '\\')))
|
||||
local includedirs = table.join(cfg.userincludedirs, cfg.includedirs)
|
||||
|
||||
if #includedirs > 0 then
|
||||
_p(4,'AdditionalIncludeDirectories="%s"', premake.esc(path.translate(table.concat(includedirs, ";"), '\\')))
|
||||
end
|
||||
|
||||
if #cfg.defines > 0 then
|
||||
@ -524,9 +529,10 @@
|
||||
_p(4,'PreprocessorDefinitions="%s"', table.concat(premake.esc(table.join(cfg.defines, cfg.resdefines)), ";"))
|
||||
end
|
||||
|
||||
if #cfg.includedirs > 0 or #cfg.resincludedirs > 0 then
|
||||
local dirs = table.join(cfg.includedirs, cfg.resincludedirs)
|
||||
_p(4,'AdditionalIncludeDirectories="%s"', premake.esc(path.translate(table.concat(dirs, ";"), '\\')))
|
||||
local includedirs = table.join(cfg.userincludedir, cfg.includedirs, cfg.resincludedirs)
|
||||
|
||||
if #includedirs > 0 then
|
||||
_p(4,'AdditionalIncludeDirectories="%s"', premake.esc(path.translate(table.concat(includedirs, ";"), '\\')))
|
||||
end
|
||||
|
||||
_p(3,'/>')
|
||||
|
@ -60,10 +60,6 @@
|
||||
if cfg.debugdir then
|
||||
_p(4,'WorkingDirectory="%s"', path.translate(cfg.debugdir, '\\'))
|
||||
end
|
||||
|
||||
if cfg.debugabsolutedir then
|
||||
_p(4,'WorkingDirectory="%s"', path.translate(cfg.debugabsolutedir, '\\'))
|
||||
end
|
||||
|
||||
if #cfg.debugargs > 0 then
|
||||
_p(4,'CommandArguments="%s"', table.concat(cfg.debugargs, " "))
|
||||
|
@ -117,6 +117,10 @@
|
||||
_p(2,'<UseOfAtl>%s</UseOfAtl>', iif(cfg.flags.StaticATL, "Static", "Dynamic"))
|
||||
end
|
||||
|
||||
if cfg.flags.Unicode then
|
||||
_p(2,'<CharacterSet>Unicode</CharacterSet>')
|
||||
end
|
||||
|
||||
if cfg.flags.Managed then
|
||||
_p(2,'<CLRSupport>true</CLRSupport>')
|
||||
end
|
||||
@ -218,9 +222,11 @@
|
||||
end
|
||||
|
||||
local function include_dirs(indent,cfg)
|
||||
if #cfg.includedirs > 0 then
|
||||
local includedirs = table.join(cfg.userincludedirs, cfg.includedirs)
|
||||
|
||||
if #includedirs> 0 then
|
||||
_p(indent,'<AdditionalIncludeDirectories>%s;%%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>'
|
||||
,premake.esc(path.translate(table.concat(cfg.includedirs, ";"), '\\')))
|
||||
,premake.esc(path.translate(table.concat(includedirs, ";"), '\\')))
|
||||
end
|
||||
end
|
||||
|
||||
@ -292,12 +298,14 @@
|
||||
--
|
||||
local debug_info = ''
|
||||
if cfg.flags.Symbols then
|
||||
if (action.vstudio.supports64bitEditContinue == false and cfg.platform == "x64")
|
||||
if cfg.flags.C7DebugInfo then
|
||||
debug_info = "OldStyle"
|
||||
elseif (action.vstudio.supports64bitEditContinue == false and cfg.platform == "x64")
|
||||
or cfg.flags.Managed
|
||||
or premake.config.isoptimizedbuild(cfg.flags)
|
||||
or cfg.flags.NoEditAndContinue
|
||||
then
|
||||
debug_info = "ProgramDatabase"
|
||||
debug_info = "ProgramDatabase"
|
||||
else
|
||||
debug_info = "EditAndContinue"
|
||||
end
|
||||
@ -410,6 +418,10 @@
|
||||
_p(3,'<OmitFramePointers>true</OmitFramePointers>')
|
||||
end
|
||||
|
||||
if cfg.flags.UseFullPaths then
|
||||
_p(3, '<UseFullPaths>true</UseFullPaths>')
|
||||
end
|
||||
|
||||
compile_language(cfg)
|
||||
|
||||
forcedinclude_files(3,cfg);
|
||||
@ -462,8 +474,6 @@
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
local function import_lib(cfg)
|
||||
--Prevent the generation of an import library for a Windows DLL.
|
||||
if cfg.kind == "SharedLib" then
|
||||
@ -472,6 +482,53 @@
|
||||
end
|
||||
end
|
||||
|
||||
local function hasmasmfiles(prj)
|
||||
local files = vc2010.getfilegroup(prj, "MASM")
|
||||
return #files > 0
|
||||
end
|
||||
|
||||
local function vs10_masm(prj, cfg)
|
||||
if hasmasmfiles(prj) then
|
||||
_p(2, '<MASM>')
|
||||
|
||||
local includedirs = table.join(cfg.userincludedirs, cfg.includedirs)
|
||||
|
||||
if #includedirs > 0 then
|
||||
_p(3, '<IncludePaths>%s;%%(IncludePaths)</IncludePaths>'
|
||||
, premake.esc(path.translate(table.concat(includedirs, ";"), '\\'))
|
||||
)
|
||||
end
|
||||
|
||||
-- table.join is used to create a copy rather than a reference
|
||||
local defines = table.join(cfg.defines)
|
||||
|
||||
-- pre-defined preprocessor defines:
|
||||
-- _DEBUG: For debug configurations
|
||||
-- _WIN32: For 32-bit platforms
|
||||
-- _WIN64: For 64-bit platforms
|
||||
-- _EXPORT: `EXPORT` for shared libraries, empty for other project kinds
|
||||
table.insertflat(defines, iif(premake.config.isdebugbuild(cfg), "_DEBUG", {}))
|
||||
table.insert(defines, iif(cfg.platform == "x64", "_WIN64", "_WIN32"))
|
||||
table.insert(defines, iif(prj.kind == "SharedLib", "_EXPORT=EXPORT", "_EXPORT="))
|
||||
|
||||
_p(3, '<PreprocessorDefinitions>%s;%%(PreprocessorDefinitions)</PreprocessorDefinitions>'
|
||||
, premake.esc(table.concat(defines, ";"))
|
||||
)
|
||||
|
||||
if cfg.flags.FatalWarnings then
|
||||
_p(3,'<TreatWarningsAsErrors>true</TreatWarningsAsErrors>')
|
||||
end
|
||||
|
||||
-- MASM only has 3 warning levels where 3 is default, so we can ignore `ExtraWarnings`
|
||||
if cfg.flags.MinimumWarnings then
|
||||
_p(3,'<WarningLevel>0</WarningLevel>')
|
||||
else
|
||||
_p(3,'<WarningLevel>3</WarningLevel>')
|
||||
end
|
||||
|
||||
_p(2, '</MASM>')
|
||||
end
|
||||
end
|
||||
|
||||
--
|
||||
-- Generate the <Link> element and its children.
|
||||
@ -488,7 +545,7 @@
|
||||
end
|
||||
|
||||
if cfg.kind ~= 'StaticLib' then
|
||||
vc2010.additionalDependencies(cfg)
|
||||
vc2010.additionalDependencies(3,cfg)
|
||||
_p(3,'<OutputFile>$(OutDir)%s</OutputFile>', cfg.buildtarget.name)
|
||||
|
||||
if #cfg.libdirs > 0 then
|
||||
@ -530,10 +587,10 @@
|
||||
-- by an <ItemGroup/ProjectReference>).
|
||||
--
|
||||
|
||||
function vc2010.additionalDependencies(cfg)
|
||||
function vc2010.additionalDependencies(tab,cfg)
|
||||
local links = premake.getlinks(cfg, "system", "fullpath")
|
||||
if #links > 0 then
|
||||
_p(3,'<AdditionalDependencies>%s;%s</AdditionalDependencies>'
|
||||
_p(tab,'<AdditionalDependencies>%s;%s</AdditionalDependencies>'
|
||||
, table.concat(links, ";")
|
||||
, iif(cfg.platform == "Durango"
|
||||
, '$(XboxExtensionsDependencies)'
|
||||
@ -554,6 +611,7 @@
|
||||
item_def_lib(cfg)
|
||||
vc2010.link(cfg)
|
||||
event_hooks(cfg)
|
||||
vs10_masm(prj, cfg)
|
||||
_p(1,'</ItemDefinitionGroup>')
|
||||
end
|
||||
end
|
||||
@ -561,7 +619,7 @@
|
||||
|
||||
--
|
||||
-- Retrieve a list of files for a particular build group, one of
|
||||
-- "ClInclude", "ClCompile", "ResourceCompile", and "None".
|
||||
-- "ClInclude", "ClCompile", "ResourceCompile", "MASM", and "None".
|
||||
--
|
||||
|
||||
function vc2010.getfilegroup(prj, group)
|
||||
@ -570,6 +628,7 @@
|
||||
sortedfiles = {
|
||||
ClCompile = {},
|
||||
ClInclude = {},
|
||||
MASM = {},
|
||||
None = {},
|
||||
ResourceCompile = {},
|
||||
AppxManifest = {},
|
||||
@ -590,6 +649,8 @@
|
||||
elseif path.isappxmanifest(file.name) then
|
||||
foundAppxManifest = true
|
||||
table.insert(sortedfiles.AppxManifest, file)
|
||||
elseif path.isasmfile(file.name) then
|
||||
table.insert(sortedfiles.MASM, file)
|
||||
elseif file.flags and table.icontains(file.flags, "DeploymentContent") then
|
||||
table.insert(sortedfiles.DeploymentContent, file)
|
||||
else
|
||||
@ -802,6 +863,31 @@
|
||||
end
|
||||
end
|
||||
|
||||
function vc2010.masmfiles(prj)
|
||||
local configs = prj.solution.vstudio_configs
|
||||
local files = vc2010.getfilegroup(prj, "MASM")
|
||||
if #files > 0 then
|
||||
_p(1, '<ItemGroup>')
|
||||
for _, file in ipairs(files) do
|
||||
local translatedpath = path.translate(file.name, "\\")
|
||||
_p(2, '<MASM Include="%s">', translatedpath)
|
||||
|
||||
local excluded = table.icontains(prj.excludes, file.name)
|
||||
for _, vsconfig in ipairs(configs) do
|
||||
local cfg = premake.getconfig(prj, vsconfig.src_buildcfg, vsconfig.src_platform)
|
||||
if excluded or table.icontains(cfg.excludes, file.name) then
|
||||
_p(3, '<ExcludedFromBuild ' .. if_config_and_platform() .. '>true</ExcludedFromBuild>'
|
||||
, premake.esc(vsconfig.name)
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
_p(2, '</MASM>')
|
||||
end
|
||||
_p(1, '</ItemGroup>')
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
--
|
||||
-- Output the VC2010 project file header
|
||||
@ -825,6 +911,8 @@
|
||||
--
|
||||
|
||||
function premake.vs2010_vcxproj(prj)
|
||||
local usemasm = hasmasmfiles(prj)
|
||||
|
||||
io.indent = " "
|
||||
vc2010.header("Build")
|
||||
|
||||
@ -840,11 +928,12 @@
|
||||
|
||||
_p(1,'<Import Project="$(VCTargetsPath)\\Microsoft.Cpp.props" />')
|
||||
|
||||
--check what this section is doing
|
||||
_p(1,'<ImportGroup Label="ExtensionSettings">')
|
||||
if usemasm then
|
||||
_p(2, '<Import Project="$(VCTargetsPath)\\BuildCustomizations\\masm.props" />')
|
||||
end
|
||||
_p(1,'</ImportGroup>')
|
||||
|
||||
|
||||
import_props(prj)
|
||||
|
||||
--what type of macros are these?
|
||||
@ -856,9 +945,13 @@
|
||||
|
||||
vc2010.files(prj)
|
||||
vc2010.projectReferences(prj)
|
||||
vc2010.masmfiles(prj)
|
||||
|
||||
_p(1,'<Import Project="$(VCTargetsPath)\\Microsoft.Cpp.targets" />')
|
||||
_p(1,'<ImportGroup Label="ExtensionTargets">')
|
||||
if usemasm then
|
||||
_p(2, '<Import Project="$(VCTargetsPath)\\BuildCustomizations\\masm.targets" />')
|
||||
end
|
||||
_p(1,'</ImportGroup>')
|
||||
|
||||
_p('</Project>')
|
||||
@ -896,10 +989,6 @@
|
||||
_p(' <LocalDebuggerWorkingDirectory>%s</LocalDebuggerWorkingDirectory>', path.translate(cfg.debugdir, '\\'))
|
||||
_p(' <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>')
|
||||
end
|
||||
if cfg.debugabsolutedir and not vstudio.iswinrt() then
|
||||
_p(' <LocalDebuggerWorkingDirectory>%s</LocalDebuggerWorkingDirectory>', path.translate(cfg.debugabsolutedir, '\\'))
|
||||
_p(' <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>')
|
||||
end
|
||||
if cfg.debugargs then
|
||||
_p(' <LocalDebuggerCommandArguments>%s</LocalDebuggerCommandArguments>', table.concat(cfg.debugargs, " "))
|
||||
end
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
local vc2010 = premake.vstudio.vc2010
|
||||
local project = premake.project
|
||||
|
||||
|
||||
|
||||
--
|
||||
-- The first portion of the filters file assigns unique IDs to each
|
||||
@ -28,7 +28,7 @@
|
||||
filterfound = true
|
||||
_p(1,'<ItemGroup>')
|
||||
end
|
||||
|
||||
|
||||
path = path .. folders[i]
|
||||
|
||||
-- have I seen this path before?
|
||||
@ -43,7 +43,7 @@
|
||||
path = path .. "\\"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
for _, custombuildtask in ipairs(prj.custombuildtask or {}) do
|
||||
for _, buildtask in ipairs(custombuildtask or {}) do
|
||||
local folders = string.explode(path.trimdots(path.getrelative(prj.location,buildtask[1])), "/", true)
|
||||
@ -54,7 +54,7 @@
|
||||
filterfound = true
|
||||
_p(1,'<ItemGroup>')
|
||||
end
|
||||
|
||||
|
||||
path = path .. folders[i]
|
||||
|
||||
-- have I seen this path before?
|
||||
@ -67,7 +67,7 @@
|
||||
|
||||
-- prepare for the next subfolder
|
||||
path = path .. "\\"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
if filterfound then
|
||||
@ -78,17 +78,17 @@
|
||||
|
||||
--
|
||||
-- The second portion of the filters file assigns filters to each source
|
||||
-- code file, as needed. Section is one of "ClCompile", "ClInclude",
|
||||
-- code file, as needed. Section is one of "ClCompile", "ClInclude",
|
||||
-- "ResourceCompile", or "None".
|
||||
--
|
||||
|
||||
function vc2010.filefiltergroup(prj, section, kind)
|
||||
local files = vc2010.getfilegroup(prj, section) or {}
|
||||
|
||||
|
||||
if kind == nill then
|
||||
kind = section
|
||||
end
|
||||
|
||||
|
||||
if (section == "CustomBuild") then
|
||||
for _, custombuildtask in ipairs(prj.custombuildtask or {}) do
|
||||
for _, buildtask in ipairs(custombuildtask or {}) do
|
||||
@ -107,8 +107,8 @@
|
||||
filter = path.getdirectory(file.vpath)
|
||||
else
|
||||
filter = path.getdirectory(file.name)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
if filter ~= "." then
|
||||
_p(2,'<%s Include=\"%s\">', kind, path.translate(file.name, "\\"))
|
||||
_p(3,'<Filter>%s</Filter>', path.translate(filter, "\\"))
|
||||
@ -125,7 +125,7 @@
|
||||
--
|
||||
-- Output the VC2010 filters file
|
||||
--
|
||||
|
||||
|
||||
function vc2010.generate_filters(prj)
|
||||
io.indent = " "
|
||||
vc2010.header()
|
||||
@ -138,5 +138,6 @@
|
||||
vc2010.filefiltergroup(prj, "AppxManifest")
|
||||
vc2010.filefiltergroup(prj, "Image")
|
||||
vc2010.filefiltergroup(prj, "DeploymentContent", "None")
|
||||
vc2010.filefiltergroup(prj, "MASM")
|
||||
_p('</Project>')
|
||||
end
|
||||
|
@ -24,6 +24,7 @@
|
||||
[".cxx"] = "Sources",
|
||||
[".dylib"] = "Frameworks",
|
||||
[".framework"] = "Frameworks",
|
||||
[".tbd"] = "Frameworks",
|
||||
[".m"] = "Sources",
|
||||
[".mm"] = "Sources",
|
||||
[".strings"] = "Resources",
|
||||
@ -32,6 +33,8 @@
|
||||
[".icns"] = "Resources",
|
||||
[".bmp"] = "Resources",
|
||||
[".wav"] = "Resources",
|
||||
[".xcassets"] = "Resources",
|
||||
[".xcdatamodeld"] = "Sources",
|
||||
}
|
||||
return categories[path.getextension(node.name)]
|
||||
end
|
||||
@ -72,7 +75,9 @@
|
||||
[".cpp"] = "sourcecode.cpp.cpp",
|
||||
[".css"] = "text.css",
|
||||
[".cxx"] = "sourcecode.cpp.cpp",
|
||||
[".entitlements"] = "text.xml",
|
||||
[".framework"] = "wrapper.framework",
|
||||
[".tbd"] = "sourcecode.text-based-dylib-definition",
|
||||
[".gif"] = "image.gif",
|
||||
[".h"] = "sourcecode.c.h",
|
||||
[".html"] = "text.html",
|
||||
@ -87,6 +92,8 @@
|
||||
[".icns"] = "image.icns",
|
||||
[".bmp"] = "image.bmp",
|
||||
[".wav"] = "audio.wav",
|
||||
[".xcassets"] = "folder.assetcatalog",
|
||||
[".xcdatamodeld"] = "wrapper.xcdatamodeld",
|
||||
}
|
||||
return types[path.getextension(node.path)] or "text"
|
||||
end
|
||||
@ -107,7 +114,9 @@
|
||||
[".cpp"] = "sourcecode.cpp.cpp",
|
||||
[".css"] = "text.css",
|
||||
[".cxx"] = "sourcecode.cpp.cpp",
|
||||
[".entitlements"] = "text.xml",
|
||||
[".framework"] = "wrapper.framework",
|
||||
[".tbd"] = "wrapper.framework",
|
||||
[".gif"] = "image.gif",
|
||||
[".h"] = "sourcecode.cpp.h",
|
||||
[".html"] = "text.html",
|
||||
@ -122,6 +131,8 @@
|
||||
[".icns"] = "image.icns",
|
||||
[".bmp"] = "image.bmp",
|
||||
[".wav"] = "audio.wav",
|
||||
[".xcassets"] = "folder.assetcatalog",
|
||||
[".xcdatamodeld"] = "wrapper.xcdatamodeld",
|
||||
}
|
||||
return types[path.getextension(node.path)] or "text"
|
||||
end
|
||||
@ -192,7 +203,7 @@
|
||||
--
|
||||
|
||||
function xcode.isframework(fname)
|
||||
return (path.getextension(fname) == ".framework")
|
||||
return (path.getextension(fname) == ".framework" or path.getextension(fname) == ".tbd")
|
||||
end
|
||||
|
||||
|
||||
@ -363,6 +374,8 @@
|
||||
error('relative paths are not currently supported for frameworks')
|
||||
end
|
||||
pth = nodePath
|
||||
elseif path.getextension(nodePath)=='.tbd' then
|
||||
pth = "/usr/lib/" .. nodePath
|
||||
else
|
||||
pth = "/System/Library/Frameworks/" .. nodePath
|
||||
end
|
||||
@ -641,7 +654,9 @@
|
||||
if #cfgcmds > #prjcmds then
|
||||
table.insert(commands, 'if [ "${CONFIGURATION}" = "' .. xcode.getconfigname(cfg) .. '" ]; then')
|
||||
for i = #prjcmds + 1, #cfgcmds do
|
||||
table.insert(commands, cfgcmds[i])
|
||||
local cmd = cfgcmds[i]
|
||||
cmd = cmd:gsub('\\','\\\\')
|
||||
table.insert(commands, cmd)
|
||||
end
|
||||
table.insert(commands, 'fi')
|
||||
end
|
||||
@ -826,6 +841,10 @@
|
||||
|
||||
_p(4,'SDKROOT = "%s";', xcode.toolset)
|
||||
|
||||
if tr.entitlements then
|
||||
_p(4,'CODE_SIGN_ENTITLEMENTS = "%s";', tr.entitlements.cfg.name)
|
||||
end
|
||||
|
||||
local targetdir = path.getdirectory(cfg.buildtarget.bundlepath)
|
||||
if targetdir ~= "." then
|
||||
_p(4,'CONFIGURATION_BUILD_DIR = "$(SYMROOT)";');
|
||||
@ -880,6 +899,7 @@
|
||||
_p(4,'GCC_WARN_UNUSED_VARIABLE = YES;')
|
||||
|
||||
xcode.printlist(cfg.includedirs, 'HEADER_SEARCH_PATHS')
|
||||
xcode.printlist(cfg.userincludedirs, 'USER_HEADER_SEARCH_PATHS')
|
||||
xcode.printlist(cfg.libdirs, 'LIBRARY_SEARCH_PATHS')
|
||||
|
||||
_p(4,'OBJROOT = "%s";', cfg.objectsdir)
|
||||
|
@ -58,6 +58,15 @@
|
||||
end
|
||||
})
|
||||
|
||||
-- fix .xcassets files, they should be treated as a file, not a folder
|
||||
tree.traverse(tr, {
|
||||
onbranch = function(node)
|
||||
if path.getextension(node.name) == ".xcassets" then
|
||||
node.children = {}
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
-- the special folder "Frameworks" lists all linked frameworks
|
||||
tr.frameworks = tree.new("Frameworks")
|
||||
for cfg in premake.eachconfig(prj) do
|
||||
@ -118,6 +127,9 @@
|
||||
if string.endswith(node.name, "Info.plist") then
|
||||
tr.infoplist = node
|
||||
end
|
||||
if string.endswith(node.name, ".entitlements") then
|
||||
tr.entitlements = node
|
||||
end
|
||||
end
|
||||
}, true)
|
||||
|
||||
|
36
3rdparty/genie/src/base/api.lua
vendored
36
3rdparty/genie/src/base/api.lua
vendored
@ -84,12 +84,6 @@
|
||||
scope = "config",
|
||||
},
|
||||
|
||||
debugabsolutedir =
|
||||
{
|
||||
kind = "string",
|
||||
scope = "config",
|
||||
},
|
||||
|
||||
debugenvs =
|
||||
{
|
||||
kind = "list",
|
||||
@ -149,6 +143,7 @@
|
||||
|
||||
local allowed_flags = {
|
||||
ATL = 1,
|
||||
C7DebugInfo = 1,
|
||||
DebugEnvsDontMerge = 1,
|
||||
DebugEnvsInherit = 1,
|
||||
DeploymentContent = 1,
|
||||
@ -194,6 +189,7 @@
|
||||
Unicode = 1,
|
||||
Unsafe = 1,
|
||||
UnsignedChar = 1,
|
||||
UseFullPaths = 1,
|
||||
WinMain = 1,
|
||||
}
|
||||
|
||||
@ -297,6 +293,13 @@
|
||||
usagecopy = true,
|
||||
},
|
||||
|
||||
userincludedirs =
|
||||
{
|
||||
kind = "dirlist",
|
||||
scope = "config",
|
||||
usagecopy = true,
|
||||
},
|
||||
|
||||
kind =
|
||||
{
|
||||
kind = "string",
|
||||
@ -316,7 +319,8 @@
|
||||
allowed = {
|
||||
"C",
|
||||
"C++",
|
||||
"C#"
|
||||
"C#",
|
||||
"Vala",
|
||||
}
|
||||
},
|
||||
|
||||
@ -645,10 +649,10 @@
|
||||
end
|
||||
|
||||
if t == "solution" then
|
||||
if type(container) == "project" then
|
||||
if typex(container) == "project" then
|
||||
container = container.solution
|
||||
end
|
||||
if type(container) ~= "solution" then
|
||||
if typex(container) ~= "solution" then
|
||||
container = nil
|
||||
end
|
||||
end
|
||||
@ -1047,19 +1051,19 @@
|
||||
function usage(name)
|
||||
if (not name) then
|
||||
--Only return usage projects.
|
||||
if(type(premake.CurrentContainer) ~= "project") then return nil end
|
||||
if(typex(premake.CurrentContainer) ~= "project") then return nil end
|
||||
if(not premake.CurrentContainer.usage) then return nil end
|
||||
return premake.CurrentContainer
|
||||
end
|
||||
|
||||
-- identify the parent solution
|
||||
local sln
|
||||
if (type(premake.CurrentContainer) == "project") then
|
||||
if (typex(premake.CurrentContainer) == "project") then
|
||||
sln = premake.CurrentContainer.solution
|
||||
else
|
||||
sln = premake.CurrentContainer
|
||||
end
|
||||
if (type(sln) ~= "solution") then
|
||||
if (typex(sln) ~= "solution") then
|
||||
error("no active solution", 2)
|
||||
end
|
||||
|
||||
@ -1081,19 +1085,19 @@
|
||||
function project(name)
|
||||
if (not name) then
|
||||
--Only return non-usage projects
|
||||
if(type(premake.CurrentContainer) ~= "project") then return nil end
|
||||
if(typex(premake.CurrentContainer) ~= "project") then return nil end
|
||||
if(premake.CurrentContainer.usage) then return nil end
|
||||
return premake.CurrentContainer
|
||||
end
|
||||
|
||||
-- identify the parent solution
|
||||
local sln
|
||||
if (type(premake.CurrentContainer) == "project") then
|
||||
if (typex(premake.CurrentContainer) == "project") then
|
||||
sln = premake.CurrentContainer.solution
|
||||
else
|
||||
sln = premake.CurrentContainer
|
||||
end
|
||||
if (type(sln) ~= "solution") then
|
||||
if (typex(sln) ~= "solution") then
|
||||
error("no active solution", 2)
|
||||
end
|
||||
|
||||
@ -1113,7 +1117,7 @@
|
||||
|
||||
function solution(name)
|
||||
if not name then
|
||||
if type(premake.CurrentContainer) == "project" then
|
||||
if typex(premake.CurrentContainer) == "project" then
|
||||
return premake.CurrentContainer.solution
|
||||
else
|
||||
return premake.CurrentContainer
|
||||
|
12
3rdparty/genie/src/base/bake.lua
vendored
12
3rdparty/genie/src/base/bake.lua
vendored
@ -175,10 +175,14 @@
|
||||
end
|
||||
|
||||
local function removevalues(tbl, removes)
|
||||
for i=#tbl,1,-1 do
|
||||
for k, v in pairs(tbl) do
|
||||
for _, pattern in ipairs(removes) do
|
||||
if pattern == tbl[i] then
|
||||
table.remove(tbl, i)
|
||||
if pattern == tbl[k] then
|
||||
if type(k) == "number" then
|
||||
table.remove(tbl, k)
|
||||
else
|
||||
tbl[k] = nil
|
||||
end
|
||||
break
|
||||
end
|
||||
end
|
||||
@ -703,7 +707,7 @@
|
||||
|
||||
-- remove excluded files from the file list
|
||||
local removefiles = cfg.removefiles
|
||||
if _ACTION == 'gmake' then
|
||||
if _ACTION == 'gmake' or _ACTION == 'ninja' then
|
||||
removefiles = table.join(removefiles, cfg.excludes)
|
||||
end
|
||||
local files = {}
|
||||
|
7
3rdparty/genie/src/base/globals.lua
vendored
7
3rdparty/genie/src/base/globals.lua
vendored
@ -163,18 +163,17 @@
|
||||
|
||||
|
||||
--
|
||||
-- An extension to type() to identify project object types by reading the
|
||||
-- An extended type API to identify project object types by reading the
|
||||
-- "__type" field from the metatable.
|
||||
--
|
||||
|
||||
local builtin_type = type
|
||||
function type(t)
|
||||
function typex(t)
|
||||
local mt = getmetatable(t)
|
||||
if (mt) then
|
||||
if (mt.__type) then
|
||||
return mt.__type
|
||||
end
|
||||
end
|
||||
return builtin_type(t)
|
||||
return type(t)
|
||||
end
|
||||
|
||||
|
47
3rdparty/genie/src/base/io.lua
vendored
47
3rdparty/genie/src/base/io.lua
vendored
@ -4,6 +4,14 @@
|
||||
-- Copyright (c) 2008-2009 Jason Perkins and the Premake project
|
||||
--
|
||||
|
||||
io.eol = "\n"
|
||||
io.indent = "\t"
|
||||
io.indentLevel = 0
|
||||
|
||||
-- default escaper function
|
||||
local function _escaper(v) return v end
|
||||
_esc = _escaper
|
||||
|
||||
|
||||
--
|
||||
-- Prepare to capture the output from all subsequent calls to io.printf(),
|
||||
@ -76,6 +84,44 @@
|
||||
end
|
||||
end
|
||||
|
||||
--
|
||||
-- Write a formatted string to the exported file, after passing all
|
||||
-- arguments (except for the first, which is the formatting string)
|
||||
-- through io.esc().
|
||||
--
|
||||
|
||||
function io.xprintf(msg, ...)
|
||||
local arg = {...}
|
||||
for i = 1, #arg do
|
||||
arg[i] = io.esc(arg[i])
|
||||
end
|
||||
io.printf(msg, unpack(arg))
|
||||
end
|
||||
|
||||
--
|
||||
-- Handle escaping of strings for various outputs
|
||||
--
|
||||
|
||||
function io.esc(value)
|
||||
if type(value) == "table" then
|
||||
local result = {}
|
||||
local n = #value
|
||||
for i = 1, n do
|
||||
table.insert(result, io.esc(value[i]))
|
||||
end
|
||||
return result
|
||||
end
|
||||
|
||||
return _esc(value or "")
|
||||
end
|
||||
|
||||
--
|
||||
-- Set a new string escaping function
|
||||
--
|
||||
|
||||
function io.escaper(func)
|
||||
_esc = func or _escaper
|
||||
end
|
||||
|
||||
--
|
||||
-- Because I use io.printf() so often in the generators, create a terse shortcut
|
||||
@ -83,3 +129,4 @@
|
||||
--
|
||||
|
||||
_p = io.printf
|
||||
_x = io.xprintf
|
||||
|
16
3rdparty/genie/src/base/iter.lua
vendored
Normal file
16
3rdparty/genie/src/base/iter.lua
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
iter = {}
|
||||
|
||||
-- sortByKeys iterates over the table where the keys are in sort order
|
||||
|
||||
function iter.sortByKeys(arr, f)
|
||||
local a = table.keys(arr)
|
||||
table.sort(a, f)
|
||||
|
||||
local i = 0
|
||||
return function()
|
||||
i = i + 1
|
||||
if a[i] ~= nil then
|
||||
return a[i], arr[a[i]]
|
||||
end
|
||||
end
|
||||
end
|
91
3rdparty/genie/src/base/path.lua
vendored
91
3rdparty/genie/src/base/path.lua
vendored
@ -220,6 +220,30 @@
|
||||
end
|
||||
return result
|
||||
end
|
||||
|
||||
|
||||
--
|
||||
-- Returns true if the filename has a particular extension.
|
||||
--
|
||||
-- @param fname
|
||||
-- The file name to test.
|
||||
-- @param extensions
|
||||
-- The extension(s) to test. Maybe be a string or table.
|
||||
--
|
||||
|
||||
function path.hasextension(fname, extensions)
|
||||
local fext = path.getextension(fname):lower()
|
||||
if type(extensions) == "table" then
|
||||
for _, extension in pairs(extensions) do
|
||||
if fext == extension then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
else
|
||||
return (fext == extensions)
|
||||
end
|
||||
end
|
||||
|
||||
--
|
||||
-- Returns true if the filename represents a C/C++ source code file. This check
|
||||
@ -228,39 +252,31 @@
|
||||
--
|
||||
|
||||
function path.iscfile(fname)
|
||||
local extensions = { ".c", ".s", ".m" }
|
||||
local ext = path.getextension(fname):lower()
|
||||
return table.contains(extensions, ext)
|
||||
return path.hasextension(fname, { ".c", ".s", ".m" })
|
||||
end
|
||||
|
||||
function path.iscppfile(fname)
|
||||
return path.hasextension(fname, { ".cc", ".cpp", ".cxx", ".c", ".s", ".m", ".mm" })
|
||||
end
|
||||
|
||||
function path.iscxfile(fname)
|
||||
local extensions = { ".cx" }
|
||||
local ext = path.getextension(fname):lower()
|
||||
return table.contains(extensions, ext)
|
||||
return path.hasextension(fname, ".cx")
|
||||
end
|
||||
|
||||
function path.isobjcfile(fname)
|
||||
local extensions = { ".m", ".mm" }
|
||||
local ext = path.getextension(fname):lower()
|
||||
return table.contains(extensions, ext)
|
||||
return path.hasextension(fname, { ".m", ".mm" })
|
||||
end
|
||||
|
||||
function path.iscppheader(fname)
|
||||
local extensions = { ".h", ".hh", ".hpp", ".hxx" }
|
||||
local ext = path.getextension(fname):lower()
|
||||
return table.contains(extensions, ext)
|
||||
return path.hasextension(fname, { ".h", ".hh", ".hpp", ".hxx" })
|
||||
end
|
||||
|
||||
function path.isappxmanifest(fname)
|
||||
local extensions = { ".appxmanifest" }
|
||||
local ext = path.getextension(fname):lower()
|
||||
return table.contains(extensions, ext)
|
||||
return path.hasextension(fname, ".appxmanifest")
|
||||
end
|
||||
|
||||
function path.isSourceFile(fname)
|
||||
local extensions = { ".cc", ".cpp", ".cxx", ".c", ".s", ".m", ".mm" }
|
||||
local ext = path.getextension(fname):lower()
|
||||
return table.contains(extensions, ext)
|
||||
return path.hasextension(fname, { ".cc", ".cpp", ".cxx", ".c", ".s", ".m", ".mm", ".vala" })
|
||||
end
|
||||
|
||||
function path.isSourceFileVS(fname)
|
||||
@ -268,15 +284,17 @@
|
||||
or path.iscxfile(fname)
|
||||
end
|
||||
|
||||
function path.isasmfile(fname)
|
||||
return path.hasextension(fname, ".asm")
|
||||
end
|
||||
|
||||
--
|
||||
-- Returns true if the filename represents a Windows resource file. This check
|
||||
-- is used to prevent passing non-resources to the compiler in makefiles.
|
||||
--
|
||||
|
||||
function path.isresourcefile(fname)
|
||||
local extensions = { ".rc" }
|
||||
local ext = path.getextension(fname):lower()
|
||||
return table.contains(extensions, ext)
|
||||
return path.hasextension(fname, ".rc")
|
||||
end
|
||||
|
||||
|
||||
@ -398,3 +416,34 @@
|
||||
|
||||
return p
|
||||
end
|
||||
|
||||
--
|
||||
-- Takes a path which is relative to one location and makes it relative
|
||||
-- to another location instead.
|
||||
--
|
||||
|
||||
function path.rebase(p, oldbase, newbase)
|
||||
p = path.getabsolute(path.join(oldbase, p))
|
||||
p = path.getrelative(newbase, p)
|
||||
return p
|
||||
end
|
||||
|
||||
|
||||
|
||||
--
|
||||
-- Replace the file extension.
|
||||
--
|
||||
|
||||
function path.replaceextension(p, newext)
|
||||
local ext = path.getextension(p)
|
||||
|
||||
if not ext then
|
||||
return p
|
||||
end
|
||||
|
||||
if #newext > 0 and not newext:findlast(".", true) then
|
||||
newext = "."..newext
|
||||
end
|
||||
|
||||
return p:match("^(.*)"..ext.."$")..newext
|
||||
end
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user