mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-08-20 00:45:05 +00:00
Compare commits
2 Commits
599fa46766
...
2f5e183f18
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2f5e183f18 | ||
|
|
d3439f6f45 |
@ -9,7 +9,8 @@ CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y
|
||||
CONFIG_FREERTOS_PLACE_SNAPSHOT_FUNS_INTO_FLASH=y
|
||||
CONFIG_RINGBUF_PLACE_FUNCTIONS_INTO_FLASH=y
|
||||
# EmbedTLS
|
||||
CONFIG_MBEDTLS_SSL_PROTO_TLS1_3=y
|
||||
# Use TLS 1.2 because 1.3 conflicts with MbedTLS dynamic buffer
|
||||
CONFIG_MBEDTLS_SSL_PROTO_TLS1_2=y
|
||||
# LVGL
|
||||
CONFIG_LV_USE_USER_DATA=y
|
||||
CONFIG_LV_USE_FS_STDIO=y
|
||||
@ -40,3 +41,17 @@ CONFIG_WL_SECTOR_MODE_SAFE=y
|
||||
CONFIG_WL_SECTOR_MODE=1
|
||||
# Allow new i2c_master API (used by Tab5Keyboard for LP_I2C_NUM_0) to coexist with legacy i2c driver
|
||||
CONFIG_I2C_SKIP_LEGACY_CONFLICT_CHECK=y
|
||||
# Wi-Fi memory optimizations
|
||||
CONFIG_ESP_WIFI_STATIC_RX_BUFFER_NUM=3
|
||||
CONFIG_ESP_WIFI_DYNAMIC_RX_BUFFER_NUM=5
|
||||
CONFIG_ESP_WIFI_STATIC_TX_BUFFER=y
|
||||
CONFIG_ESP_WIFI_TX_BUFFER_TYPE=0
|
||||
CONFIG_ESP_WIFI_STATIC_TX_BUFFER_NUM=5
|
||||
CONFIG_ESP_WIFI_CACHE_TX_BUFFER_NUM=5
|
||||
CONFIG_ESP_WIFI_STATIC_RX_MGMT_BUFFER=y
|
||||
CONFIG_ESP_WIFI_DYNAMIC_RX_MGMT_BUF=0
|
||||
CONFIG_ESP_WIFI_RX_MGMT_BUF_NUM_DEF=5
|
||||
CONFIG_ESP_WIFI_AMPDU_TX_ENABLED=y
|
||||
CONFIG_ESP_WIFI_TX_BA_WIN=5
|
||||
CONFIG_ESP_WIFI_AMPDU_RX_ENABLED=y
|
||||
CONFIG_ESP_WIFI_RX_BA_WIN=5
|
||||
|
||||
@ -72,6 +72,8 @@ else ()
|
||||
message("Building for sim target")
|
||||
add_compile_definitions(CONFIG_TT_DEVICE_ID="simulator")
|
||||
add_compile_definitions(CONFIG_TT_DEVICE_NAME="Simulator")
|
||||
add_compile_definitions(CONFIG_TT_DEVICE_VENDOR="")
|
||||
add_compile_definitions(CONFIG_TT_DEVICE_NAME_SIMPLE="Simulator")
|
||||
add_compile_definitions(CONFIG_TT_LAUNCHER_APP_ID="Launcher")
|
||||
add_compile_definitions(CONFIG_TT_AUTO_START_APP_ID="")
|
||||
endif ()
|
||||
|
||||
@ -13,6 +13,7 @@
|
||||
|
||||
ble0 {
|
||||
compatible = "espressif,esp32-ble";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
gpio0 {
|
||||
|
||||
@ -13,6 +13,7 @@
|
||||
|
||||
ble0 {
|
||||
compatible = "espressif,esp32-ble";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
gpio0 {
|
||||
|
||||
@ -14,6 +14,7 @@
|
||||
|
||||
ble0 {
|
||||
compatible = "espressif,esp32-ble";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
gpio0 {
|
||||
|
||||
@ -15,6 +15,7 @@
|
||||
|
||||
ble0 {
|
||||
compatible = "espressif,esp32-ble";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
gpio0 {
|
||||
|
||||
@ -15,6 +15,7 @@
|
||||
|
||||
ble0 {
|
||||
compatible = "espressif,esp32-ble";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
gpio0 {
|
||||
|
||||
@ -14,6 +14,7 @@
|
||||
|
||||
ble0 {
|
||||
compatible = "espressif,esp32-ble";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
gpio0 {
|
||||
|
||||
@ -14,6 +14,7 @@
|
||||
|
||||
ble0 {
|
||||
compatible = "espressif,esp32-ble";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
gpio0 {
|
||||
|
||||
@ -21,6 +21,7 @@
|
||||
|
||||
ble0 {
|
||||
compatible = "espressif,esp32-ble";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
gpio0 {
|
||||
|
||||
@ -16,6 +16,7 @@
|
||||
|
||||
ble0 {
|
||||
compatible = "espressif,esp32-ble";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
gpio0 {
|
||||
|
||||
@ -15,6 +15,7 @@
|
||||
|
||||
ble0 {
|
||||
compatible = "espressif,esp32-ble";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
gpio0 {
|
||||
|
||||
@ -11,6 +11,7 @@
|
||||
|
||||
ble0 {
|
||||
compatible = "espressif,esp32-ble";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
gpio0 {
|
||||
|
||||
@ -38,7 +38,7 @@ std::shared_ptr<tt::hal::display::DisplayDevice> createDisplay() {
|
||||
.backlightDutyFunction = driver::pwmbacklight::setBacklightDuty,
|
||||
.resetPin = GPIO_NUM_NC,
|
||||
.lvglSwapBytes = false,
|
||||
.buffSpiram = true
|
||||
.buffSpiram = false // Enabling leads to crashes when refreshing App Hub list
|
||||
};
|
||||
|
||||
auto spi_configuration = std::make_shared<St7789Display::SpiConfiguration>(St7789Display::SpiConfiguration {
|
||||
|
||||
@ -9,7 +9,7 @@ constexpr auto LCD_PIN_CS = GPIO_NUM_12;
|
||||
constexpr auto LCD_PIN_DC = GPIO_NUM_11; // RS
|
||||
constexpr auto LCD_HORIZONTAL_RESOLUTION = 320;
|
||||
constexpr auto LCD_VERTICAL_RESOLUTION = 240;
|
||||
constexpr auto LCD_BUFFER_HEIGHT = (LCD_VERTICAL_RESOLUTION / 3);
|
||||
constexpr auto LCD_BUFFER_HEIGHT = (LCD_VERTICAL_RESOLUTION / 10);
|
||||
constexpr auto LCD_BUFFER_SIZE = (LCD_HORIZONTAL_RESOLUTION * LCD_BUFFER_HEIGHT);
|
||||
constexpr auto LCD_SPI_TRANSFER_SIZE_LIMIT = LCD_BUFFER_SIZE * LV_COLOR_DEPTH / 8;
|
||||
|
||||
|
||||
@ -18,6 +18,7 @@
|
||||
|
||||
ble0 {
|
||||
compatible = "espressif,esp32-ble";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
gpio0 {
|
||||
|
||||
@ -10,6 +10,7 @@
|
||||
|
||||
ble0 {
|
||||
compatible = "espressif,esp32-ble";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
gpio0 {
|
||||
|
||||
@ -12,7 +12,7 @@ constexpr auto LCD_PIN_RESET = GPIO_NUM_23;
|
||||
constexpr auto LCD_PIN_BACKLIGHT = GPIO_NUM_4;
|
||||
constexpr auto LCD_HORIZONTAL_RESOLUTION = 135;
|
||||
constexpr auto LCD_VERTICAL_RESOLUTION = 240;
|
||||
constexpr auto LCD_BUFFER_HEIGHT = LCD_VERTICAL_RESOLUTION / 3;
|
||||
constexpr auto LCD_BUFFER_HEIGHT = LCD_VERTICAL_RESOLUTION / 6;
|
||||
constexpr auto LCD_BUFFER_SIZE = LCD_HORIZONTAL_RESOLUTION * LCD_BUFFER_HEIGHT;
|
||||
|
||||
std::shared_ptr<tt::hal::display::DisplayDevice> createDisplay();
|
||||
|
||||
@ -15,6 +15,7 @@
|
||||
|
||||
ble0 {
|
||||
compatible = "espressif,esp32-ble";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
gpio0 {
|
||||
|
||||
@ -15,6 +15,7 @@
|
||||
|
||||
ble0 {
|
||||
compatible = "espressif,esp32-ble";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
gpio0 {
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
|
||||
ble0 {
|
||||
compatible = "espressif,esp32-ble";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
gpio0 {
|
||||
|
||||
@ -19,6 +19,7 @@
|
||||
|
||||
ble0 {
|
||||
compatible = "espressif,esp32-ble";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
gpio0 {
|
||||
|
||||
@ -18,6 +18,7 @@
|
||||
|
||||
ble0 {
|
||||
compatible = "espressif,esp32-ble";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
gpio0 {
|
||||
|
||||
@ -20,6 +20,7 @@
|
||||
|
||||
ble0 {
|
||||
compatible = "espressif,esp32-ble";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
gpio0 {
|
||||
|
||||
@ -15,6 +15,7 @@
|
||||
|
||||
ble0 {
|
||||
compatible = "espressif,esp32-ble";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
gpio0 {
|
||||
|
||||
@ -22,6 +22,7 @@
|
||||
|
||||
ble0 {
|
||||
compatible = "espressif,esp32-ble";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
gpio0 {
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
|
||||
ble0 {
|
||||
compatible = "espressif,esp32-ble";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
gpio0 {
|
||||
|
||||
@ -20,6 +20,7 @@
|
||||
|
||||
ble0 {
|
||||
compatible = "espressif,esp32-ble";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
gpio0 {
|
||||
|
||||
@ -15,6 +15,7 @@
|
||||
|
||||
ble0 {
|
||||
compatible = "espressif,esp32-ble";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
gpio0 {
|
||||
|
||||
@ -15,6 +15,7 @@
|
||||
|
||||
ble0 {
|
||||
compatible = "espressif,esp32-ble";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
gpio0 {
|
||||
|
||||
@ -16,6 +16,7 @@
|
||||
|
||||
ble0 {
|
||||
compatible = "espressif,esp32-ble";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
gpio0 {
|
||||
|
||||
@ -16,6 +16,7 @@
|
||||
|
||||
ble0 {
|
||||
compatible = "espressif,esp32-ble";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
gpio0 {
|
||||
|
||||
@ -15,6 +15,7 @@
|
||||
|
||||
ble0 {
|
||||
compatible = "espressif,esp32-ble";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
gpio0 {
|
||||
|
||||
@ -14,6 +14,7 @@
|
||||
|
||||
ble0 {
|
||||
compatible = "espressif,esp32-ble";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
gpio0 {
|
||||
|
||||
@ -13,6 +13,7 @@
|
||||
|
||||
ble0 {
|
||||
compatible = "espressif,esp32-ble";
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
gpio0 {
|
||||
|
||||
@ -48,6 +48,7 @@
|
||||
|
||||
## Medium Priority
|
||||
|
||||
- Make USB host driver disabled by default, so it doesn't consume memory
|
||||
- Filtering for apps in App Hub:
|
||||
- apps that only work on a specific device
|
||||
- Diceware app has large "+" and "-' buttons on Cardputer. It should be smaller.
|
||||
@ -100,14 +101,12 @@
|
||||
|
||||
# App Ideas
|
||||
|
||||
- Revisit TinyUSB mouse idea: the bugs related to cleanup seem to be fixed in the library.
|
||||
- Map widget:
|
||||
https://github.com/portapack-mayhem/mayhem-firmware/blob/b66d8b1aa178d8a9cd06436fea788d5d58cb4c8d/firmware/application/ui/ui_geomap.cpp
|
||||
https://github.com/portapack-mayhem/mayhem-firmware/blob/b66d8b1aa178d8a9cd06436fea788d5d58cb4c8d/firmware/tools/generate_world_map.bin.py
|
||||
https://github.com/portapack-mayhem/mayhem-firmware/releases
|
||||
- Weather app: https://lab.flipper.net/apps/flip_weather
|
||||
- wget app: https://lab.flipper.net/apps/web_crawler (add profiles for known public APIs?)
|
||||
- BlueTooth keyboard app
|
||||
- Chip 8 emulator
|
||||
- BadUSB (in December 2024, TinyUSB has a bug where uninstalling and re-installing the driver fails)
|
||||
- Discord bot
|
||||
|
||||
@ -4,8 +4,18 @@ menu "Tactility App"
|
||||
string "Device Name"
|
||||
default ""
|
||||
help
|
||||
Human-readable device name, including vendor
|
||||
config TT_DEVICE_ID
|
||||
Human-readable device name, including vendor (e.g. "M5Stack Cardputer")
|
||||
config TT_DEVICE_NAME_SIMPLE
|
||||
string "Device Name (simple)"
|
||||
default ""
|
||||
help
|
||||
Human-readable simple device name, excluding vendor (e.g. "Cardputer")
|
||||
config TT_DEVICE_VENDOR
|
||||
string "Device Vendor Name"
|
||||
default ""
|
||||
help
|
||||
Human-readable device vendor name (e.g. "LilyGO")
|
||||
config TT_DEVICE_ID
|
||||
string "Device Identifier"
|
||||
default ""
|
||||
help
|
||||
|
||||
@ -26,8 +26,13 @@ struct PeerRecord {
|
||||
int profileId = 0;
|
||||
};
|
||||
|
||||
/** Find the first ready BLE device in the kernel device registry. Returns nullptr if unavailable. */
|
||||
struct Device* findFirstDevice();
|
||||
// Wrapper around device start & radio on
|
||||
bool start(Device* dev);
|
||||
|
||||
// Wrapper around device stop & radio off
|
||||
bool stop(Device* dev);
|
||||
|
||||
bool isRadioOnOrPending(Device* dev);
|
||||
|
||||
/** @return the current radio state */
|
||||
RadioState getRadioState();
|
||||
|
||||
@ -8,7 +8,6 @@ struct SystemSettings {
|
||||
Language language;
|
||||
bool timeFormat24h;
|
||||
std::string dateFormat; // MM/DD/YYYY, DD/MM/YYYY, YYYY-MM-DD, YYYY/MM/DD
|
||||
std::string region; // (US, EU, JP, etc.)
|
||||
};
|
||||
|
||||
bool loadSystemSettings(SystemSettings& properties);
|
||||
|
||||
@ -16,6 +16,9 @@ void setTimeZone(const std::string& name, const std::string& code);
|
||||
*/
|
||||
std::string getTimeZoneName();
|
||||
|
||||
/** @return true when a timezone has been explicitly set (as opposed to the default) */
|
||||
bool hasTimeZone();
|
||||
|
||||
/**
|
||||
* Get the code of the timezone (see timezones.csv)
|
||||
*/
|
||||
|
||||
12
Tactility/Private/Tactility/app/setup/Setup.h
Normal file
12
Tactility/Private/Tactility/app/setup/Setup.h
Normal file
@ -0,0 +1,12 @@
|
||||
#pragma once
|
||||
|
||||
#include <Tactility/app/App.h>
|
||||
|
||||
namespace tt::app::setup {
|
||||
|
||||
LaunchId start();
|
||||
|
||||
/** @return true if the setup wizard has already run to completion */
|
||||
bool isCompleted();
|
||||
|
||||
}
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
namespace tt::app::timezone {
|
||||
|
||||
LaunchId start();
|
||||
LaunchId start(bool saveTimeZone = false);
|
||||
|
||||
std::string getResultName(const Bundle& bundle);
|
||||
std::string getResultCode(const Bundle& bundle);
|
||||
|
||||
@ -103,6 +103,7 @@ namespace app {
|
||||
namespace power { extern const AppManifest manifest; }
|
||||
namespace selectiondialog { extern const AppManifest manifest; }
|
||||
namespace settings { extern const AppManifest manifest; }
|
||||
namespace setup { extern const AppManifest manifest; }
|
||||
namespace systeminfo { extern const AppManifest manifest; }
|
||||
namespace timedatesettings { extern const AppManifest manifest; }
|
||||
namespace touchcalibration { extern const AppManifest manifest; }
|
||||
@ -156,6 +157,7 @@ static void registerInternalApps() {
|
||||
addAppManifest(app::notes::manifest);
|
||||
addAppManifest(app::settings::manifest);
|
||||
addAppManifest(app::selectiondialog::manifest);
|
||||
addAppManifest(app::setup::manifest);
|
||||
addAppManifest(app::systeminfo::manifest);
|
||||
addAppManifest(app::timedatesettings::manifest);
|
||||
addAppManifest(app::touchcalibration::manifest);
|
||||
|
||||
@ -16,14 +16,21 @@ static const auto LOGGER = Logger("BtManage");
|
||||
|
||||
extern const AppManifest manifest;
|
||||
|
||||
static void onBtToggled(bool enabled) {
|
||||
struct Device* dev = bluetooth::findFirstDevice();
|
||||
static void onBtToggled(bool requestOn) {
|
||||
#if defined(CONFIG_BT_NIMBLE_ENABLED)
|
||||
Device* dev = device_find_first_by_type(&BLUETOOTH_TYPE);
|
||||
if (!dev) return;
|
||||
bluetooth_set_radio_enabled(dev, enabled);
|
||||
bool radio_on = bluetooth::isRadioOnOrPending(dev);
|
||||
if (requestOn && !radio_on) {
|
||||
bluetooth::start(dev);
|
||||
} else if (!requestOn && radio_on) {
|
||||
bluetooth::stop(dev);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void onScanToggled(bool enabled) {
|
||||
struct Device* dev = bluetooth::findFirstDevice();
|
||||
Device* dev = device_find_first_active_by_type(&BLUETOOTH_TYPE);
|
||||
if (!dev) return;
|
||||
if (enabled) {
|
||||
bluetooth_scan_start(dev);
|
||||
@ -108,7 +115,7 @@ void BtManage::onBtEvent(const struct BtEvent& event) {
|
||||
case BT_EVENT_RADIO_STATE_CHANGED:
|
||||
if (event.radio_state == BT_RADIO_STATE_ON) {
|
||||
getState().updatePairedPeers();
|
||||
struct Device* dev = bluetooth::findFirstDevice();
|
||||
Device* dev = device_find_first_active_by_type(&BLUETOOTH_TYPE);
|
||||
if (dev && !bluetooth_is_scanning(dev)) {
|
||||
bluetooth_scan_start(dev);
|
||||
}
|
||||
@ -121,7 +128,7 @@ void BtManage::onBtEvent(const struct BtEvent& event) {
|
||||
requestViewUpdate();
|
||||
}
|
||||
|
||||
static void onKernelBtEvent(struct Device* /*device*/, void* context, struct BtEvent event) {
|
||||
static void onKernelBtEvent(Device* /*device*/, void* context, BtEvent event) {
|
||||
// BT event callbacks can fire from the NimBLE host task (e.g. DISCONNECT during
|
||||
// nimble_port_stop shutdown). Calling onBtEvent() synchronously from the NimBLE
|
||||
// task would block it on the LVGL mutex (held by the LVGL task waiting in
|
||||
@ -137,7 +144,7 @@ void BtManage::onShow(AppContext& app, lv_obj_t* parent) {
|
||||
// Initialise state and view before subscribing to avoid incoming events
|
||||
// racing with state initialisation.
|
||||
state.setRadioState(bluetooth::getRadioState());
|
||||
struct Device* dev = bluetooth::findFirstDevice();
|
||||
Device* dev = device_find_first_active_by_type(&BLUETOOTH_TYPE);
|
||||
state.setScanning(dev ? bluetooth_is_scanning(dev) : false);
|
||||
state.updateScanResults();
|
||||
state.updatePairedPeers();
|
||||
|
||||
@ -16,8 +16,6 @@
|
||||
|
||||
namespace tt::app::btmanage {
|
||||
|
||||
static const auto LOGGER = Logger("BtManageView");
|
||||
|
||||
static void onEnableSwitchChanged(lv_event_t* event) {
|
||||
auto* enable_switch = static_cast<lv_obj_t*>(lv_event_get_target(event));
|
||||
bool is_on = lv_obj_has_state(enable_switch, LV_STATE_CHECKED);
|
||||
@ -49,7 +47,7 @@ static void onEnableOnBootParentClicked(lv_event_t* event) {
|
||||
|
||||
static void onScanButtonClicked(lv_event_t* event) {
|
||||
auto bt = std::static_pointer_cast<BtManage>(getCurrentApp());
|
||||
struct Device* dev = bluetooth::findFirstDevice();
|
||||
Device* dev = device_find_first_active_by_type(&BLUETOOTH_TYPE);
|
||||
bool scanning = dev ? bluetooth_is_scanning(dev) : false;
|
||||
bt->getBindings().onScanToggled(!scanning);
|
||||
}
|
||||
@ -57,7 +55,6 @@ static void onScanButtonClicked(lv_event_t* event) {
|
||||
// region Peer list callbacks
|
||||
|
||||
struct PeerListItemData {
|
||||
View* view;
|
||||
size_t index;
|
||||
bool isPaired;
|
||||
};
|
||||
@ -102,7 +99,7 @@ void View::createPeerListItem(const bluetooth::PeerRecord& record, bool isPaired
|
||||
|
||||
auto* button = lv_list_add_button(peers_list, nullptr, label.c_str());
|
||||
|
||||
auto* item_data = new PeerListItemData { this, index, isPaired };
|
||||
auto* item_data = new PeerListItemData { index, isPaired };
|
||||
lv_obj_set_user_data(button, item_data);
|
||||
lv_obj_add_event_cb(button, onConnect, LV_EVENT_SHORT_CLICKED, item_data);
|
||||
lv_obj_add_event_cb(button, [](lv_event_t* e) {
|
||||
|
||||
@ -1,16 +1,18 @@
|
||||
#include <Tactility/app/btpeersettings/BtPeerSettings.h>
|
||||
|
||||
#include <Tactility/Logger.h>
|
||||
#include "tactility/device.h"
|
||||
|
||||
#include <Tactility/LogMessages.h>
|
||||
#include <Tactility/Logger.h>
|
||||
#include <Tactility/app/App.h>
|
||||
#include <Tactility/app/AppContext.h>
|
||||
#include <Tactility/app/AppManifest.h>
|
||||
#include <Tactility/app/alertdialog/AlertDialog.h>
|
||||
#include <Tactility/bluetooth/Bluetooth.h>
|
||||
#include <Tactility/bluetooth/BluetoothPairedDevice.h>
|
||||
#include <Tactility/lvgl/LvglSync.h>
|
||||
#include <Tactility/lvgl/Style.h>
|
||||
#include <Tactility/lvgl/Toolbar.h>
|
||||
#include <Tactility/bluetooth/Bluetooth.h>
|
||||
#include <Tactility/bluetooth/BluetoothPairedDevice.h>
|
||||
#include <tactility/check.h>
|
||||
#include <tactility/drivers/bluetooth.h>
|
||||
|
||||
@ -124,7 +126,7 @@ public:
|
||||
}
|
||||
|
||||
void onShow(AppContext& app, lv_obj_t* parent) override {
|
||||
if (struct Device* dev = bluetooth::findFirstDevice()) {
|
||||
if (Device* dev = device_find_first_active_by_type(&BLUETOOTH_TYPE)) {
|
||||
bluetooth_add_event_callback(dev, this, onKernelBtEvent);
|
||||
}
|
||||
|
||||
@ -192,7 +194,7 @@ public:
|
||||
}
|
||||
|
||||
void onHide(AppContext& app) override {
|
||||
if (struct Device* dev = bluetooth::findFirstDevice()) {
|
||||
if (Device* dev = device_find_first_active_by_type(&BLUETOOTH_TYPE)) {
|
||||
bluetooth_remove_event_callback(dev, onKernelBtEvent);
|
||||
}
|
||||
viewEnabled = false;
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
#include <Tactility/app/AppContext.h>
|
||||
#include <Tactility/app/AppPaths.h>
|
||||
#include <Tactility/app/AppRegistration.h>
|
||||
#include <Tactility/app/setup/Setup.h>
|
||||
#include <Tactility/hal/power/PowerDevice.h>
|
||||
#include <Tactility/service/loader/Loader.h>
|
||||
#include <Tactility/settings/BootSettings.h>
|
||||
@ -137,22 +138,26 @@ public:
|
||||
|
||||
void onCreate(AppContext& app) override {
|
||||
settings::BootSettings boot_properties;
|
||||
if (settings::loadBootSettings(boot_properties)) {
|
||||
if (
|
||||
!boot_properties.autoStartAppId.empty() &&
|
||||
findAppManifestById(boot_properties.autoStartAppId) != nullptr
|
||||
) {
|
||||
LOGGER.info("Starting {}", boot_properties.autoStartAppId);
|
||||
start(boot_properties.autoStartAppId);
|
||||
} else {
|
||||
LOGGER.info("No auto-start app configured. Skipping default auto-start due to boot.properties presence.");
|
||||
}
|
||||
} else if (
|
||||
if (
|
||||
// Auto-start due to built-in requirement
|
||||
strcmp(CONFIG_TT_AUTO_START_APP_ID, "") != 0 &&
|
||||
findAppManifestById(CONFIG_TT_AUTO_START_APP_ID) != nullptr
|
||||
) {
|
||||
LOGGER.info("Starting {}", CONFIG_TT_AUTO_START_APP_ID);
|
||||
start(CONFIG_TT_AUTO_START_APP_ID);
|
||||
} else if (
|
||||
// Auto-start due to user configuration
|
||||
settings::loadBootSettings(boot_properties) &&
|
||||
!boot_properties.autoStartAppId.empty() &&
|
||||
findAppManifestById(boot_properties.autoStartAppId) != nullptr
|
||||
) {
|
||||
LOGGER.info("Starting {}", boot_properties.autoStartAppId);
|
||||
start(boot_properties.autoStartAppId);
|
||||
} else {
|
||||
// No auto-start, consider running system setup
|
||||
if (!setup::isCompleted()) {
|
||||
setup::start();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -28,7 +28,6 @@ extern const AppManifest manifest;
|
||||
class LocaleSettingsApp final : public App {
|
||||
tt::i18n::TextResources textResources = tt::i18n::TextResources(TEXT_RESOURCE_PATH);
|
||||
RecursiveMutex mutex;
|
||||
lv_obj_t* regionTextArea = nullptr;
|
||||
lv_obj_t* languageDropdown = nullptr;
|
||||
bool settingsUpdated = false;
|
||||
|
||||
@ -98,33 +97,6 @@ public:
|
||||
lv_obj_set_width(main_wrapper, LV_PCT(100));
|
||||
lv_obj_set_flex_grow(main_wrapper, 1);
|
||||
|
||||
// Region
|
||||
|
||||
auto* region_wrapper = lv_obj_create(main_wrapper);
|
||||
lv_obj_set_width(region_wrapper, LV_PCT(100));
|
||||
lv_obj_set_height(region_wrapper, LV_SIZE_CONTENT);
|
||||
lv_obj_set_style_pad_all(region_wrapper, 8, 0);
|
||||
lv_obj_set_style_border_width(region_wrapper, 0, 0);
|
||||
|
||||
auto* region_label = lv_label_create(region_wrapper);
|
||||
lv_label_set_text(region_label, textResources[i18n::Text::REGION].c_str());
|
||||
lv_obj_align(region_label, LV_ALIGN_LEFT_MID, 4, 0);
|
||||
|
||||
// Region text area for user input (e.g., US, EU, JP)
|
||||
regionTextArea = lv_textarea_create(region_wrapper);
|
||||
lv_obj_set_width(regionTextArea, 120);
|
||||
lv_textarea_set_one_line(regionTextArea, true);
|
||||
lv_textarea_set_max_length(regionTextArea, 50);
|
||||
lv_textarea_set_placeholder_text(regionTextArea, "e.g. US, EU");
|
||||
|
||||
// Load current region from settings
|
||||
settings::SystemSettings sysSettings;
|
||||
if (settings::loadSystemSettings(sysSettings)) {
|
||||
lv_textarea_set_text(regionTextArea, sysSettings.region.c_str());
|
||||
}
|
||||
lv_obj_add_event_cb(regionTextArea, onRegionChanged, LV_EVENT_VALUE_CHANGED, this);
|
||||
lv_obj_align(regionTextArea, LV_ALIGN_RIGHT_MID, 0, 0);
|
||||
|
||||
// Language
|
||||
|
||||
auto* language_wrapper = lv_obj_create(main_wrapper);
|
||||
@ -145,16 +117,6 @@ public:
|
||||
lv_dropdown_set_selected(languageDropdown, static_cast<uint32_t>(settings::getLanguage()));
|
||||
lv_obj_add_event_cb(languageDropdown, onLanguageSet, LV_EVENT_VALUE_CHANGED, this);
|
||||
}
|
||||
|
||||
void onHide(AppContext& app) override {
|
||||
if (settingsUpdated && regionTextArea) {
|
||||
settings::SystemSettings sysSettings;
|
||||
if (settings::loadSystemSettings(sysSettings)) {
|
||||
sysSettings.region = lv_textarea_get_text(regionTextArea);
|
||||
settings::saveSystemSettings(sysSettings);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
extern const AppManifest manifest = {
|
||||
|
||||
205
Tactility/Source/app/setup/Setup.cpp
Normal file
205
Tactility/Source/app/setup/Setup.cpp
Normal file
@ -0,0 +1,205 @@
|
||||
#include <tactility/lvgl_fonts.h>
|
||||
#include <tactility/lvgl_module.h>
|
||||
|
||||
#include <Tactility/app/App.h>
|
||||
#include <Tactility/app/AppManifest.h>
|
||||
#include <Tactility/app/setup/Setup.h>
|
||||
|
||||
#include <Tactility/Preferences.h>
|
||||
#include <Tactility/StringUtils.h>
|
||||
#include <Tactility/app/timezone/TimeZone.h>
|
||||
#include <Tactility/app/wifimanage/WifiManage.h>
|
||||
#include <Tactility/lvgl/LvglSync.h>
|
||||
#include <Tactility/service/wifi/Wifi.h>
|
||||
|
||||
#include <lvgl.h>
|
||||
|
||||
#include <functional>
|
||||
#include <vector>
|
||||
|
||||
namespace tt::app::setup {
|
||||
|
||||
extern const AppManifest manifest;
|
||||
|
||||
constexpr auto* PREFERENCES_NAMESPACE = "setup";
|
||||
constexpr auto* PREFERENCES_KEY_COMPLETED = "completed";
|
||||
|
||||
bool isCompleted() {
|
||||
Preferences preferences(PREFERENCES_NAMESPACE);
|
||||
bool completed = false;
|
||||
preferences.optBool(PREFERENCES_KEY_COMPLETED, completed);
|
||||
return completed;
|
||||
}
|
||||
|
||||
static void markCompleted() {
|
||||
Preferences preferences(PREFERENCES_NAMESPACE);
|
||||
preferences.putBool(PREFERENCES_KEY_COMPLETED, true);
|
||||
}
|
||||
|
||||
struct StepConfiguration {
|
||||
std::string title;
|
||||
std::string description;
|
||||
std::function<void()> run;
|
||||
};
|
||||
|
||||
class SetupApp final : public App {
|
||||
|
||||
enum class Phase {
|
||||
Welcome,
|
||||
StepIntro,
|
||||
Done
|
||||
};
|
||||
|
||||
Phase phase = Phase::Welcome;
|
||||
size_t stepIndex = 0;
|
||||
std::vector<StepConfiguration> steps;
|
||||
|
||||
lv_obj_t* titleLabel = nullptr;
|
||||
lv_obj_t* descriptionLabel = nullptr;
|
||||
lv_obj_t* skipButton = nullptr;
|
||||
lv_obj_t* continueButton = nullptr;
|
||||
|
||||
static void onSkipClickedCallback(lv_event_t* e) {
|
||||
auto* app = (SetupApp*)lv_event_get_user_data(e);
|
||||
app->onSkipClicked();
|
||||
}
|
||||
|
||||
static void onContinueClickedCallback(lv_event_t* e) {
|
||||
auto* app = (SetupApp*)lv_event_get_user_data(e);
|
||||
app->onContinueClicked();
|
||||
}
|
||||
|
||||
void renderCurrent() {
|
||||
switch (phase) {
|
||||
case Phase::Welcome: {
|
||||
lv_label_set_text(titleLabel, "Welcome");
|
||||
auto device_names = string::split(std::string(CONFIG_TT_DEVICE_NAME_SIMPLE), ",");
|
||||
lv_label_set_text_fmt(descriptionLabel, "It's time to set up your %s!", device_names.front().c_str());
|
||||
lv_obj_add_flag(skipButton, LV_OBJ_FLAG_HIDDEN);
|
||||
lv_label_set_text(lv_obj_get_child(continueButton, 0), "Continue");
|
||||
break;
|
||||
}
|
||||
case Phase::StepIntro: {
|
||||
const auto& step = steps[stepIndex];
|
||||
lv_label_set_text(titleLabel, step.title.c_str());
|
||||
lv_label_set_text(descriptionLabel, step.description.c_str());
|
||||
lv_obj_remove_flag(skipButton, LV_OBJ_FLAG_HIDDEN);
|
||||
lv_label_set_text(lv_obj_get_child(skipButton, 0), "Skip");
|
||||
lv_label_set_text(lv_obj_get_child(continueButton, 0), "Continue");
|
||||
break;
|
||||
}
|
||||
case Phase::Done:
|
||||
lv_label_set_text(titleLabel, "Setup Complete");
|
||||
lv_label_set_text(descriptionLabel, "You're all set.");
|
||||
lv_obj_add_flag(skipButton, LV_OBJ_FLAG_HIDDEN);
|
||||
lv_label_set_text(lv_obj_get_child(continueButton, 0), "Finish");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void advanceTo(size_t index) {
|
||||
if (index < steps.size()) {
|
||||
stepIndex = index;
|
||||
phase = Phase::StepIntro;
|
||||
} else {
|
||||
phase = Phase::Done;
|
||||
}
|
||||
|
||||
renderCurrent();
|
||||
}
|
||||
|
||||
void onSkipClicked() {
|
||||
if (phase == Phase::StepIntro) {
|
||||
advanceTo(stepIndex + 1);
|
||||
}
|
||||
}
|
||||
|
||||
void onContinueClicked() {
|
||||
switch (phase) {
|
||||
case Phase::Welcome:
|
||||
advanceTo(0);
|
||||
break;
|
||||
case Phase::StepIntro:
|
||||
steps[stepIndex].run();
|
||||
break;
|
||||
case Phase::Done:
|
||||
markCompleted();
|
||||
stop(manifest.appId);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
void onCreate(AppContext& app) override {
|
||||
steps = {
|
||||
{
|
||||
.title = "Time Zone Setup",
|
||||
.description = "Let's set the time zone.",
|
||||
.run = [] { timezone::start(true); }
|
||||
},
|
||||
{
|
||||
.title = "Wi-Fi Setup",
|
||||
.description = "Let's connect to a Wi-Fi access point.",
|
||||
.run = [] {
|
||||
service::wifi::setEnabled(true);
|
||||
wifimanage::start();
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
void onShow(AppContext& app, lv_obj_t* parent) override {
|
||||
titleLabel = lv_label_create(parent);
|
||||
lv_obj_set_width(titleLabel, LV_PCT(80));
|
||||
lv_obj_set_style_text_align(titleLabel, LV_TEXT_ALIGN_CENTER, 0);
|
||||
lv_label_set_long_mode(titleLabel, LV_LABEL_LONG_WRAP);
|
||||
auto* font = lvgl_get_text_font(FONT_SIZE_LARGE);
|
||||
lv_obj_set_style_text_font(titleLabel, font, 0);
|
||||
|
||||
descriptionLabel = lv_label_create(parent);
|
||||
lv_obj_set_width(descriptionLabel, LV_PCT(80));
|
||||
lv_obj_set_style_text_align(descriptionLabel, LV_TEXT_ALIGN_CENTER, 0);
|
||||
lv_label_set_long_mode(descriptionLabel, LV_LABEL_LONG_WRAP);
|
||||
lv_obj_align(descriptionLabel, LV_ALIGN_CENTER, 0, 0);
|
||||
|
||||
int title_margin = lvgl_get_text_font_height(FONT_SIZE_LARGE);
|
||||
lv_obj_align_to(titleLabel, descriptionLabel, LV_ALIGN_OUT_TOP_MID, 0, -title_margin);
|
||||
|
||||
skipButton = lv_button_create(parent);
|
||||
lv_obj_t* skip_label = lv_label_create(skipButton);
|
||||
lv_label_set_text(skip_label, "Skip");
|
||||
lv_obj_center(skip_label);
|
||||
lv_obj_align(skipButton, LV_ALIGN_BOTTOM_LEFT, 12, -12);
|
||||
lv_obj_add_event_cb(skipButton, onSkipClickedCallback, LV_EVENT_SHORT_CLICKED, this);
|
||||
|
||||
continueButton = lv_button_create(parent);
|
||||
lv_obj_t* continue_label = lv_label_create(continueButton);
|
||||
lv_label_set_text(continue_label, "Continue");
|
||||
lv_obj_center(continue_label);
|
||||
lv_obj_align(continueButton, LV_ALIGN_BOTTOM_RIGHT, -12, -12);
|
||||
lv_obj_add_event_cb(continueButton, onContinueClickedCallback, LV_EVENT_SHORT_CLICKED, this);
|
||||
|
||||
renderCurrent();
|
||||
}
|
||||
|
||||
void onResult(AppContext& app, LaunchId launchId, Result result, std::unique_ptr<Bundle> bundle) override {
|
||||
lvgl_lock();
|
||||
advanceTo(stepIndex + 1);
|
||||
lvgl_unlock();
|
||||
}
|
||||
};
|
||||
|
||||
extern const AppManifest manifest = {
|
||||
.appId = "Setup",
|
||||
.appName = "Setup",
|
||||
.appCategory = Category::System,
|
||||
.appFlags = AppManifest::Flags::Hidden | AppManifest::Flags::HideStatusBar,
|
||||
.createApp = create<SetupApp>
|
||||
};
|
||||
|
||||
LaunchId start() {
|
||||
return app::start(manifest.appId);
|
||||
}
|
||||
|
||||
}
|
||||
@ -31,7 +31,7 @@ class TimeDateSettingsApp final : public App {
|
||||
}
|
||||
|
||||
static void onTimeZonePressed(lv_event_t* event) {
|
||||
timezone::start();
|
||||
timezone::start(true);
|
||||
}
|
||||
|
||||
static void onDateFormatChanged(lv_event_t* event) {
|
||||
@ -140,7 +140,6 @@ public:
|
||||
const auto name = timezone::getResultName(*bundle);
|
||||
const auto code = timezone::getResultCode(*bundle);
|
||||
LOGGER.info("Result name={} code={}", name, code);
|
||||
settings::setTimeZone(name, code);
|
||||
|
||||
if (!name.empty()) {
|
||||
if (lvgl::lock(100 / portTICK_PERIOD_MS)) {
|
||||
|
||||
@ -13,6 +13,7 @@
|
||||
#include <Tactility/lvgl/LvglSync.h>
|
||||
#include <Tactility/lvgl/Toolbar.h>
|
||||
#include <Tactility/service/loader/Loader.h>
|
||||
#include <Tactility/settings/Time.h>
|
||||
|
||||
#include <lvgl.h>
|
||||
#include <memory>
|
||||
@ -23,6 +24,7 @@ static const auto LOGGER = Logger("TimeZone");
|
||||
|
||||
constexpr auto* RESULT_BUNDLE_CODE_INDEX = "code";
|
||||
constexpr auto* RESULT_BUNDLE_NAME_INDEX = "name";
|
||||
constexpr auto* PARAM_SAVE_TIME_ZONE = "saveTimeZone";
|
||||
|
||||
extern const AppManifest manifest;
|
||||
|
||||
@ -74,6 +76,7 @@ class TimeZoneApp final : public App {
|
||||
std::unique_ptr<Timer> updateTimer;
|
||||
lv_obj_t* listWidget = nullptr;
|
||||
lv_obj_t* filterTextareaWidget = nullptr;
|
||||
bool saveTimeZone = false;
|
||||
|
||||
static void onTextareaValueChangedCallback(lv_event_t* e) {
|
||||
auto* app = (TimeZoneApp*)lv_event_get_user_data(e);
|
||||
@ -104,6 +107,10 @@ class TimeZoneApp final : public App {
|
||||
|
||||
auto& entry = entries[index];
|
||||
|
||||
if (saveTimeZone) {
|
||||
settings::setTimeZone(entry.name, entry.code);
|
||||
}
|
||||
|
||||
auto bundle = std::make_unique<Bundle>();
|
||||
setResultName(*bundle, entry.name);
|
||||
setResultCode(*bundle, entry.code);
|
||||
@ -222,6 +229,11 @@ public:
|
||||
}
|
||||
|
||||
void onCreate(AppContext& app) override {
|
||||
auto parameters = app.getParameters();
|
||||
if (parameters != nullptr) {
|
||||
parameters->optBool(PARAM_SAVE_TIME_ZONE, saveTimeZone);
|
||||
}
|
||||
|
||||
updateTimer = std::make_unique<Timer>(Timer::Type::Once, 500 / portTICK_PERIOD_MS, [this] {
|
||||
updateList();
|
||||
});
|
||||
@ -230,14 +242,16 @@ public:
|
||||
|
||||
extern const AppManifest manifest = {
|
||||
.appId = "TimeZone",
|
||||
.appName = "Select timezone",
|
||||
.appName = "Select Time zone",
|
||||
.appCategory = Category::System,
|
||||
.appFlags = AppManifest::Flags::Hidden,
|
||||
.createApp = create<TimeZoneApp>
|
||||
};
|
||||
|
||||
LaunchId start() {
|
||||
return app::start(manifest.appId);
|
||||
LaunchId start(bool saveTimeZone) {
|
||||
auto bundle = std::make_shared<Bundle>();
|
||||
bundle->putBool(PARAM_SAVE_TIME_ZONE, saveTimeZone);
|
||||
return app::start(manifest.appId, bundle);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -40,18 +40,16 @@ static std::vector<CachedAddr> scan_addr_cache; // parallel to scan_results_cach
|
||||
|
||||
// ---- Device accessor ----
|
||||
|
||||
struct Device* findFirstDevice() {
|
||||
struct Device* found = nullptr;
|
||||
device_for_each_of_type(&BLUETOOTH_TYPE, &found, [](struct Device* dev, void* ctx) -> bool {
|
||||
if (device_is_ready(dev)) {
|
||||
*static_cast<struct Device**>(ctx) = dev;
|
||||
return false;
|
||||
}
|
||||
Device* findFirstRegisteredDevice() {
|
||||
Device* found = nullptr;
|
||||
device_for_each_of_type(&BLUETOOTH_TYPE, &found, [](Device* dev, void* ctx) -> bool {
|
||||
*static_cast<Device**>(ctx) = dev;
|
||||
return true;
|
||||
});
|
||||
return found;
|
||||
}
|
||||
|
||||
|
||||
// ---- Scan cache helpers ----
|
||||
|
||||
void cacheScanAddr(const uint8_t addr[6], uint8_t addr_type) {
|
||||
@ -110,7 +108,7 @@ static void cachePeerRecord(const BtPeerRecord& krecord) {
|
||||
// and settings management. Consumers should register their own callbacks via
|
||||
// bluetooth_add_event_callback() to receive events directly.
|
||||
|
||||
static void bt_event_bridge(struct Device* /*device*/, void* /*context*/, struct BtEvent event) {
|
||||
static void bt_event_bridge(Device*, void* /*context*/, BtEvent event) {
|
||||
switch (event.type) {
|
||||
case BT_EVENT_RADIO_STATE_CHANGED:
|
||||
switch (event.radio_state) {
|
||||
@ -126,24 +124,24 @@ static void bt_event_bridge(struct Device* /*device*/, void* /*context*/, struct
|
||||
}
|
||||
if (has_hid_host_auto) {
|
||||
LOGGER.info("HID host auto-connect peer found — starting scan");
|
||||
if (struct Device* dev = findFirstDevice()) {
|
||||
if (Device* dev = device_find_first_active_by_type(&BLUETOOTH_TYPE)) {
|
||||
bluetooth_scan_start(dev);
|
||||
}
|
||||
} else if (has_hid_device_auto) {
|
||||
LOGGER.info("HID device auto-start (bonded peer found)");
|
||||
if (struct Device* dev = bluetooth_hid_device_get_device()) {
|
||||
if (Device* dev = bluetooth_hid_device_get_device()) {
|
||||
bluetooth_hid_device_start(dev, BT_HID_DEVICE_MODE_KEYBOARD);
|
||||
}
|
||||
} else {
|
||||
if (settings::shouldSppAutoStart()) {
|
||||
LOGGER.info("Auto-starting SPP server");
|
||||
if (struct Device* dev = bluetooth_serial_get_device()) {
|
||||
if (Device* dev = bluetooth_serial_get_device()) {
|
||||
bluetooth_serial_start(dev);
|
||||
}
|
||||
}
|
||||
if (settings::shouldMidiAutoStart()) {
|
||||
LOGGER.info("Auto-starting MIDI server");
|
||||
if (struct Device* dev = bluetooth_midi_get_device()) {
|
||||
if (Device* dev = bluetooth_midi_get_device()) {
|
||||
bluetooth_midi_start(dev);
|
||||
}
|
||||
}
|
||||
@ -233,7 +231,7 @@ static void bt_event_bridge(struct Device* /*device*/, void* /*context*/, struct
|
||||
}
|
||||
}
|
||||
if (has_auto) {
|
||||
if (struct Device* dev = findFirstDevice()) {
|
||||
if (Device* dev = device_find_first_active_by_type(&BLUETOOTH_TYPE)) {
|
||||
if (!bluetooth_is_scanning(dev)) {
|
||||
bluetooth_scan_start(dev);
|
||||
}
|
||||
@ -251,19 +249,80 @@ static void bt_event_bridge(struct Device* /*device*/, void* /*context*/, struct
|
||||
// ---- systemStart ----
|
||||
|
||||
void systemStart() {
|
||||
struct Device* dev = findFirstDevice();
|
||||
Device* dev = findFirstRegisteredDevice();
|
||||
if (dev == nullptr) {
|
||||
LOGGER.warn("systemStart: no BLE device found");
|
||||
return;
|
||||
}
|
||||
bluetooth_add_event_callback(dev, nullptr, bt_event_bridge);
|
||||
|
||||
if (settings::shouldEnableOnBoot()) {
|
||||
LOGGER.info("Auto-enabling Bluetooth on boot");
|
||||
bluetooth_set_radio_enabled(dev, true);
|
||||
start(dev);
|
||||
}
|
||||
}
|
||||
|
||||
bool isRadioOnOrPending(Device* dev) {
|
||||
if (!device_is_ready(dev)) return false;
|
||||
BtRadioState state;
|
||||
if (bluetooth_get_radio_state(dev, &state) != ERROR_NONE) return false;
|
||||
return state == BT_RADIO_STATE_ON || state == BT_RADIO_STATE_ON_PENDING;
|
||||
}
|
||||
|
||||
bool start(Device* dev) {
|
||||
LOGGER.info("Auto-enabling BLE on boot");
|
||||
if (!device_is_ready(dev)) {
|
||||
LOGGER.info("Starting BLE device");
|
||||
if (device_start(dev) != ERROR_NONE) {
|
||||
LOGGER.error("Failed to start BLE device");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Fix bug where repeatedly calling start would add this callback multiple times
|
||||
if (bluetooth_add_event_callback(dev, nullptr, bt_event_bridge) != ERROR_NONE) {
|
||||
LOGGER.error("Failed to set BLE callback");
|
||||
}
|
||||
|
||||
LOGGER.info("Enabling BT radio");
|
||||
if (bluetooth_set_radio_enabled(dev, true) != ERROR_NONE) {
|
||||
LOGGER.error("Failed to enable BLE radio");
|
||||
// Add bridge again
|
||||
bluetooth_remove_event_callback(dev, bt_event_bridge);
|
||||
return false;
|
||||
}
|
||||
|
||||
LOGGER.info("BT enabled");
|
||||
return true;
|
||||
}
|
||||
|
||||
bool stop(Device* dev) {
|
||||
BtRadioState state;
|
||||
if (bluetooth_get_radio_state(dev, &state) != ERROR_NONE) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (state == BT_RADIO_STATE_OFF || state == BT_RADIO_STATE_OFF_PENDING) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (bluetooth_remove_event_callback(dev, bt_event_bridge) != ERROR_NONE) {
|
||||
LOGGER.error("Failed to remove BLE callback");
|
||||
}
|
||||
|
||||
if (bluetooth_set_radio_enabled(dev, false) != ERROR_NONE) {
|
||||
LOGGER.error("Failed to disable BT radio");
|
||||
// Re-register bridge
|
||||
bluetooth_add_event_callback(dev, nullptr, bt_event_bridge);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (device_stop(dev) != ERROR_NONE) {
|
||||
LOGGER.error("Failed to stop BT device");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// ---- Public API ----
|
||||
|
||||
const char* radioStateToString(RadioState state) {
|
||||
@ -278,7 +337,7 @@ const char* radioStateToString(RadioState state) {
|
||||
}
|
||||
|
||||
RadioState getRadioState() {
|
||||
struct Device* dev = findFirstDevice();
|
||||
Device* dev = device_find_first_active_by_type(&BLUETOOTH_TYPE);
|
||||
if (dev == nullptr) return RadioState::Off;
|
||||
BtRadioState state = BT_RADIO_STATE_OFF;
|
||||
bluetooth_get_radio_state(dev, &state);
|
||||
@ -346,7 +405,7 @@ void pair(const std::array<uint8_t, 6>& /*addr*/) {
|
||||
}
|
||||
|
||||
void unpair(const std::array<uint8_t, 6>& addr) {
|
||||
struct Device* dev = findFirstDevice();
|
||||
Device* dev = device_find_first_active_by_type(&BLUETOOTH_TYPE);
|
||||
if (dev != nullptr) {
|
||||
bluetooth_unpair(dev, addr.data());
|
||||
}
|
||||
@ -358,16 +417,16 @@ void connect(const std::array<uint8_t, 6>& addr, int profileId) {
|
||||
if (profileId == BT_PROFILE_HID_HOST) {
|
||||
hidHostConnect(addr);
|
||||
} else if (profileId == BT_PROFILE_HID_DEVICE) {
|
||||
if (struct Device* dev = bluetooth_hid_device_get_device()) {
|
||||
if (Device* dev = bluetooth_hid_device_get_device()) {
|
||||
bluetooth_hid_device_start(dev, BT_HID_DEVICE_MODE_KEYBOARD);
|
||||
}
|
||||
} else if (profileId == BT_PROFILE_SPP) {
|
||||
if (struct Device* dev = bluetooth_serial_get_device()) {
|
||||
if (Device* dev = bluetooth_serial_get_device()) {
|
||||
bluetooth_serial_start(dev);
|
||||
settings::setSppAutoStart(true);
|
||||
}
|
||||
} else if (profileId == BT_PROFILE_MIDI) {
|
||||
if (struct Device* dev = bluetooth_midi_get_device()) {
|
||||
if (Device* dev = bluetooth_midi_get_device()) {
|
||||
bluetooth_midi_start(dev);
|
||||
settings::setMidiAutoStart(true);
|
||||
}
|
||||
@ -379,11 +438,11 @@ void disconnect(const std::array<uint8_t, 6>& addr, int profileId) {
|
||||
if (profileId == BT_PROFILE_HID_HOST) {
|
||||
hidHostDisconnect();
|
||||
} else if (profileId == BT_PROFILE_HID_DEVICE) {
|
||||
if (struct Device* dev = bluetooth_hid_device_get_device()) {
|
||||
if (Device* dev = bluetooth_hid_device_get_device()) {
|
||||
bluetooth_hid_device_stop(dev);
|
||||
}
|
||||
} else {
|
||||
struct Device* dev = findFirstDevice();
|
||||
Device* dev = device_find_first_active_by_type(&BLUETOOTH_TYPE);
|
||||
if (dev == nullptr) return;
|
||||
bluetooth_disconnect(dev, addr.data(), (BtProfileId)profileId);
|
||||
}
|
||||
|
||||
@ -502,8 +502,8 @@ static void hidHostSubscribeNext(HidHostCtx& ctx) {
|
||||
}
|
||||
device.name = name;
|
||||
settings::save(device);
|
||||
if (struct Device* dev = findFirstDevice()) {
|
||||
struct BtEvent e = {};
|
||||
if (Device* dev = device_find_first_active_by_type(&BLUETOOTH_TYPE)) {
|
||||
BtEvent e = {};
|
||||
e.type = BT_EVENT_PROFILE_STATE_CHANGED;
|
||||
e.profile_state.state = BT_PROFILE_STATE_CONNECTED;
|
||||
e.profile_state.profile = BT_PROFILE_HID_HOST;
|
||||
@ -662,7 +662,7 @@ static int hidHostGapCb(struct ble_gap_event* event, void* /*arg*/) {
|
||||
} else {
|
||||
LOGGER.warn("Connect failed status={}", event->connect.status);
|
||||
hid_host_ctx.reset();
|
||||
if (struct Device* dev = findFirstDevice()) {
|
||||
if (Device* dev = device_find_first_active_by_type(&BLUETOOTH_TYPE)) {
|
||||
bluetooth_set_hid_host_active(dev, false);
|
||||
struct BtEvent e = {};
|
||||
e.type = BT_EVENT_PROFILE_STATE_CHANGED;
|
||||
@ -687,7 +687,7 @@ static int hidHostGapCb(struct ble_gap_event* event, void* /*arg*/) {
|
||||
hid_host_mouse_btn.store(false);
|
||||
hid_host_mouse_active.store(false);
|
||||
|
||||
if (struct Device* dev = findFirstDevice()) {
|
||||
if (Device* dev = device_find_first_active_by_type(&BLUETOOTH_TYPE)) {
|
||||
bluetooth_set_hid_host_active(dev, false);
|
||||
struct BtEvent e = {};
|
||||
e.type = BT_EVENT_PROFILE_STATE_CHANGED;
|
||||
@ -795,7 +795,7 @@ void hidHostConnect(const std::array<uint8_t, 6>& addr) {
|
||||
}
|
||||
|
||||
// Notify driver that a HID host central connection is starting.
|
||||
if (struct Device* dev = findFirstDevice()) bluetooth_set_hid_host_active(dev, true);
|
||||
if (Device* dev = device_find_first_active_by_type(&BLUETOOTH_TYPE)) bluetooth_set_hid_host_active(dev, true);
|
||||
|
||||
// Look up the addr_type from the cached scan results.
|
||||
ble_addr_t ble_addr = {};
|
||||
@ -815,10 +815,10 @@ void hidHostConnect(const std::array<uint8_t, 6>& addr) {
|
||||
if (rc != 0) {
|
||||
LOGGER.warn("ble_gap_connect failed rc={}", rc);
|
||||
hid_host_ctx.reset();
|
||||
if (struct Device* dev = findFirstDevice()) {
|
||||
if (Device* dev = device_find_first_active_by_type(&BLUETOOTH_TYPE)) {
|
||||
bluetooth_set_hid_host_active(dev, false);
|
||||
// Fire IDLE so bt_event_bridge can start a new scan and retry.
|
||||
struct BtEvent e = {};
|
||||
BtEvent e = {};
|
||||
e.type = BT_EVENT_PROFILE_STATE_CHANGED;
|
||||
e.profile_state.state = BT_PROFILE_STATE_IDLE;
|
||||
e.profile_state.profile = BT_PROFILE_HID_HOST;
|
||||
@ -869,7 +869,7 @@ void autoConnectHidHost() {
|
||||
auto peers = settings::loadAll();
|
||||
for (const auto& peer : peers) {
|
||||
if (peer.autoConnect && peer.profileId == BT_PROFILE_HID_HOST) {
|
||||
if (struct Device* dev = findFirstDevice()) {
|
||||
if (Device* dev = device_find_first_active_by_type(&BLUETOOTH_TYPE)) {
|
||||
if (!bluetooth_is_scanning(dev)) {
|
||||
LOGGER.info("Auto-connect HID host: device not in scan, retrying scan");
|
||||
bluetooth_scan_start(dev);
|
||||
|
||||
@ -41,7 +41,7 @@ void download(
|
||||
config->auth_type = HTTP_AUTH_TYPE_NONE;
|
||||
config->cert_pem = reinterpret_cast<const char*>(certificate.get());
|
||||
config->cert_len = certificate_length;
|
||||
config->tls_version = ESP_HTTP_CLIENT_TLS_VER_TLS_1_3;
|
||||
config->tls_version = ESP_HTTP_CLIENT_TLS_VER_TLS_1_2;
|
||||
config->method = HTTP_METHOD_GET;
|
||||
config->timeout_ms = 5000;
|
||||
config->transport_type = HTTP_TRANSPORT_OVER_SSL;
|
||||
|
||||
@ -166,11 +166,11 @@ class StatusbarService final : public Service {
|
||||
}
|
||||
|
||||
void updateBluetoothIcon() {
|
||||
auto radio_state = tt::bluetooth::getRadioState();
|
||||
struct Device* btdev = tt::bluetooth::findFirstDevice();
|
||||
auto radio_state = bluetooth::getRadioState();
|
||||
Device* btdev = device_find_first_active_by_type(&BLUETOOTH_TYPE);
|
||||
bool scanning = btdev ? bluetooth_is_scanning(btdev) : false;
|
||||
struct Device* serial_dev = bluetooth_serial_get_device();
|
||||
struct Device* midi_dev = bluetooth_midi_get_device();
|
||||
Device* serial_dev = bluetooth_serial_get_device();
|
||||
Device* midi_dev = bluetooth_midi_get_device();
|
||||
bool connected = (serial_dev && bluetooth_serial_is_connected(serial_dev)) ||
|
||||
(midi_dev && bluetooth_midi_is_connected(midi_dev));
|
||||
const char* desired_icon = getBluetoothStatusIcon(radio_state, scanning, connected);
|
||||
@ -213,8 +213,8 @@ class StatusbarService final : public Service {
|
||||
}
|
||||
|
||||
void updateUsbIcon() {
|
||||
struct Device* hid_dev = device_find_first_active_by_type(&USB_HOST_HID_TYPE);
|
||||
struct Device* midi_dev = device_find_first_active_by_type(&USB_HOST_MIDI_TYPE);
|
||||
Device* hid_dev = device_find_first_active_by_type(&USB_HOST_HID_TYPE);
|
||||
Device* midi_dev = device_find_first_active_by_type(&USB_HOST_MIDI_TYPE);
|
||||
bool connected = (hid_dev && usb_host_hid_is_connected(hid_dev)) ||
|
||||
(midi_dev && usb_midi_is_connected(midi_dev));
|
||||
if (!connected) {
|
||||
|
||||
@ -1,4 +1,8 @@
|
||||
#include <Tactility/service/wifi/WifiBootSplashInit.h>
|
||||
|
||||
#include "Tactility/service/wifi/Wifi.h"
|
||||
#include "Tactility/service/wifi/WifiSettings.h"
|
||||
|
||||
#include <Tactility/file/PropertiesFile.h>
|
||||
|
||||
#include <Tactility/MountPoints.h>
|
||||
@ -116,7 +120,9 @@ static void importWifiApSettingsFromDir(const std::string& path) {
|
||||
}
|
||||
|
||||
void bootSplashInit() {
|
||||
LOGGER.info("bootSplashInit begin");
|
||||
getMainDispatcher().dispatch([] {
|
||||
LOGGER.info("bootSplashInit dispatch begin");
|
||||
// First import any provisioning files placed on the system data partition.
|
||||
const std::string data_settings_path = file::getChildPath(file::MOUNT_POINT_DATA, "settings");
|
||||
importWifiApSettingsFromDir(data_settings_path);
|
||||
@ -127,7 +133,15 @@ void bootSplashInit() {
|
||||
const std::string sd_settings_path = file::getChildPath(sdcard_path, "settings");
|
||||
importWifiApSettingsFromDir(sd_settings_path);
|
||||
}
|
||||
|
||||
if (settings::shouldEnableOnBoot()) {
|
||||
LOGGER.info("Auto-enabling due to setting");
|
||||
getMainDispatcher().dispatch([] -> void { setEnabled(true); });
|
||||
}
|
||||
|
||||
LOGGER.info("bootSplashInit dispatch end");
|
||||
});
|
||||
LOGGER.info("bootSplashInit end");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -926,11 +926,6 @@ public:
|
||||
// We want to try and scan more often in case of startup or scan lock failure
|
||||
wifi_singleton->autoConnectTimer->start();
|
||||
|
||||
if (settings::shouldEnableOnBoot()) {
|
||||
LOGGER.info("Auto-enabling due to setting");
|
||||
getMainDispatcher().dispatch([] { dispatchEnable(wifi_singleton); });
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@ -14,7 +14,6 @@ static const auto LOGGER = Logger("SystemSettings");
|
||||
|
||||
constexpr auto* FILE_PATH_FORMAT = "{}/settings/system.properties";
|
||||
|
||||
static Mutex mutex;
|
||||
static bool cached = false;
|
||||
static SystemSettings cachedSettings;
|
||||
|
||||
@ -51,15 +50,6 @@ static bool loadSystemSettingsFromFile(SystemSettings& properties) {
|
||||
properties.dateFormat = "MM/DD/YYYY";
|
||||
}
|
||||
|
||||
// Load region
|
||||
auto region_entry = map.find("region");
|
||||
if (region_entry != map.end() && !region_entry->second.empty()) {
|
||||
properties.region = region_entry->second;
|
||||
} else {
|
||||
LOGGER.info("Region missing or empty, using default EU");
|
||||
properties.region = "EU";
|
||||
}
|
||||
|
||||
LOGGER.info("System settings loaded");
|
||||
return true;
|
||||
}
|
||||
@ -82,7 +72,6 @@ bool saveSystemSettings(const SystemSettings& properties) {
|
||||
map["language"] = toString(properties.language);
|
||||
map["timeFormat24h"] = properties.timeFormat24h ? "true" : "false";
|
||||
map["dateFormat"] = properties.dateFormat;
|
||||
map["region"] = properties.region;
|
||||
|
||||
if (!file::savePropertiesFile(file_path, map)) {
|
||||
LOGGER.error("Failed to save {}", file_path);
|
||||
|
||||
@ -49,6 +49,15 @@ std::string getTimeZoneName() {
|
||||
}
|
||||
}
|
||||
|
||||
bool hasTimeZone() {
|
||||
Preferences preferences(TIME_SETTINGS_NAMESPACE);
|
||||
std::string timezone;
|
||||
if (!preferences.optString(TIMEZONE_PREFERENCES_KEY_NAME, timezone)) {
|
||||
return false;
|
||||
}
|
||||
return !timezone.empty();
|
||||
}
|
||||
|
||||
std::string getTimeZoneCode() {
|
||||
Preferences preferences(TIME_SETTINGS_NAMESPACE);
|
||||
std::string result;
|
||||
|
||||
@ -291,6 +291,14 @@ struct Device* device_find_by_name(const char* name);
|
||||
*/
|
||||
struct Device* device_find_first_active_by_type(const struct DeviceType* type);
|
||||
|
||||
/**
|
||||
* Find the first device of the given type.
|
||||
*
|
||||
* @param[in] type non-null device type pointer
|
||||
* @return the first device of the given type, or NULL if none found
|
||||
*/
|
||||
struct Device* device_find_first_by_type(const struct DeviceType* type);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -386,4 +386,13 @@ Device* device_find_first_active_by_type(const DeviceType* type) {
|
||||
return found;
|
||||
}
|
||||
|
||||
Device* device_find_first_by_type(const DeviceType* type) {
|
||||
Device* found = nullptr;
|
||||
device_for_each_of_type(type, &found, [](Device* dev, void* ctx) -> bool {
|
||||
*static_cast<Device**>(ctx) = dev;
|
||||
return false;
|
||||
});
|
||||
return found;
|
||||
}
|
||||
|
||||
} // extern "C"
|
||||
|
||||
312
build-tests/Devices/simulator/Makefile
Normal file
312
build-tests/Devices/simulator/Makefile
Normal file
@ -0,0 +1,312 @@
|
||||
# CMAKE generated file: DO NOT EDIT!
|
||||
# Generated by "Unix Makefiles" Generator, CMake Version 4.3
|
||||
|
||||
# Default target executed when no arguments are given to make.
|
||||
default_target: all
|
||||
.PHONY : default_target
|
||||
|
||||
# Allow only one "make -f Makefile2" at a time, but pass parallelism.
|
||||
.NOTPARALLEL:
|
||||
|
||||
#=============================================================================
|
||||
# Special targets provided by cmake.
|
||||
|
||||
# Disable implicit rules so canonical targets will work.
|
||||
.SUFFIXES:
|
||||
|
||||
# Disable VCS-based implicit rules.
|
||||
% : %,v
|
||||
|
||||
# Disable VCS-based implicit rules.
|
||||
% : RCS/%
|
||||
|
||||
# Disable VCS-based implicit rules.
|
||||
% : RCS/%,v
|
||||
|
||||
# Disable VCS-based implicit rules.
|
||||
% : SCCS/s.%
|
||||
|
||||
# Disable VCS-based implicit rules.
|
||||
% : s.%
|
||||
|
||||
.SUFFIXES: .hpux_make_needs_suffix_list
|
||||
|
||||
# Command-line flag to silence nested $(MAKE).
|
||||
$(VERBOSE)MAKESILENT = -s
|
||||
|
||||
#Suppress display of executed commands.
|
||||
$(VERBOSE).SILENT:
|
||||
|
||||
# A target that is always out of date.
|
||||
cmake_force:
|
||||
.PHONY : cmake_force
|
||||
|
||||
#=============================================================================
|
||||
# Set environment variables for the build.
|
||||
|
||||
# The shell in which to execute make rules.
|
||||
SHELL = /bin/sh
|
||||
|
||||
# The CMake executable.
|
||||
CMAKE_COMMAND = /usr/bin/cmake
|
||||
|
||||
# The command to remove a file.
|
||||
RM = /usr/bin/cmake -E rm -f
|
||||
|
||||
# Escaping for special characters.
|
||||
EQUALS = =
|
||||
|
||||
# The top-level source directory on which CMake was run.
|
||||
CMAKE_SOURCE_DIR = /home/ken/Projects/Tactility
|
||||
|
||||
# The top-level build directory on which CMake was run.
|
||||
CMAKE_BINARY_DIR = /home/ken/Projects/Tactility/build-tests
|
||||
|
||||
#=============================================================================
|
||||
# Targets provided globally by CMake.
|
||||
|
||||
# Special rule for the target edit_cache
|
||||
edit_cache:
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake cache editor..."
|
||||
/usr/bin/ccmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
|
||||
.PHONY : edit_cache
|
||||
|
||||
# Special rule for the target edit_cache
|
||||
edit_cache/fast: edit_cache
|
||||
.PHONY : edit_cache/fast
|
||||
|
||||
# Special rule for the target rebuild_cache
|
||||
rebuild_cache:
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake to regenerate build system..."
|
||||
/usr/bin/cmake --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
|
||||
.PHONY : rebuild_cache
|
||||
|
||||
# Special rule for the target rebuild_cache
|
||||
rebuild_cache/fast: rebuild_cache
|
||||
.PHONY : rebuild_cache/fast
|
||||
|
||||
# Special rule for the target list_install_components
|
||||
list_install_components:
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Available install components are: \"Unspecified\""
|
||||
.PHONY : list_install_components
|
||||
|
||||
# Special rule for the target list_install_components
|
||||
list_install_components/fast: list_install_components
|
||||
.PHONY : list_install_components/fast
|
||||
|
||||
# Special rule for the target install
|
||||
install: preinstall
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..."
|
||||
/usr/bin/cmake -P cmake_install.cmake
|
||||
.PHONY : install
|
||||
|
||||
# Special rule for the target install
|
||||
install/fast: preinstall/fast
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..."
|
||||
/usr/bin/cmake -P cmake_install.cmake
|
||||
.PHONY : install/fast
|
||||
|
||||
# Special rule for the target install/local
|
||||
install/local: preinstall
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..."
|
||||
/usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
|
||||
.PHONY : install/local
|
||||
|
||||
# Special rule for the target install/local
|
||||
install/local/fast: preinstall/fast
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..."
|
||||
/usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
|
||||
.PHONY : install/local/fast
|
||||
|
||||
# Special rule for the target install/strip
|
||||
install/strip: preinstall
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..."
|
||||
/usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
|
||||
.PHONY : install/strip
|
||||
|
||||
# Special rule for the target install/strip
|
||||
install/strip/fast: preinstall/fast
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..."
|
||||
/usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
|
||||
.PHONY : install/strip/fast
|
||||
|
||||
# The main all target
|
||||
all: cmake_check_build_system
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(CMAKE_COMMAND) -E cmake_progress_start /home/ken/Projects/Tactility/build-tests/CMakeFiles /home/ken/Projects/Tactility/build-tests/Devices/simulator//CMakeFiles/progress.marks
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 Devices/simulator/all
|
||||
$(CMAKE_COMMAND) -E cmake_progress_start /home/ken/Projects/Tactility/build-tests/CMakeFiles 0
|
||||
.PHONY : all
|
||||
|
||||
# The main clean target
|
||||
clean:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 Devices/simulator/clean
|
||||
.PHONY : clean
|
||||
|
||||
# The main clean target
|
||||
clean/fast: clean
|
||||
.PHONY : clean/fast
|
||||
|
||||
# Prepare targets for installation.
|
||||
preinstall: all
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 Devices/simulator/preinstall
|
||||
.PHONY : preinstall
|
||||
|
||||
# Prepare targets for installation.
|
||||
preinstall/fast:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 Devices/simulator/preinstall
|
||||
.PHONY : preinstall/fast
|
||||
|
||||
# clear depends
|
||||
depend:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
|
||||
.PHONY : depend
|
||||
|
||||
# Convenience name for target.
|
||||
Devices/simulator/CMakeFiles/simulator.dir/rule:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 Devices/simulator/CMakeFiles/simulator.dir/rule
|
||||
.PHONY : Devices/simulator/CMakeFiles/simulator.dir/rule
|
||||
|
||||
# Convenience name for target.
|
||||
simulator: Devices/simulator/CMakeFiles/simulator.dir/rule
|
||||
.PHONY : simulator
|
||||
|
||||
# fast build rule for target.
|
||||
simulator/fast:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Devices/simulator/CMakeFiles/simulator.dir/build.make Devices/simulator/CMakeFiles/simulator.dir/build
|
||||
.PHONY : simulator/fast
|
||||
|
||||
Source/Main.o: Source/Main.cpp.o
|
||||
.PHONY : Source/Main.o
|
||||
|
||||
# target to build an object file
|
||||
Source/Main.cpp.o:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Devices/simulator/CMakeFiles/simulator.dir/build.make Devices/simulator/CMakeFiles/simulator.dir/Source/Main.cpp.o
|
||||
.PHONY : Source/Main.cpp.o
|
||||
|
||||
Source/Main.i: Source/Main.cpp.i
|
||||
.PHONY : Source/Main.i
|
||||
|
||||
# target to preprocess a source file
|
||||
Source/Main.cpp.i:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Devices/simulator/CMakeFiles/simulator.dir/build.make Devices/simulator/CMakeFiles/simulator.dir/Source/Main.cpp.i
|
||||
.PHONY : Source/Main.cpp.i
|
||||
|
||||
Source/Main.s: Source/Main.cpp.s
|
||||
.PHONY : Source/Main.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
Source/Main.cpp.s:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Devices/simulator/CMakeFiles/simulator.dir/build.make Devices/simulator/CMakeFiles/simulator.dir/Source/Main.cpp.s
|
||||
.PHONY : Source/Main.cpp.s
|
||||
|
||||
Source/Simulator.o: Source/Simulator.cpp.o
|
||||
.PHONY : Source/Simulator.o
|
||||
|
||||
# target to build an object file
|
||||
Source/Simulator.cpp.o:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Devices/simulator/CMakeFiles/simulator.dir/build.make Devices/simulator/CMakeFiles/simulator.dir/Source/Simulator.cpp.o
|
||||
.PHONY : Source/Simulator.cpp.o
|
||||
|
||||
Source/Simulator.i: Source/Simulator.cpp.i
|
||||
.PHONY : Source/Simulator.i
|
||||
|
||||
# target to preprocess a source file
|
||||
Source/Simulator.cpp.i:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Devices/simulator/CMakeFiles/simulator.dir/build.make Devices/simulator/CMakeFiles/simulator.dir/Source/Simulator.cpp.i
|
||||
.PHONY : Source/Simulator.cpp.i
|
||||
|
||||
Source/Simulator.s: Source/Simulator.cpp.s
|
||||
.PHONY : Source/Simulator.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
Source/Simulator.cpp.s:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Devices/simulator/CMakeFiles/simulator.dir/build.make Devices/simulator/CMakeFiles/simulator.dir/Source/Simulator.cpp.s
|
||||
.PHONY : Source/Simulator.cpp.s
|
||||
|
||||
Source/hal/SimulatorPower.o: Source/hal/SimulatorPower.cpp.o
|
||||
.PHONY : Source/hal/SimulatorPower.o
|
||||
|
||||
# target to build an object file
|
||||
Source/hal/SimulatorPower.cpp.o:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Devices/simulator/CMakeFiles/simulator.dir/build.make Devices/simulator/CMakeFiles/simulator.dir/Source/hal/SimulatorPower.cpp.o
|
||||
.PHONY : Source/hal/SimulatorPower.cpp.o
|
||||
|
||||
Source/hal/SimulatorPower.i: Source/hal/SimulatorPower.cpp.i
|
||||
.PHONY : Source/hal/SimulatorPower.i
|
||||
|
||||
# target to preprocess a source file
|
||||
Source/hal/SimulatorPower.cpp.i:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Devices/simulator/CMakeFiles/simulator.dir/build.make Devices/simulator/CMakeFiles/simulator.dir/Source/hal/SimulatorPower.cpp.i
|
||||
.PHONY : Source/hal/SimulatorPower.cpp.i
|
||||
|
||||
Source/hal/SimulatorPower.s: Source/hal/SimulatorPower.cpp.s
|
||||
.PHONY : Source/hal/SimulatorPower.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
Source/hal/SimulatorPower.cpp.s:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Devices/simulator/CMakeFiles/simulator.dir/build.make Devices/simulator/CMakeFiles/simulator.dir/Source/hal/SimulatorPower.cpp.s
|
||||
.PHONY : Source/hal/SimulatorPower.cpp.s
|
||||
|
||||
Source/module.o: Source/module.cpp.o
|
||||
.PHONY : Source/module.o
|
||||
|
||||
# target to build an object file
|
||||
Source/module.cpp.o:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Devices/simulator/CMakeFiles/simulator.dir/build.make Devices/simulator/CMakeFiles/simulator.dir/Source/module.cpp.o
|
||||
.PHONY : Source/module.cpp.o
|
||||
|
||||
Source/module.i: Source/module.cpp.i
|
||||
.PHONY : Source/module.i
|
||||
|
||||
# target to preprocess a source file
|
||||
Source/module.cpp.i:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Devices/simulator/CMakeFiles/simulator.dir/build.make Devices/simulator/CMakeFiles/simulator.dir/Source/module.cpp.i
|
||||
.PHONY : Source/module.cpp.i
|
||||
|
||||
Source/module.s: Source/module.cpp.s
|
||||
.PHONY : Source/module.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
Source/module.cpp.s:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Devices/simulator/CMakeFiles/simulator.dir/build.make Devices/simulator/CMakeFiles/simulator.dir/Source/module.cpp.s
|
||||
.PHONY : Source/module.cpp.s
|
||||
|
||||
# Help Target
|
||||
help:
|
||||
@echo "The following are some of the valid targets for this Makefile:"
|
||||
@echo "... all (the default if no target is provided)"
|
||||
@echo "... clean"
|
||||
@echo "... depend"
|
||||
@echo "... edit_cache"
|
||||
@echo "... install"
|
||||
@echo "... install/local"
|
||||
@echo "... install/strip"
|
||||
@echo "... list_install_components"
|
||||
@echo "... rebuild_cache"
|
||||
@echo "... simulator"
|
||||
@echo "... Source/Main.o"
|
||||
@echo "... Source/Main.i"
|
||||
@echo "... Source/Main.s"
|
||||
@echo "... Source/Simulator.o"
|
||||
@echo "... Source/Simulator.i"
|
||||
@echo "... Source/Simulator.s"
|
||||
@echo "... Source/hal/SimulatorPower.o"
|
||||
@echo "... Source/hal/SimulatorPower.i"
|
||||
@echo "... Source/hal/SimulatorPower.s"
|
||||
@echo "... Source/module.o"
|
||||
@echo "... Source/module.i"
|
||||
@echo "... Source/module.s"
|
||||
.PHONY : help
|
||||
|
||||
|
||||
|
||||
#=============================================================================
|
||||
# Special targets to cleanup operation of make.
|
||||
|
||||
# Special rule to run CMake to check the build system integrity.
|
||||
# No rule that depends on this can have commands that come from listfiles
|
||||
# because they might be regenerated.
|
||||
cmake_check_build_system:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
|
||||
.PHONY : cmake_check_build_system
|
||||
|
||||
50
build-tests/Devices/simulator/cmake_install.cmake
Normal file
50
build-tests/Devices/simulator/cmake_install.cmake
Normal file
@ -0,0 +1,50 @@
|
||||
# Install script for directory: /home/ken/Projects/Tactility/Devices/simulator
|
||||
|
||||
# Set the install prefix
|
||||
if(NOT DEFINED CMAKE_INSTALL_PREFIX)
|
||||
set(CMAKE_INSTALL_PREFIX "/usr/local")
|
||||
endif()
|
||||
string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
|
||||
|
||||
# Set the install configuration name.
|
||||
if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
|
||||
if(BUILD_TYPE)
|
||||
string(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
|
||||
CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
|
||||
else()
|
||||
set(CMAKE_INSTALL_CONFIG_NAME "")
|
||||
endif()
|
||||
message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
|
||||
endif()
|
||||
|
||||
# Set the component getting installed.
|
||||
if(NOT CMAKE_INSTALL_COMPONENT)
|
||||
if(COMPONENT)
|
||||
message(STATUS "Install component: \"${COMPONENT}\"")
|
||||
set(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
|
||||
else()
|
||||
set(CMAKE_INSTALL_COMPONENT)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Install shared libraries without execute permission?
|
||||
if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
|
||||
set(CMAKE_INSTALL_SO_NO_EXE "0")
|
||||
endif()
|
||||
|
||||
# Is this installation the result of a crosscompile?
|
||||
if(NOT DEFINED CMAKE_CROSSCOMPILING)
|
||||
set(CMAKE_CROSSCOMPILING "FALSE")
|
||||
endif()
|
||||
|
||||
# Set path to fallback-tool for dependency-resolution.
|
||||
if(NOT DEFINED CMAKE_OBJDUMP)
|
||||
set(CMAKE_OBJDUMP "/usr/bin/objdump")
|
||||
endif()
|
||||
|
||||
string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT
|
||||
"${CMAKE_INSTALL_MANIFEST_FILES}")
|
||||
if(CMAKE_INSTALL_LOCAL_ONLY)
|
||||
file(WRITE "/home/ken/Projects/Tactility/build-tests/Devices/simulator/install_local_manifest.txt"
|
||||
"${CMAKE_INSTALL_MANIFEST_CONTENT}")
|
||||
endif()
|
||||
288
build-tests/Firmware/Makefile
Normal file
288
build-tests/Firmware/Makefile
Normal file
@ -0,0 +1,288 @@
|
||||
# CMAKE generated file: DO NOT EDIT!
|
||||
# Generated by "Unix Makefiles" Generator, CMake Version 4.3
|
||||
|
||||
# Default target executed when no arguments are given to make.
|
||||
default_target: all
|
||||
.PHONY : default_target
|
||||
|
||||
# Allow only one "make -f Makefile2" at a time, but pass parallelism.
|
||||
.NOTPARALLEL:
|
||||
|
||||
#=============================================================================
|
||||
# Special targets provided by cmake.
|
||||
|
||||
# Disable implicit rules so canonical targets will work.
|
||||
.SUFFIXES:
|
||||
|
||||
# Disable VCS-based implicit rules.
|
||||
% : %,v
|
||||
|
||||
# Disable VCS-based implicit rules.
|
||||
% : RCS/%
|
||||
|
||||
# Disable VCS-based implicit rules.
|
||||
% : RCS/%,v
|
||||
|
||||
# Disable VCS-based implicit rules.
|
||||
% : SCCS/s.%
|
||||
|
||||
# Disable VCS-based implicit rules.
|
||||
% : s.%
|
||||
|
||||
.SUFFIXES: .hpux_make_needs_suffix_list
|
||||
|
||||
# Command-line flag to silence nested $(MAKE).
|
||||
$(VERBOSE)MAKESILENT = -s
|
||||
|
||||
#Suppress display of executed commands.
|
||||
$(VERBOSE).SILENT:
|
||||
|
||||
# A target that is always out of date.
|
||||
cmake_force:
|
||||
.PHONY : cmake_force
|
||||
|
||||
#=============================================================================
|
||||
# Set environment variables for the build.
|
||||
|
||||
# The shell in which to execute make rules.
|
||||
SHELL = /bin/sh
|
||||
|
||||
# The CMake executable.
|
||||
CMAKE_COMMAND = /usr/bin/cmake
|
||||
|
||||
# The command to remove a file.
|
||||
RM = /usr/bin/cmake -E rm -f
|
||||
|
||||
# Escaping for special characters.
|
||||
EQUALS = =
|
||||
|
||||
# The top-level source directory on which CMake was run.
|
||||
CMAKE_SOURCE_DIR = /home/ken/Projects/Tactility
|
||||
|
||||
# The top-level build directory on which CMake was run.
|
||||
CMAKE_BINARY_DIR = /home/ken/Projects/Tactility/build-tests
|
||||
|
||||
#=============================================================================
|
||||
# Targets provided globally by CMake.
|
||||
|
||||
# Special rule for the target edit_cache
|
||||
edit_cache:
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake cache editor..."
|
||||
/usr/bin/ccmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
|
||||
.PHONY : edit_cache
|
||||
|
||||
# Special rule for the target edit_cache
|
||||
edit_cache/fast: edit_cache
|
||||
.PHONY : edit_cache/fast
|
||||
|
||||
# Special rule for the target rebuild_cache
|
||||
rebuild_cache:
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake to regenerate build system..."
|
||||
/usr/bin/cmake --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
|
||||
.PHONY : rebuild_cache
|
||||
|
||||
# Special rule for the target rebuild_cache
|
||||
rebuild_cache/fast: rebuild_cache
|
||||
.PHONY : rebuild_cache/fast
|
||||
|
||||
# Special rule for the target list_install_components
|
||||
list_install_components:
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Available install components are: \"Unspecified\""
|
||||
.PHONY : list_install_components
|
||||
|
||||
# Special rule for the target list_install_components
|
||||
list_install_components/fast: list_install_components
|
||||
.PHONY : list_install_components/fast
|
||||
|
||||
# Special rule for the target install
|
||||
install: preinstall
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..."
|
||||
/usr/bin/cmake -P cmake_install.cmake
|
||||
.PHONY : install
|
||||
|
||||
# Special rule for the target install
|
||||
install/fast: preinstall/fast
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..."
|
||||
/usr/bin/cmake -P cmake_install.cmake
|
||||
.PHONY : install/fast
|
||||
|
||||
# Special rule for the target install/local
|
||||
install/local: preinstall
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..."
|
||||
/usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
|
||||
.PHONY : install/local
|
||||
|
||||
# Special rule for the target install/local
|
||||
install/local/fast: preinstall/fast
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..."
|
||||
/usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
|
||||
.PHONY : install/local/fast
|
||||
|
||||
# Special rule for the target install/strip
|
||||
install/strip: preinstall
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..."
|
||||
/usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
|
||||
.PHONY : install/strip
|
||||
|
||||
# Special rule for the target install/strip
|
||||
install/strip/fast: preinstall/fast
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..."
|
||||
/usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
|
||||
.PHONY : install/strip/fast
|
||||
|
||||
# The main all target
|
||||
all: cmake_check_build_system
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(CMAKE_COMMAND) -E cmake_progress_start /home/ken/Projects/Tactility/build-tests/CMakeFiles /home/ken/Projects/Tactility/build-tests/Firmware//CMakeFiles/progress.marks
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 Firmware/all
|
||||
$(CMAKE_COMMAND) -E cmake_progress_start /home/ken/Projects/Tactility/build-tests/CMakeFiles 0
|
||||
.PHONY : all
|
||||
|
||||
# The main clean target
|
||||
clean:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 Firmware/clean
|
||||
.PHONY : clean
|
||||
|
||||
# The main clean target
|
||||
clean/fast: clean
|
||||
.PHONY : clean/fast
|
||||
|
||||
# Prepare targets for installation.
|
||||
preinstall: all
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 Firmware/preinstall
|
||||
.PHONY : preinstall
|
||||
|
||||
# Prepare targets for installation.
|
||||
preinstall/fast:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 Firmware/preinstall
|
||||
.PHONY : preinstall/fast
|
||||
|
||||
# clear depends
|
||||
depend:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
|
||||
.PHONY : depend
|
||||
|
||||
# Convenience name for target.
|
||||
Firmware/CMakeFiles/FirmwareSim.dir/rule:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 Firmware/CMakeFiles/FirmwareSim.dir/rule
|
||||
.PHONY : Firmware/CMakeFiles/FirmwareSim.dir/rule
|
||||
|
||||
# Convenience name for target.
|
||||
FirmwareSim: Firmware/CMakeFiles/FirmwareSim.dir/rule
|
||||
.PHONY : FirmwareSim
|
||||
|
||||
# fast build rule for target.
|
||||
FirmwareSim/fast:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Firmware/CMakeFiles/FirmwareSim.dir/build.make Firmware/CMakeFiles/FirmwareSim.dir/build
|
||||
.PHONY : FirmwareSim/fast
|
||||
|
||||
# Convenience name for target.
|
||||
Firmware/CMakeFiles/AlwaysRun.dir/rule:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 Firmware/CMakeFiles/AlwaysRun.dir/rule
|
||||
.PHONY : Firmware/CMakeFiles/AlwaysRun.dir/rule
|
||||
|
||||
# Convenience name for target.
|
||||
AlwaysRun: Firmware/CMakeFiles/AlwaysRun.dir/rule
|
||||
.PHONY : AlwaysRun
|
||||
|
||||
# fast build rule for target.
|
||||
AlwaysRun/fast:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Firmware/CMakeFiles/AlwaysRun.dir/build.make Firmware/CMakeFiles/AlwaysRun.dir/build
|
||||
.PHONY : AlwaysRun/fast
|
||||
|
||||
# Convenience name for target.
|
||||
Firmware/CMakeFiles/Generated.dir/rule:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 Firmware/CMakeFiles/Generated.dir/rule
|
||||
.PHONY : Firmware/CMakeFiles/Generated.dir/rule
|
||||
|
||||
# Convenience name for target.
|
||||
Generated: Firmware/CMakeFiles/Generated.dir/rule
|
||||
.PHONY : Generated
|
||||
|
||||
# fast build rule for target.
|
||||
Generated/fast:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Firmware/CMakeFiles/Generated.dir/build.make Firmware/CMakeFiles/Generated.dir/build
|
||||
.PHONY : Generated/fast
|
||||
|
||||
Generated/devicetree.o: Generated/devicetree.c.o
|
||||
.PHONY : Generated/devicetree.o
|
||||
|
||||
# target to build an object file
|
||||
Generated/devicetree.c.o:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Firmware/CMakeFiles/FirmwareSim.dir/build.make Firmware/CMakeFiles/FirmwareSim.dir/Generated/devicetree.c.o
|
||||
.PHONY : Generated/devicetree.c.o
|
||||
|
||||
Generated/devicetree.i: Generated/devicetree.c.i
|
||||
.PHONY : Generated/devicetree.i
|
||||
|
||||
# target to preprocess a source file
|
||||
Generated/devicetree.c.i:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Firmware/CMakeFiles/FirmwareSim.dir/build.make Firmware/CMakeFiles/FirmwareSim.dir/Generated/devicetree.c.i
|
||||
.PHONY : Generated/devicetree.c.i
|
||||
|
||||
Generated/devicetree.s: Generated/devicetree.c.s
|
||||
.PHONY : Generated/devicetree.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
Generated/devicetree.c.s:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Firmware/CMakeFiles/FirmwareSim.dir/build.make Firmware/CMakeFiles/FirmwareSim.dir/Generated/devicetree.c.s
|
||||
.PHONY : Generated/devicetree.c.s
|
||||
|
||||
Source/Main.o: Source/Main.cpp.o
|
||||
.PHONY : Source/Main.o
|
||||
|
||||
# target to build an object file
|
||||
Source/Main.cpp.o:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Firmware/CMakeFiles/FirmwareSim.dir/build.make Firmware/CMakeFiles/FirmwareSim.dir/Source/Main.cpp.o
|
||||
.PHONY : Source/Main.cpp.o
|
||||
|
||||
Source/Main.i: Source/Main.cpp.i
|
||||
.PHONY : Source/Main.i
|
||||
|
||||
# target to preprocess a source file
|
||||
Source/Main.cpp.i:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Firmware/CMakeFiles/FirmwareSim.dir/build.make Firmware/CMakeFiles/FirmwareSim.dir/Source/Main.cpp.i
|
||||
.PHONY : Source/Main.cpp.i
|
||||
|
||||
Source/Main.s: Source/Main.cpp.s
|
||||
.PHONY : Source/Main.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
Source/Main.cpp.s:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Firmware/CMakeFiles/FirmwareSim.dir/build.make Firmware/CMakeFiles/FirmwareSim.dir/Source/Main.cpp.s
|
||||
.PHONY : Source/Main.cpp.s
|
||||
|
||||
# Help Target
|
||||
help:
|
||||
@echo "The following are some of the valid targets for this Makefile:"
|
||||
@echo "... all (the default if no target is provided)"
|
||||
@echo "... clean"
|
||||
@echo "... depend"
|
||||
@echo "... edit_cache"
|
||||
@echo "... install"
|
||||
@echo "... install/local"
|
||||
@echo "... install/strip"
|
||||
@echo "... list_install_components"
|
||||
@echo "... rebuild_cache"
|
||||
@echo "... AlwaysRun"
|
||||
@echo "... Generated"
|
||||
@echo "... FirmwareSim"
|
||||
@echo "... Generated/devicetree.o"
|
||||
@echo "... Generated/devicetree.i"
|
||||
@echo "... Generated/devicetree.s"
|
||||
@echo "... Source/Main.o"
|
||||
@echo "... Source/Main.i"
|
||||
@echo "... Source/Main.s"
|
||||
.PHONY : help
|
||||
|
||||
|
||||
|
||||
#=============================================================================
|
||||
# Special targets to cleanup operation of make.
|
||||
|
||||
# Special rule to run CMake to check the build system integrity.
|
||||
# No rule that depends on this can have commands that come from listfiles
|
||||
# because they might be regenerated.
|
||||
cmake_check_build_system:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
|
||||
.PHONY : cmake_check_build_system
|
||||
|
||||
50
build-tests/Firmware/cmake_install.cmake
Normal file
50
build-tests/Firmware/cmake_install.cmake
Normal file
@ -0,0 +1,50 @@
|
||||
# Install script for directory: /home/ken/Projects/Tactility/Firmware
|
||||
|
||||
# Set the install prefix
|
||||
if(NOT DEFINED CMAKE_INSTALL_PREFIX)
|
||||
set(CMAKE_INSTALL_PREFIX "/usr/local")
|
||||
endif()
|
||||
string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
|
||||
|
||||
# Set the install configuration name.
|
||||
if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
|
||||
if(BUILD_TYPE)
|
||||
string(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
|
||||
CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
|
||||
else()
|
||||
set(CMAKE_INSTALL_CONFIG_NAME "")
|
||||
endif()
|
||||
message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
|
||||
endif()
|
||||
|
||||
# Set the component getting installed.
|
||||
if(NOT CMAKE_INSTALL_COMPONENT)
|
||||
if(COMPONENT)
|
||||
message(STATUS "Install component: \"${COMPONENT}\"")
|
||||
set(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
|
||||
else()
|
||||
set(CMAKE_INSTALL_COMPONENT)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Install shared libraries without execute permission?
|
||||
if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
|
||||
set(CMAKE_INSTALL_SO_NO_EXE "0")
|
||||
endif()
|
||||
|
||||
# Is this installation the result of a crosscompile?
|
||||
if(NOT DEFINED CMAKE_CROSSCOMPILING)
|
||||
set(CMAKE_CROSSCOMPILING "FALSE")
|
||||
endif()
|
||||
|
||||
# Set path to fallback-tool for dependency-resolution.
|
||||
if(NOT DEFINED CMAKE_OBJDUMP)
|
||||
set(CMAKE_OBJDUMP "/usr/bin/objdump")
|
||||
endif()
|
||||
|
||||
string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT
|
||||
"${CMAKE_INSTALL_MANIFEST_FILES}")
|
||||
if(CMAKE_INSTALL_LOCAL_ONLY)
|
||||
file(WRITE "/home/ken/Projects/Tactility/build-tests/Firmware/install_local_manifest.txt"
|
||||
"${CMAKE_INSTALL_MANIFEST_CONTENT}")
|
||||
endif()
|
||||
420
build-tests/Libraries/FreeRTOS-Kernel/Makefile
Normal file
420
build-tests/Libraries/FreeRTOS-Kernel/Makefile
Normal file
@ -0,0 +1,420 @@
|
||||
# CMAKE generated file: DO NOT EDIT!
|
||||
# Generated by "Unix Makefiles" Generator, CMake Version 4.3
|
||||
|
||||
# Default target executed when no arguments are given to make.
|
||||
default_target: all
|
||||
.PHONY : default_target
|
||||
|
||||
# Allow only one "make -f Makefile2" at a time, but pass parallelism.
|
||||
.NOTPARALLEL:
|
||||
|
||||
#=============================================================================
|
||||
# Special targets provided by cmake.
|
||||
|
||||
# Disable implicit rules so canonical targets will work.
|
||||
.SUFFIXES:
|
||||
|
||||
# Disable VCS-based implicit rules.
|
||||
% : %,v
|
||||
|
||||
# Disable VCS-based implicit rules.
|
||||
% : RCS/%
|
||||
|
||||
# Disable VCS-based implicit rules.
|
||||
% : RCS/%,v
|
||||
|
||||
# Disable VCS-based implicit rules.
|
||||
% : SCCS/s.%
|
||||
|
||||
# Disable VCS-based implicit rules.
|
||||
% : s.%
|
||||
|
||||
.SUFFIXES: .hpux_make_needs_suffix_list
|
||||
|
||||
# Command-line flag to silence nested $(MAKE).
|
||||
$(VERBOSE)MAKESILENT = -s
|
||||
|
||||
#Suppress display of executed commands.
|
||||
$(VERBOSE).SILENT:
|
||||
|
||||
# A target that is always out of date.
|
||||
cmake_force:
|
||||
.PHONY : cmake_force
|
||||
|
||||
#=============================================================================
|
||||
# Set environment variables for the build.
|
||||
|
||||
# The shell in which to execute make rules.
|
||||
SHELL = /bin/sh
|
||||
|
||||
# The CMake executable.
|
||||
CMAKE_COMMAND = /usr/bin/cmake
|
||||
|
||||
# The command to remove a file.
|
||||
RM = /usr/bin/cmake -E rm -f
|
||||
|
||||
# Escaping for special characters.
|
||||
EQUALS = =
|
||||
|
||||
# The top-level source directory on which CMake was run.
|
||||
CMAKE_SOURCE_DIR = /home/ken/Projects/Tactility
|
||||
|
||||
# The top-level build directory on which CMake was run.
|
||||
CMAKE_BINARY_DIR = /home/ken/Projects/Tactility/build-tests
|
||||
|
||||
#=============================================================================
|
||||
# Targets provided globally by CMake.
|
||||
|
||||
# Special rule for the target edit_cache
|
||||
edit_cache:
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake cache editor..."
|
||||
/usr/bin/ccmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
|
||||
.PHONY : edit_cache
|
||||
|
||||
# Special rule for the target edit_cache
|
||||
edit_cache/fast: edit_cache
|
||||
.PHONY : edit_cache/fast
|
||||
|
||||
# Special rule for the target rebuild_cache
|
||||
rebuild_cache:
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake to regenerate build system..."
|
||||
/usr/bin/cmake --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
|
||||
.PHONY : rebuild_cache
|
||||
|
||||
# Special rule for the target rebuild_cache
|
||||
rebuild_cache/fast: rebuild_cache
|
||||
.PHONY : rebuild_cache/fast
|
||||
|
||||
# Special rule for the target list_install_components
|
||||
list_install_components:
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Available install components are: \"Unspecified\""
|
||||
.PHONY : list_install_components
|
||||
|
||||
# Special rule for the target list_install_components
|
||||
list_install_components/fast: list_install_components
|
||||
.PHONY : list_install_components/fast
|
||||
|
||||
# Special rule for the target install
|
||||
install: preinstall
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..."
|
||||
/usr/bin/cmake -P cmake_install.cmake
|
||||
.PHONY : install
|
||||
|
||||
# Special rule for the target install
|
||||
install/fast: preinstall/fast
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..."
|
||||
/usr/bin/cmake -P cmake_install.cmake
|
||||
.PHONY : install/fast
|
||||
|
||||
# Special rule for the target install/local
|
||||
install/local: preinstall
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..."
|
||||
/usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
|
||||
.PHONY : install/local
|
||||
|
||||
# Special rule for the target install/local
|
||||
install/local/fast: preinstall/fast
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..."
|
||||
/usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
|
||||
.PHONY : install/local/fast
|
||||
|
||||
# Special rule for the target install/strip
|
||||
install/strip: preinstall
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..."
|
||||
/usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
|
||||
.PHONY : install/strip
|
||||
|
||||
# Special rule for the target install/strip
|
||||
install/strip/fast: preinstall/fast
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..."
|
||||
/usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
|
||||
.PHONY : install/strip/fast
|
||||
|
||||
# The main all target
|
||||
all: cmake_check_build_system
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(CMAKE_COMMAND) -E cmake_progress_start /home/ken/Projects/Tactility/build-tests/CMakeFiles /home/ken/Projects/Tactility/build-tests/Libraries/FreeRTOS-Kernel//CMakeFiles/progress.marks
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 Libraries/FreeRTOS-Kernel/all
|
||||
$(CMAKE_COMMAND) -E cmake_progress_start /home/ken/Projects/Tactility/build-tests/CMakeFiles 0
|
||||
.PHONY : all
|
||||
|
||||
# The main clean target
|
||||
clean:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 Libraries/FreeRTOS-Kernel/clean
|
||||
.PHONY : clean
|
||||
|
||||
# The main clean target
|
||||
clean/fast: clean
|
||||
.PHONY : clean/fast
|
||||
|
||||
# Prepare targets for installation.
|
||||
preinstall: all
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 Libraries/FreeRTOS-Kernel/preinstall
|
||||
.PHONY : preinstall
|
||||
|
||||
# Prepare targets for installation.
|
||||
preinstall/fast:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 Libraries/FreeRTOS-Kernel/preinstall
|
||||
.PHONY : preinstall/fast
|
||||
|
||||
# clear depends
|
||||
depend:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
|
||||
.PHONY : depend
|
||||
|
||||
# Convenience name for target.
|
||||
Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/rule:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/rule
|
||||
.PHONY : Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/rule
|
||||
|
||||
# Convenience name for target.
|
||||
freertos_kernel: Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/rule
|
||||
.PHONY : freertos_kernel
|
||||
|
||||
# fast build rule for target.
|
||||
freertos_kernel/fast:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/build.make Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/build
|
||||
.PHONY : freertos_kernel/fast
|
||||
|
||||
croutine.o: croutine.c.o
|
||||
.PHONY : croutine.o
|
||||
|
||||
# target to build an object file
|
||||
croutine.c.o:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/build.make Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/croutine.c.o
|
||||
.PHONY : croutine.c.o
|
||||
|
||||
croutine.i: croutine.c.i
|
||||
.PHONY : croutine.i
|
||||
|
||||
# target to preprocess a source file
|
||||
croutine.c.i:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/build.make Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/croutine.c.i
|
||||
.PHONY : croutine.c.i
|
||||
|
||||
croutine.s: croutine.c.s
|
||||
.PHONY : croutine.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
croutine.c.s:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/build.make Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/croutine.c.s
|
||||
.PHONY : croutine.c.s
|
||||
|
||||
event_groups.o: event_groups.c.o
|
||||
.PHONY : event_groups.o
|
||||
|
||||
# target to build an object file
|
||||
event_groups.c.o:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/build.make Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/event_groups.c.o
|
||||
.PHONY : event_groups.c.o
|
||||
|
||||
event_groups.i: event_groups.c.i
|
||||
.PHONY : event_groups.i
|
||||
|
||||
# target to preprocess a source file
|
||||
event_groups.c.i:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/build.make Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/event_groups.c.i
|
||||
.PHONY : event_groups.c.i
|
||||
|
||||
event_groups.s: event_groups.c.s
|
||||
.PHONY : event_groups.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
event_groups.c.s:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/build.make Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/event_groups.c.s
|
||||
.PHONY : event_groups.c.s
|
||||
|
||||
list.o: list.c.o
|
||||
.PHONY : list.o
|
||||
|
||||
# target to build an object file
|
||||
list.c.o:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/build.make Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/list.c.o
|
||||
.PHONY : list.c.o
|
||||
|
||||
list.i: list.c.i
|
||||
.PHONY : list.i
|
||||
|
||||
# target to preprocess a source file
|
||||
list.c.i:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/build.make Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/list.c.i
|
||||
.PHONY : list.c.i
|
||||
|
||||
list.s: list.c.s
|
||||
.PHONY : list.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
list.c.s:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/build.make Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/list.c.s
|
||||
.PHONY : list.c.s
|
||||
|
||||
portable/MemMang/heap_4.o: portable/MemMang/heap_4.c.o
|
||||
.PHONY : portable/MemMang/heap_4.o
|
||||
|
||||
# target to build an object file
|
||||
portable/MemMang/heap_4.c.o:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/build.make Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/portable/MemMang/heap_4.c.o
|
||||
.PHONY : portable/MemMang/heap_4.c.o
|
||||
|
||||
portable/MemMang/heap_4.i: portable/MemMang/heap_4.c.i
|
||||
.PHONY : portable/MemMang/heap_4.i
|
||||
|
||||
# target to preprocess a source file
|
||||
portable/MemMang/heap_4.c.i:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/build.make Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/portable/MemMang/heap_4.c.i
|
||||
.PHONY : portable/MemMang/heap_4.c.i
|
||||
|
||||
portable/MemMang/heap_4.s: portable/MemMang/heap_4.c.s
|
||||
.PHONY : portable/MemMang/heap_4.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
portable/MemMang/heap_4.c.s:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/build.make Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/portable/MemMang/heap_4.c.s
|
||||
.PHONY : portable/MemMang/heap_4.c.s
|
||||
|
||||
queue.o: queue.c.o
|
||||
.PHONY : queue.o
|
||||
|
||||
# target to build an object file
|
||||
queue.c.o:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/build.make Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/queue.c.o
|
||||
.PHONY : queue.c.o
|
||||
|
||||
queue.i: queue.c.i
|
||||
.PHONY : queue.i
|
||||
|
||||
# target to preprocess a source file
|
||||
queue.c.i:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/build.make Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/queue.c.i
|
||||
.PHONY : queue.c.i
|
||||
|
||||
queue.s: queue.c.s
|
||||
.PHONY : queue.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
queue.c.s:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/build.make Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/queue.c.s
|
||||
.PHONY : queue.c.s
|
||||
|
||||
stream_buffer.o: stream_buffer.c.o
|
||||
.PHONY : stream_buffer.o
|
||||
|
||||
# target to build an object file
|
||||
stream_buffer.c.o:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/build.make Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/stream_buffer.c.o
|
||||
.PHONY : stream_buffer.c.o
|
||||
|
||||
stream_buffer.i: stream_buffer.c.i
|
||||
.PHONY : stream_buffer.i
|
||||
|
||||
# target to preprocess a source file
|
||||
stream_buffer.c.i:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/build.make Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/stream_buffer.c.i
|
||||
.PHONY : stream_buffer.c.i
|
||||
|
||||
stream_buffer.s: stream_buffer.c.s
|
||||
.PHONY : stream_buffer.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
stream_buffer.c.s:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/build.make Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/stream_buffer.c.s
|
||||
.PHONY : stream_buffer.c.s
|
||||
|
||||
tasks.o: tasks.c.o
|
||||
.PHONY : tasks.o
|
||||
|
||||
# target to build an object file
|
||||
tasks.c.o:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/build.make Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/tasks.c.o
|
||||
.PHONY : tasks.c.o
|
||||
|
||||
tasks.i: tasks.c.i
|
||||
.PHONY : tasks.i
|
||||
|
||||
# target to preprocess a source file
|
||||
tasks.c.i:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/build.make Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/tasks.c.i
|
||||
.PHONY : tasks.c.i
|
||||
|
||||
tasks.s: tasks.c.s
|
||||
.PHONY : tasks.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
tasks.c.s:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/build.make Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/tasks.c.s
|
||||
.PHONY : tasks.c.s
|
||||
|
||||
timers.o: timers.c.o
|
||||
.PHONY : timers.o
|
||||
|
||||
# target to build an object file
|
||||
timers.c.o:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/build.make Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/timers.c.o
|
||||
.PHONY : timers.c.o
|
||||
|
||||
timers.i: timers.c.i
|
||||
.PHONY : timers.i
|
||||
|
||||
# target to preprocess a source file
|
||||
timers.c.i:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/build.make Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/timers.c.i
|
||||
.PHONY : timers.c.i
|
||||
|
||||
timers.s: timers.c.s
|
||||
.PHONY : timers.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
timers.c.s:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/build.make Libraries/FreeRTOS-Kernel/CMakeFiles/freertos_kernel.dir/timers.c.s
|
||||
.PHONY : timers.c.s
|
||||
|
||||
# Help Target
|
||||
help:
|
||||
@echo "The following are some of the valid targets for this Makefile:"
|
||||
@echo "... all (the default if no target is provided)"
|
||||
@echo "... clean"
|
||||
@echo "... depend"
|
||||
@echo "... edit_cache"
|
||||
@echo "... install"
|
||||
@echo "... install/local"
|
||||
@echo "... install/strip"
|
||||
@echo "... list_install_components"
|
||||
@echo "... rebuild_cache"
|
||||
@echo "... freertos_kernel"
|
||||
@echo "... croutine.o"
|
||||
@echo "... croutine.i"
|
||||
@echo "... croutine.s"
|
||||
@echo "... event_groups.o"
|
||||
@echo "... event_groups.i"
|
||||
@echo "... event_groups.s"
|
||||
@echo "... list.o"
|
||||
@echo "... list.i"
|
||||
@echo "... list.s"
|
||||
@echo "... portable/MemMang/heap_4.o"
|
||||
@echo "... portable/MemMang/heap_4.i"
|
||||
@echo "... portable/MemMang/heap_4.s"
|
||||
@echo "... queue.o"
|
||||
@echo "... queue.i"
|
||||
@echo "... queue.s"
|
||||
@echo "... stream_buffer.o"
|
||||
@echo "... stream_buffer.i"
|
||||
@echo "... stream_buffer.s"
|
||||
@echo "... tasks.o"
|
||||
@echo "... tasks.i"
|
||||
@echo "... tasks.s"
|
||||
@echo "... timers.o"
|
||||
@echo "... timers.i"
|
||||
@echo "... timers.s"
|
||||
.PHONY : help
|
||||
|
||||
|
||||
|
||||
#=============================================================================
|
||||
# Special targets to cleanup operation of make.
|
||||
|
||||
# Special rule to run CMake to check the build system integrity.
|
||||
# No rule that depends on this can have commands that come from listfiles
|
||||
# because they might be regenerated.
|
||||
cmake_check_build_system:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
|
||||
.PHONY : cmake_check_build_system
|
||||
|
||||
55
build-tests/Libraries/FreeRTOS-Kernel/cmake_install.cmake
Normal file
55
build-tests/Libraries/FreeRTOS-Kernel/cmake_install.cmake
Normal file
@ -0,0 +1,55 @@
|
||||
# Install script for directory: /home/ken/Projects/Tactility/Libraries/FreeRTOS-Kernel
|
||||
|
||||
# Set the install prefix
|
||||
if(NOT DEFINED CMAKE_INSTALL_PREFIX)
|
||||
set(CMAKE_INSTALL_PREFIX "/usr/local")
|
||||
endif()
|
||||
string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
|
||||
|
||||
# Set the install configuration name.
|
||||
if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
|
||||
if(BUILD_TYPE)
|
||||
string(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
|
||||
CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
|
||||
else()
|
||||
set(CMAKE_INSTALL_CONFIG_NAME "")
|
||||
endif()
|
||||
message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
|
||||
endif()
|
||||
|
||||
# Set the component getting installed.
|
||||
if(NOT CMAKE_INSTALL_COMPONENT)
|
||||
if(COMPONENT)
|
||||
message(STATUS "Install component: \"${COMPONENT}\"")
|
||||
set(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
|
||||
else()
|
||||
set(CMAKE_INSTALL_COMPONENT)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Install shared libraries without execute permission?
|
||||
if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
|
||||
set(CMAKE_INSTALL_SO_NO_EXE "0")
|
||||
endif()
|
||||
|
||||
# Is this installation the result of a crosscompile?
|
||||
if(NOT DEFINED CMAKE_CROSSCOMPILING)
|
||||
set(CMAKE_CROSSCOMPILING "FALSE")
|
||||
endif()
|
||||
|
||||
# Set path to fallback-tool for dependency-resolution.
|
||||
if(NOT DEFINED CMAKE_OBJDUMP)
|
||||
set(CMAKE_OBJDUMP "/usr/bin/objdump")
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_INSTALL_LOCAL_ONLY)
|
||||
# Include the install script for the subdirectory.
|
||||
include("/home/ken/Projects/Tactility/build-tests/Libraries/FreeRTOS-Kernel/portable/cmake_install.cmake")
|
||||
endif()
|
||||
|
||||
string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT
|
||||
"${CMAKE_INSTALL_MANIFEST_FILES}")
|
||||
if(CMAKE_INSTALL_LOCAL_ONLY)
|
||||
file(WRITE "/home/ken/Projects/Tactility/build-tests/Libraries/FreeRTOS-Kernel/install_local_manifest.txt"
|
||||
"${CMAKE_INSTALL_MANIFEST_CONTENT}")
|
||||
endif()
|
||||
BIN
build-tests/Libraries/FreeRTOS-Kernel/libfreertos_kernel.a
Normal file
BIN
build-tests/Libraries/FreeRTOS-Kernel/libfreertos_kernel.a
Normal file
Binary file not shown.
258
build-tests/Libraries/FreeRTOS-Kernel/portable/Makefile
Normal file
258
build-tests/Libraries/FreeRTOS-Kernel/portable/Makefile
Normal file
@ -0,0 +1,258 @@
|
||||
# CMAKE generated file: DO NOT EDIT!
|
||||
# Generated by "Unix Makefiles" Generator, CMake Version 4.3
|
||||
|
||||
# Default target executed when no arguments are given to make.
|
||||
default_target: all
|
||||
.PHONY : default_target
|
||||
|
||||
# Allow only one "make -f Makefile2" at a time, but pass parallelism.
|
||||
.NOTPARALLEL:
|
||||
|
||||
#=============================================================================
|
||||
# Special targets provided by cmake.
|
||||
|
||||
# Disable implicit rules so canonical targets will work.
|
||||
.SUFFIXES:
|
||||
|
||||
# Disable VCS-based implicit rules.
|
||||
% : %,v
|
||||
|
||||
# Disable VCS-based implicit rules.
|
||||
% : RCS/%
|
||||
|
||||
# Disable VCS-based implicit rules.
|
||||
% : RCS/%,v
|
||||
|
||||
# Disable VCS-based implicit rules.
|
||||
% : SCCS/s.%
|
||||
|
||||
# Disable VCS-based implicit rules.
|
||||
% : s.%
|
||||
|
||||
.SUFFIXES: .hpux_make_needs_suffix_list
|
||||
|
||||
# Command-line flag to silence nested $(MAKE).
|
||||
$(VERBOSE)MAKESILENT = -s
|
||||
|
||||
#Suppress display of executed commands.
|
||||
$(VERBOSE).SILENT:
|
||||
|
||||
# A target that is always out of date.
|
||||
cmake_force:
|
||||
.PHONY : cmake_force
|
||||
|
||||
#=============================================================================
|
||||
# Set environment variables for the build.
|
||||
|
||||
# The shell in which to execute make rules.
|
||||
SHELL = /bin/sh
|
||||
|
||||
# The CMake executable.
|
||||
CMAKE_COMMAND = /usr/bin/cmake
|
||||
|
||||
# The command to remove a file.
|
||||
RM = /usr/bin/cmake -E rm -f
|
||||
|
||||
# Escaping for special characters.
|
||||
EQUALS = =
|
||||
|
||||
# The top-level source directory on which CMake was run.
|
||||
CMAKE_SOURCE_DIR = /home/ken/Projects/Tactility
|
||||
|
||||
# The top-level build directory on which CMake was run.
|
||||
CMAKE_BINARY_DIR = /home/ken/Projects/Tactility/build-tests
|
||||
|
||||
#=============================================================================
|
||||
# Targets provided globally by CMake.
|
||||
|
||||
# Special rule for the target edit_cache
|
||||
edit_cache:
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake cache editor..."
|
||||
/usr/bin/ccmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
|
||||
.PHONY : edit_cache
|
||||
|
||||
# Special rule for the target edit_cache
|
||||
edit_cache/fast: edit_cache
|
||||
.PHONY : edit_cache/fast
|
||||
|
||||
# Special rule for the target rebuild_cache
|
||||
rebuild_cache:
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake to regenerate build system..."
|
||||
/usr/bin/cmake --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
|
||||
.PHONY : rebuild_cache
|
||||
|
||||
# Special rule for the target rebuild_cache
|
||||
rebuild_cache/fast: rebuild_cache
|
||||
.PHONY : rebuild_cache/fast
|
||||
|
||||
# Special rule for the target list_install_components
|
||||
list_install_components:
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Available install components are: \"Unspecified\""
|
||||
.PHONY : list_install_components
|
||||
|
||||
# Special rule for the target list_install_components
|
||||
list_install_components/fast: list_install_components
|
||||
.PHONY : list_install_components/fast
|
||||
|
||||
# Special rule for the target install
|
||||
install: preinstall
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..."
|
||||
/usr/bin/cmake -P cmake_install.cmake
|
||||
.PHONY : install
|
||||
|
||||
# Special rule for the target install
|
||||
install/fast: preinstall/fast
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..."
|
||||
/usr/bin/cmake -P cmake_install.cmake
|
||||
.PHONY : install/fast
|
||||
|
||||
# Special rule for the target install/local
|
||||
install/local: preinstall
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..."
|
||||
/usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
|
||||
.PHONY : install/local
|
||||
|
||||
# Special rule for the target install/local
|
||||
install/local/fast: preinstall/fast
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..."
|
||||
/usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
|
||||
.PHONY : install/local/fast
|
||||
|
||||
# Special rule for the target install/strip
|
||||
install/strip: preinstall
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..."
|
||||
/usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
|
||||
.PHONY : install/strip
|
||||
|
||||
# Special rule for the target install/strip
|
||||
install/strip/fast: preinstall/fast
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..."
|
||||
/usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
|
||||
.PHONY : install/strip/fast
|
||||
|
||||
# The main all target
|
||||
all: cmake_check_build_system
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(CMAKE_COMMAND) -E cmake_progress_start /home/ken/Projects/Tactility/build-tests/CMakeFiles /home/ken/Projects/Tactility/build-tests/Libraries/FreeRTOS-Kernel/portable//CMakeFiles/progress.marks
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 Libraries/FreeRTOS-Kernel/portable/all
|
||||
$(CMAKE_COMMAND) -E cmake_progress_start /home/ken/Projects/Tactility/build-tests/CMakeFiles 0
|
||||
.PHONY : all
|
||||
|
||||
# The main clean target
|
||||
clean:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 Libraries/FreeRTOS-Kernel/portable/clean
|
||||
.PHONY : clean
|
||||
|
||||
# The main clean target
|
||||
clean/fast: clean
|
||||
.PHONY : clean/fast
|
||||
|
||||
# Prepare targets for installation.
|
||||
preinstall: all
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 Libraries/FreeRTOS-Kernel/portable/preinstall
|
||||
.PHONY : preinstall
|
||||
|
||||
# Prepare targets for installation.
|
||||
preinstall/fast:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 Libraries/FreeRTOS-Kernel/portable/preinstall
|
||||
.PHONY : preinstall/fast
|
||||
|
||||
# clear depends
|
||||
depend:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
|
||||
.PHONY : depend
|
||||
|
||||
# Convenience name for target.
|
||||
Libraries/FreeRTOS-Kernel/portable/CMakeFiles/freertos_kernel_port.dir/rule:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 Libraries/FreeRTOS-Kernel/portable/CMakeFiles/freertos_kernel_port.dir/rule
|
||||
.PHONY : Libraries/FreeRTOS-Kernel/portable/CMakeFiles/freertos_kernel_port.dir/rule
|
||||
|
||||
# Convenience name for target.
|
||||
freertos_kernel_port: Libraries/FreeRTOS-Kernel/portable/CMakeFiles/freertos_kernel_port.dir/rule
|
||||
.PHONY : freertos_kernel_port
|
||||
|
||||
# fast build rule for target.
|
||||
freertos_kernel_port/fast:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Libraries/FreeRTOS-Kernel/portable/CMakeFiles/freertos_kernel_port.dir/build.make Libraries/FreeRTOS-Kernel/portable/CMakeFiles/freertos_kernel_port.dir/build
|
||||
.PHONY : freertos_kernel_port/fast
|
||||
|
||||
ThirdParty/GCC/Posix/port.o: ThirdParty/GCC/Posix/port.c.o
|
||||
.PHONY : ThirdParty/GCC/Posix/port.o
|
||||
|
||||
# target to build an object file
|
||||
ThirdParty/GCC/Posix/port.c.o:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Libraries/FreeRTOS-Kernel/portable/CMakeFiles/freertos_kernel_port.dir/build.make Libraries/FreeRTOS-Kernel/portable/CMakeFiles/freertos_kernel_port.dir/ThirdParty/GCC/Posix/port.c.o
|
||||
.PHONY : ThirdParty/GCC/Posix/port.c.o
|
||||
|
||||
ThirdParty/GCC/Posix/port.i: ThirdParty/GCC/Posix/port.c.i
|
||||
.PHONY : ThirdParty/GCC/Posix/port.i
|
||||
|
||||
# target to preprocess a source file
|
||||
ThirdParty/GCC/Posix/port.c.i:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Libraries/FreeRTOS-Kernel/portable/CMakeFiles/freertos_kernel_port.dir/build.make Libraries/FreeRTOS-Kernel/portable/CMakeFiles/freertos_kernel_port.dir/ThirdParty/GCC/Posix/port.c.i
|
||||
.PHONY : ThirdParty/GCC/Posix/port.c.i
|
||||
|
||||
ThirdParty/GCC/Posix/port.s: ThirdParty/GCC/Posix/port.c.s
|
||||
.PHONY : ThirdParty/GCC/Posix/port.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
ThirdParty/GCC/Posix/port.c.s:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Libraries/FreeRTOS-Kernel/portable/CMakeFiles/freertos_kernel_port.dir/build.make Libraries/FreeRTOS-Kernel/portable/CMakeFiles/freertos_kernel_port.dir/ThirdParty/GCC/Posix/port.c.s
|
||||
.PHONY : ThirdParty/GCC/Posix/port.c.s
|
||||
|
||||
ThirdParty/GCC/Posix/utils/wait_for_event.o: ThirdParty/GCC/Posix/utils/wait_for_event.c.o
|
||||
.PHONY : ThirdParty/GCC/Posix/utils/wait_for_event.o
|
||||
|
||||
# target to build an object file
|
||||
ThirdParty/GCC/Posix/utils/wait_for_event.c.o:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Libraries/FreeRTOS-Kernel/portable/CMakeFiles/freertos_kernel_port.dir/build.make Libraries/FreeRTOS-Kernel/portable/CMakeFiles/freertos_kernel_port.dir/ThirdParty/GCC/Posix/utils/wait_for_event.c.o
|
||||
.PHONY : ThirdParty/GCC/Posix/utils/wait_for_event.c.o
|
||||
|
||||
ThirdParty/GCC/Posix/utils/wait_for_event.i: ThirdParty/GCC/Posix/utils/wait_for_event.c.i
|
||||
.PHONY : ThirdParty/GCC/Posix/utils/wait_for_event.i
|
||||
|
||||
# target to preprocess a source file
|
||||
ThirdParty/GCC/Posix/utils/wait_for_event.c.i:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Libraries/FreeRTOS-Kernel/portable/CMakeFiles/freertos_kernel_port.dir/build.make Libraries/FreeRTOS-Kernel/portable/CMakeFiles/freertos_kernel_port.dir/ThirdParty/GCC/Posix/utils/wait_for_event.c.i
|
||||
.PHONY : ThirdParty/GCC/Posix/utils/wait_for_event.c.i
|
||||
|
||||
ThirdParty/GCC/Posix/utils/wait_for_event.s: ThirdParty/GCC/Posix/utils/wait_for_event.c.s
|
||||
.PHONY : ThirdParty/GCC/Posix/utils/wait_for_event.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
ThirdParty/GCC/Posix/utils/wait_for_event.c.s:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Libraries/FreeRTOS-Kernel/portable/CMakeFiles/freertos_kernel_port.dir/build.make Libraries/FreeRTOS-Kernel/portable/CMakeFiles/freertos_kernel_port.dir/ThirdParty/GCC/Posix/utils/wait_for_event.c.s
|
||||
.PHONY : ThirdParty/GCC/Posix/utils/wait_for_event.c.s
|
||||
|
||||
# Help Target
|
||||
help:
|
||||
@echo "The following are some of the valid targets for this Makefile:"
|
||||
@echo "... all (the default if no target is provided)"
|
||||
@echo "... clean"
|
||||
@echo "... depend"
|
||||
@echo "... edit_cache"
|
||||
@echo "... install"
|
||||
@echo "... install/local"
|
||||
@echo "... install/strip"
|
||||
@echo "... list_install_components"
|
||||
@echo "... rebuild_cache"
|
||||
@echo "... freertos_kernel_port"
|
||||
@echo "... ThirdParty/GCC/Posix/port.o"
|
||||
@echo "... ThirdParty/GCC/Posix/port.i"
|
||||
@echo "... ThirdParty/GCC/Posix/port.s"
|
||||
@echo "... ThirdParty/GCC/Posix/utils/wait_for_event.o"
|
||||
@echo "... ThirdParty/GCC/Posix/utils/wait_for_event.i"
|
||||
@echo "... ThirdParty/GCC/Posix/utils/wait_for_event.s"
|
||||
.PHONY : help
|
||||
|
||||
|
||||
|
||||
#=============================================================================
|
||||
# Special targets to cleanup operation of make.
|
||||
|
||||
# Special rule to run CMake to check the build system integrity.
|
||||
# No rule that depends on this can have commands that come from listfiles
|
||||
# because they might be regenerated.
|
||||
cmake_check_build_system:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
|
||||
.PHONY : cmake_check_build_system
|
||||
|
||||
@ -0,0 +1,50 @@
|
||||
# Install script for directory: /home/ken/Projects/Tactility/Libraries/FreeRTOS-Kernel/portable
|
||||
|
||||
# Set the install prefix
|
||||
if(NOT DEFINED CMAKE_INSTALL_PREFIX)
|
||||
set(CMAKE_INSTALL_PREFIX "/usr/local")
|
||||
endif()
|
||||
string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
|
||||
|
||||
# Set the install configuration name.
|
||||
if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
|
||||
if(BUILD_TYPE)
|
||||
string(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
|
||||
CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
|
||||
else()
|
||||
set(CMAKE_INSTALL_CONFIG_NAME "")
|
||||
endif()
|
||||
message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
|
||||
endif()
|
||||
|
||||
# Set the component getting installed.
|
||||
if(NOT CMAKE_INSTALL_COMPONENT)
|
||||
if(COMPONENT)
|
||||
message(STATUS "Install component: \"${COMPONENT}\"")
|
||||
set(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
|
||||
else()
|
||||
set(CMAKE_INSTALL_COMPONENT)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Install shared libraries without execute permission?
|
||||
if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
|
||||
set(CMAKE_INSTALL_SO_NO_EXE "0")
|
||||
endif()
|
||||
|
||||
# Is this installation the result of a crosscompile?
|
||||
if(NOT DEFINED CMAKE_CROSSCOMPILING)
|
||||
set(CMAKE_CROSSCOMPILING "FALSE")
|
||||
endif()
|
||||
|
||||
# Set path to fallback-tool for dependency-resolution.
|
||||
if(NOT DEFINED CMAKE_OBJDUMP)
|
||||
set(CMAKE_OBJDUMP "/usr/bin/objdump")
|
||||
endif()
|
||||
|
||||
string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT
|
||||
"${CMAKE_INSTALL_MANIFEST_FILES}")
|
||||
if(CMAKE_INSTALL_LOCAL_ONLY)
|
||||
file(WRITE "/home/ken/Projects/Tactility/build-tests/Libraries/FreeRTOS-Kernel/portable/install_local_manifest.txt"
|
||||
"${CMAKE_INSTALL_MANIFEST_CONTENT}")
|
||||
endif()
|
||||
Binary file not shown.
231
build-tests/Libraries/QRCode/Makefile
Normal file
231
build-tests/Libraries/QRCode/Makefile
Normal file
@ -0,0 +1,231 @@
|
||||
# CMAKE generated file: DO NOT EDIT!
|
||||
# Generated by "Unix Makefiles" Generator, CMake Version 4.3
|
||||
|
||||
# Default target executed when no arguments are given to make.
|
||||
default_target: all
|
||||
.PHONY : default_target
|
||||
|
||||
# Allow only one "make -f Makefile2" at a time, but pass parallelism.
|
||||
.NOTPARALLEL:
|
||||
|
||||
#=============================================================================
|
||||
# Special targets provided by cmake.
|
||||
|
||||
# Disable implicit rules so canonical targets will work.
|
||||
.SUFFIXES:
|
||||
|
||||
# Disable VCS-based implicit rules.
|
||||
% : %,v
|
||||
|
||||
# Disable VCS-based implicit rules.
|
||||
% : RCS/%
|
||||
|
||||
# Disable VCS-based implicit rules.
|
||||
% : RCS/%,v
|
||||
|
||||
# Disable VCS-based implicit rules.
|
||||
% : SCCS/s.%
|
||||
|
||||
# Disable VCS-based implicit rules.
|
||||
% : s.%
|
||||
|
||||
.SUFFIXES: .hpux_make_needs_suffix_list
|
||||
|
||||
# Command-line flag to silence nested $(MAKE).
|
||||
$(VERBOSE)MAKESILENT = -s
|
||||
|
||||
#Suppress display of executed commands.
|
||||
$(VERBOSE).SILENT:
|
||||
|
||||
# A target that is always out of date.
|
||||
cmake_force:
|
||||
.PHONY : cmake_force
|
||||
|
||||
#=============================================================================
|
||||
# Set environment variables for the build.
|
||||
|
||||
# The shell in which to execute make rules.
|
||||
SHELL = /bin/sh
|
||||
|
||||
# The CMake executable.
|
||||
CMAKE_COMMAND = /usr/bin/cmake
|
||||
|
||||
# The command to remove a file.
|
||||
RM = /usr/bin/cmake -E rm -f
|
||||
|
||||
# Escaping for special characters.
|
||||
EQUALS = =
|
||||
|
||||
# The top-level source directory on which CMake was run.
|
||||
CMAKE_SOURCE_DIR = /home/ken/Projects/Tactility
|
||||
|
||||
# The top-level build directory on which CMake was run.
|
||||
CMAKE_BINARY_DIR = /home/ken/Projects/Tactility/build-tests
|
||||
|
||||
#=============================================================================
|
||||
# Targets provided globally by CMake.
|
||||
|
||||
# Special rule for the target edit_cache
|
||||
edit_cache:
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake cache editor..."
|
||||
/usr/bin/ccmake -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
|
||||
.PHONY : edit_cache
|
||||
|
||||
# Special rule for the target edit_cache
|
||||
edit_cache/fast: edit_cache
|
||||
.PHONY : edit_cache/fast
|
||||
|
||||
# Special rule for the target rebuild_cache
|
||||
rebuild_cache:
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Running CMake to regenerate build system..."
|
||||
/usr/bin/cmake --regenerate-during-build -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
|
||||
.PHONY : rebuild_cache
|
||||
|
||||
# Special rule for the target rebuild_cache
|
||||
rebuild_cache/fast: rebuild_cache
|
||||
.PHONY : rebuild_cache/fast
|
||||
|
||||
# Special rule for the target list_install_components
|
||||
list_install_components:
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Available install components are: \"Unspecified\""
|
||||
.PHONY : list_install_components
|
||||
|
||||
# Special rule for the target list_install_components
|
||||
list_install_components/fast: list_install_components
|
||||
.PHONY : list_install_components/fast
|
||||
|
||||
# Special rule for the target install
|
||||
install: preinstall
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..."
|
||||
/usr/bin/cmake -P cmake_install.cmake
|
||||
.PHONY : install
|
||||
|
||||
# Special rule for the target install
|
||||
install/fast: preinstall/fast
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Install the project..."
|
||||
/usr/bin/cmake -P cmake_install.cmake
|
||||
.PHONY : install/fast
|
||||
|
||||
# Special rule for the target install/local
|
||||
install/local: preinstall
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..."
|
||||
/usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
|
||||
.PHONY : install/local
|
||||
|
||||
# Special rule for the target install/local
|
||||
install/local/fast: preinstall/fast
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing only the local directory..."
|
||||
/usr/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
|
||||
.PHONY : install/local/fast
|
||||
|
||||
# Special rule for the target install/strip
|
||||
install/strip: preinstall
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..."
|
||||
/usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
|
||||
.PHONY : install/strip
|
||||
|
||||
# Special rule for the target install/strip
|
||||
install/strip/fast: preinstall/fast
|
||||
@$(CMAKE_COMMAND) -E cmake_echo_color "--switch=$(COLOR)" --cyan "Installing the project stripped..."
|
||||
/usr/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
|
||||
.PHONY : install/strip/fast
|
||||
|
||||
# The main all target
|
||||
all: cmake_check_build_system
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(CMAKE_COMMAND) -E cmake_progress_start /home/ken/Projects/Tactility/build-tests/CMakeFiles /home/ken/Projects/Tactility/build-tests/Libraries/QRCode//CMakeFiles/progress.marks
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 Libraries/QRCode/all
|
||||
$(CMAKE_COMMAND) -E cmake_progress_start /home/ken/Projects/Tactility/build-tests/CMakeFiles 0
|
||||
.PHONY : all
|
||||
|
||||
# The main clean target
|
||||
clean:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 Libraries/QRCode/clean
|
||||
.PHONY : clean
|
||||
|
||||
# The main clean target
|
||||
clean/fast: clean
|
||||
.PHONY : clean/fast
|
||||
|
||||
# Prepare targets for installation.
|
||||
preinstall: all
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 Libraries/QRCode/preinstall
|
||||
.PHONY : preinstall
|
||||
|
||||
# Prepare targets for installation.
|
||||
preinstall/fast:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 Libraries/QRCode/preinstall
|
||||
.PHONY : preinstall/fast
|
||||
|
||||
# clear depends
|
||||
depend:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
|
||||
.PHONY : depend
|
||||
|
||||
# Convenience name for target.
|
||||
Libraries/QRCode/CMakeFiles/QRCode.dir/rule:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f CMakeFiles/Makefile2 Libraries/QRCode/CMakeFiles/QRCode.dir/rule
|
||||
.PHONY : Libraries/QRCode/CMakeFiles/QRCode.dir/rule
|
||||
|
||||
# Convenience name for target.
|
||||
QRCode: Libraries/QRCode/CMakeFiles/QRCode.dir/rule
|
||||
.PHONY : QRCode
|
||||
|
||||
# fast build rule for target.
|
||||
QRCode/fast:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Libraries/QRCode/CMakeFiles/QRCode.dir/build.make Libraries/QRCode/CMakeFiles/QRCode.dir/build
|
||||
.PHONY : QRCode/fast
|
||||
|
||||
src/qrcode.o: src/qrcode.c.o
|
||||
.PHONY : src/qrcode.o
|
||||
|
||||
# target to build an object file
|
||||
src/qrcode.c.o:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Libraries/QRCode/CMakeFiles/QRCode.dir/build.make Libraries/QRCode/CMakeFiles/QRCode.dir/src/qrcode.c.o
|
||||
.PHONY : src/qrcode.c.o
|
||||
|
||||
src/qrcode.i: src/qrcode.c.i
|
||||
.PHONY : src/qrcode.i
|
||||
|
||||
# target to preprocess a source file
|
||||
src/qrcode.c.i:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Libraries/QRCode/CMakeFiles/QRCode.dir/build.make Libraries/QRCode/CMakeFiles/QRCode.dir/src/qrcode.c.i
|
||||
.PHONY : src/qrcode.c.i
|
||||
|
||||
src/qrcode.s: src/qrcode.c.s
|
||||
.PHONY : src/qrcode.s
|
||||
|
||||
# target to generate assembly for a file
|
||||
src/qrcode.c.s:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(MAKE) $(MAKESILENT) -f Libraries/QRCode/CMakeFiles/QRCode.dir/build.make Libraries/QRCode/CMakeFiles/QRCode.dir/src/qrcode.c.s
|
||||
.PHONY : src/qrcode.c.s
|
||||
|
||||
# Help Target
|
||||
help:
|
||||
@echo "The following are some of the valid targets for this Makefile:"
|
||||
@echo "... all (the default if no target is provided)"
|
||||
@echo "... clean"
|
||||
@echo "... depend"
|
||||
@echo "... edit_cache"
|
||||
@echo "... install"
|
||||
@echo "... install/local"
|
||||
@echo "... install/strip"
|
||||
@echo "... list_install_components"
|
||||
@echo "... rebuild_cache"
|
||||
@echo "... QRCode"
|
||||
@echo "... src/qrcode.o"
|
||||
@echo "... src/qrcode.i"
|
||||
@echo "... src/qrcode.s"
|
||||
.PHONY : help
|
||||
|
||||
|
||||
|
||||
#=============================================================================
|
||||
# Special targets to cleanup operation of make.
|
||||
|
||||
# Special rule to run CMake to check the build system integrity.
|
||||
# No rule that depends on this can have commands that come from listfiles
|
||||
# because they might be regenerated.
|
||||
cmake_check_build_system:
|
||||
cd /home/ken/Projects/Tactility/build-tests && $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
|
||||
.PHONY : cmake_check_build_system
|
||||
|
||||
50
build-tests/Libraries/QRCode/cmake_install.cmake
Normal file
50
build-tests/Libraries/QRCode/cmake_install.cmake
Normal file
@ -0,0 +1,50 @@
|
||||
# Install script for directory: /home/ken/Projects/Tactility/Libraries/QRCode
|
||||
|
||||
# Set the install prefix
|
||||
if(NOT DEFINED CMAKE_INSTALL_PREFIX)
|
||||
set(CMAKE_INSTALL_PREFIX "/usr/local")
|
||||
endif()
|
||||
string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
|
||||
|
||||
# Set the install configuration name.
|
||||
if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
|
||||
if(BUILD_TYPE)
|
||||
string(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
|
||||
CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
|
||||
else()
|
||||
set(CMAKE_INSTALL_CONFIG_NAME "")
|
||||
endif()
|
||||
message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
|
||||
endif()
|
||||
|
||||
# Set the component getting installed.
|
||||
if(NOT CMAKE_INSTALL_COMPONENT)
|
||||
if(COMPONENT)
|
||||
message(STATUS "Install component: \"${COMPONENT}\"")
|
||||
set(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
|
||||
else()
|
||||
set(CMAKE_INSTALL_COMPONENT)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Install shared libraries without execute permission?
|
||||
if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
|
||||
set(CMAKE_INSTALL_SO_NO_EXE "0")
|
||||
endif()
|
||||
|
||||
# Is this installation the result of a crosscompile?
|
||||
if(NOT DEFINED CMAKE_CROSSCOMPILING)
|
||||
set(CMAKE_CROSSCOMPILING "FALSE")
|
||||
endif()
|
||||
|
||||
# Set path to fallback-tool for dependency-resolution.
|
||||
if(NOT DEFINED CMAKE_OBJDUMP)
|
||||
set(CMAKE_OBJDUMP "/usr/bin/objdump")
|
||||
endif()
|
||||
|
||||
string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT
|
||||
"${CMAKE_INSTALL_MANIFEST_FILES}")
|
||||
if(CMAKE_INSTALL_LOCAL_ONLY)
|
||||
file(WRITE "/home/ken/Projects/Tactility/build-tests/Libraries/QRCode/install_local_manifest.txt"
|
||||
"${CMAKE_INSTALL_MANIFEST_CONTENT}")
|
||||
endif()
|
||||
6744
build-tests/Libraries/SDL/Makefile
Normal file
6744
build-tests/Libraries/SDL/Makefile
Normal file
File diff suppressed because it is too large
Load Diff
119
build-tests/Libraries/SDL/SDL2.spec
Normal file
119
build-tests/Libraries/SDL/SDL2.spec
Normal file
@ -0,0 +1,119 @@
|
||||
Summary: Simple DirectMedia Layer
|
||||
Name: SDL2
|
||||
Version: 2.33.0
|
||||
Release: 2
|
||||
Source: http://www.libsdl.org/release/%{name}-%{version}.tar.gz
|
||||
URL: http://www.libsdl.org/
|
||||
License: zlib
|
||||
Group: System Environment/Libraries
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
|
||||
Prefix: %{_prefix}
|
||||
%ifos linux
|
||||
Provides: libSDL2-2.0.so.0
|
||||
%endif
|
||||
|
||||
%define __defattr %defattr(-,root,root)
|
||||
%define __soext so
|
||||
|
||||
%description
|
||||
This is the Simple DirectMedia Layer, a generic API that provides low
|
||||
level access to audio, keyboard, mouse, and display framebuffer across
|
||||
multiple platforms.
|
||||
|
||||
%package devel
|
||||
Summary: Libraries, includes and more to develop SDL applications.
|
||||
Group: Development/Libraries
|
||||
Requires: %{name} = %{version}
|
||||
|
||||
%description devel
|
||||
This is the Simple DirectMedia Layer, a generic API that provides low
|
||||
level access to audio, keyboard, mouse, and display framebuffer across
|
||||
multiple platforms.
|
||||
|
||||
This is the libraries, include files and other resources you can use
|
||||
to develop SDL applications.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
%ifos linux
|
||||
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix} --disable-video-directfb
|
||||
%else
|
||||
%configure
|
||||
%endif
|
||||
make
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
%ifos linux
|
||||
make install prefix=$RPM_BUILD_ROOT%{prefix} \
|
||||
bindir=$RPM_BUILD_ROOT%{_bindir} \
|
||||
libdir=$RPM_BUILD_ROOT%{_libdir} \
|
||||
includedir=$RPM_BUILD_ROOT%{_includedir} \
|
||||
datadir=$RPM_BUILD_ROOT%{_datadir} \
|
||||
mandir=$RPM_BUILD_ROOT%{_mandir}
|
||||
%else
|
||||
%makeinstall
|
||||
%endif
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%files
|
||||
%{__defattr}
|
||||
%doc README*.txt LICENSE.txt CREDITS.txt BUGS.txt
|
||||
%{_libdir}/lib*.%{__soext}.*
|
||||
|
||||
%files devel
|
||||
%{__defattr}
|
||||
%doc docs/README*.md
|
||||
%{_bindir}/*-config
|
||||
%{_libdir}/lib*.a
|
||||
%{_libdir}/lib*.la
|
||||
%{_libdir}/lib*.%{__soext}
|
||||
%{_includedir}/*/*.h
|
||||
%{_libdir}/cmake/*
|
||||
%{_libdir}/pkgconfig/SDL2/*
|
||||
%{_datadir}/aclocal/*
|
||||
|
||||
%changelog
|
||||
* Thu Jun 04 2015 Ryan C. Gordon <icculus@icculus.org>
|
||||
- Fixed README paths.
|
||||
|
||||
* Sun Dec 07 2014 Simone Contini <s.contini@oltrelinux.com>
|
||||
- Fixed changelog date issue and docs filenames
|
||||
|
||||
* Sun Jan 22 2012 Sam Lantinga <slouken@libsdl.org>
|
||||
- Updated for SDL 2.0
|
||||
|
||||
* Tue May 16 2006 Sam Lantinga <slouken@libsdl.org>
|
||||
- Removed support for Darwin, due to build problems on ps2linux
|
||||
|
||||
* Sat Jan 03 2004 Anders Bjorklund <afb@algonet.se>
|
||||
- Added support for Darwin, updated spec file
|
||||
|
||||
* Wed Jan 19 2000 Sam Lantinga <slouken@libsdl.org>
|
||||
- Re-integrated spec file into SDL distribution
|
||||
- 'name' and 'version' come from configure
|
||||
- Some of the documentation is devel specific
|
||||
- Removed SMP support from %build - it doesn't work with libtool anyway
|
||||
|
||||
* Tue Jan 18 2000 Hakan Tandogan <hakan@iconsult.com>
|
||||
- Hacked Mandrake sdl spec to build 1.1
|
||||
|
||||
* Sun Dec 19 1999 John Buswell <johnb@mandrakesoft.com>
|
||||
- Build Release
|
||||
|
||||
* Sat Dec 18 1999 John Buswell <johnb@mandrakesoft.com>
|
||||
- Add symlink for libSDL-1.0.so.0 required by sdlbomber
|
||||
- Added docs
|
||||
|
||||
* Thu Dec 09 1999 Lenny Cartier <lenny@mandrakesoft.com>
|
||||
- v 1.0.0
|
||||
|
||||
* Mon Nov 1 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
|
||||
- First spec file for Mandrake distribution.
|
||||
|
||||
# end of file
|
||||
571
build-tests/Libraries/SDL/SDL_config.h.intermediate
Normal file
571
build-tests/Libraries/SDL/SDL_config.h.intermediate
Normal file
@ -0,0 +1,571 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef SDL_config_h_
|
||||
#define SDL_config_h_
|
||||
|
||||
/**
|
||||
* \file SDL_config.h.in
|
||||
*
|
||||
* This is a set of defines to configure the SDL features
|
||||
*/
|
||||
|
||||
/* General platform specific identifiers */
|
||||
#include "SDL_platform.h"
|
||||
|
||||
/* C language features */
|
||||
/* #undef const */
|
||||
/* #undef inline */
|
||||
/* #undef volatile */
|
||||
|
||||
/* C datatypes */
|
||||
/* Define SIZEOF_VOIDP for 64/32 architectures */
|
||||
#if defined(__LP64__) || defined(_LP64) || defined(_WIN64)
|
||||
#define SIZEOF_VOIDP 8
|
||||
#else
|
||||
#define SIZEOF_VOIDP 4
|
||||
#endif
|
||||
|
||||
#define HAVE_GCC_ATOMICS 1
|
||||
/* #undef HAVE_GCC_SYNC_LOCK_TEST_AND_SET */
|
||||
|
||||
/* Comment this if you want to build without any C library requirements */
|
||||
#define HAVE_LIBC 1
|
||||
#ifdef HAVE_LIBC
|
||||
|
||||
/* Useful headers */
|
||||
#define STDC_HEADERS 1
|
||||
#define HAVE_ALLOCA_H 1
|
||||
#define HAVE_CTYPE_H 1
|
||||
#define HAVE_FLOAT_H 1
|
||||
#define HAVE_ICONV_H 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_LIMITS_H 1
|
||||
#define HAVE_MALLOC_H 1
|
||||
#define HAVE_MATH_H 1
|
||||
#define HAVE_MEMORY_H 1
|
||||
#define HAVE_SIGNAL_H 1
|
||||
#define HAVE_STDARG_H 1
|
||||
#define HAVE_STDDEF_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_STDIO_H 1
|
||||
#define HAVE_STDLIB_H 1
|
||||
#define HAVE_STRINGS_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_WCHAR_H 1
|
||||
#define HAVE_LINUX_INPUT_H 1
|
||||
/* #undef HAVE_PTHREAD_NP_H */
|
||||
/* #undef HAVE_LIBUNWIND_H */
|
||||
|
||||
/* C library functions */
|
||||
#define HAVE_DLOPEN 1
|
||||
#define HAVE_MALLOC 1
|
||||
#define HAVE_CALLOC 1
|
||||
#define HAVE_REALLOC 1
|
||||
#define HAVE_FREE 1
|
||||
#define HAVE_ALLOCA 1
|
||||
#ifndef __WIN32__ /* Don't use C runtime versions of these on Windows */
|
||||
#define HAVE_GETENV 1
|
||||
#define HAVE_SETENV 1
|
||||
#define HAVE_PUTENV 1
|
||||
#define HAVE_UNSETENV 1
|
||||
#endif
|
||||
#define HAVE_QSORT 1
|
||||
#define HAVE_BSEARCH 1
|
||||
#define HAVE_ABS 1
|
||||
#define HAVE_BCOPY 1
|
||||
#define HAVE_MEMSET 1
|
||||
#define HAVE_MEMCPY 1
|
||||
#define HAVE_MEMMOVE 1
|
||||
#define HAVE_MEMCMP 1
|
||||
#define HAVE_WCSLEN 1
|
||||
#define HAVE_WCSLCPY 1
|
||||
#define HAVE_WCSLCAT 1
|
||||
/* #undef HAVE__WCSDUP */
|
||||
#define HAVE_WCSDUP 1
|
||||
#define HAVE_WCSSTR 1
|
||||
#define HAVE_WCSCMP 1
|
||||
#define HAVE_WCSNCMP 1
|
||||
#define HAVE_WCSCASECMP 1
|
||||
/* #undef HAVE__WCSICMP */
|
||||
#define HAVE_WCSNCASECMP 1
|
||||
/* #undef HAVE__WCSNICMP */
|
||||
#define HAVE_STRLEN 1
|
||||
#define HAVE_STRLCPY 1
|
||||
#define HAVE_STRLCAT 1
|
||||
/* #undef HAVE__STRREV */
|
||||
/* #undef HAVE__STRUPR */
|
||||
/* #undef HAVE__STRLWR */
|
||||
#define HAVE_INDEX 1
|
||||
#define HAVE_RINDEX 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
#define HAVE_STRTOK_R 1
|
||||
/* #undef HAVE_ITOA */
|
||||
/* #undef HAVE__LTOA */
|
||||
/* #undef HAVE__UITOA */
|
||||
/* #undef HAVE__ULTOA */
|
||||
#define HAVE_STRTOL 1
|
||||
#define HAVE_STRTOUL 1
|
||||
/* #undef HAVE__I64TOA */
|
||||
/* #undef HAVE__UI64TOA */
|
||||
#define HAVE_STRTOLL 1
|
||||
#define HAVE_STRTOULL 1
|
||||
#define HAVE_STRTOD 1
|
||||
#define HAVE_ATOI 1
|
||||
#define HAVE_ATOF 1
|
||||
#define HAVE_STRCMP 1
|
||||
#define HAVE_STRNCMP 1
|
||||
/* #undef HAVE__STRICMP */
|
||||
#define HAVE_STRCASECMP 1
|
||||
/* #undef HAVE__STRNICMP */
|
||||
#define HAVE_STRNCASECMP 1
|
||||
#define HAVE_STRCASESTR 1
|
||||
#define HAVE_SSCANF 1
|
||||
#define HAVE_VSSCANF 1
|
||||
#define HAVE_VSNPRINTF 1
|
||||
#define HAVE_M_PI 1
|
||||
#define HAVE_ACOS 1
|
||||
#define HAVE_ACOSF 1
|
||||
#define HAVE_ASIN 1
|
||||
#define HAVE_ASINF 1
|
||||
#define HAVE_ATAN 1
|
||||
#define HAVE_ATANF 1
|
||||
#define HAVE_ATAN2 1
|
||||
#define HAVE_ATAN2F 1
|
||||
#define HAVE_CEIL 1
|
||||
#define HAVE_CEILF 1
|
||||
#define HAVE_COPYSIGN 1
|
||||
#define HAVE_COPYSIGNF 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_EXP 1
|
||||
#define HAVE_EXPF 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FABSF 1
|
||||
#define HAVE_FLOOR 1
|
||||
#define HAVE_FLOORF 1
|
||||
#define HAVE_FMOD 1
|
||||
#define HAVE_FMODF 1
|
||||
#define HAVE_LOG 1
|
||||
#define HAVE_LOGF 1
|
||||
#define HAVE_LOG10 1
|
||||
#define HAVE_LOG10F 1
|
||||
#define HAVE_LROUND 1
|
||||
#define HAVE_LROUNDF 1
|
||||
#define HAVE_POW 1
|
||||
#define HAVE_POWF 1
|
||||
#define HAVE_ROUND 1
|
||||
#define HAVE_ROUNDF 1
|
||||
#define HAVE_SCALBN 1
|
||||
#define HAVE_SCALBNF 1
|
||||
#define HAVE_SIN 1
|
||||
#define HAVE_SINF 1
|
||||
#define HAVE_SQRT 1
|
||||
#define HAVE_SQRTF 1
|
||||
#define HAVE_TAN 1
|
||||
#define HAVE_TANF 1
|
||||
#define HAVE_TRUNC 1
|
||||
#define HAVE_TRUNCF 1
|
||||
#define HAVE_FOPEN64 1
|
||||
#define HAVE_FSEEKO 1
|
||||
#define HAVE_FSEEKO64 1
|
||||
#define HAVE_MEMFD_CREATE 1
|
||||
#define HAVE_POSIX_FALLOCATE 1
|
||||
#define HAVE_SIGACTION 1
|
||||
#define HAVE_SIGTIMEDWAIT 1
|
||||
#define HAVE_SA_SIGACTION 1
|
||||
#define HAVE_SETJMP 1
|
||||
#define HAVE_NANOSLEEP 1
|
||||
#define HAVE_SYSCONF 1
|
||||
/* #undef HAVE_SYSCTLBYNAME */
|
||||
#define HAVE_CLOCK_GETTIME 1
|
||||
/* #undef HAVE_GETPAGESIZE */
|
||||
#define HAVE_MPROTECT 1
|
||||
#define HAVE_ICONV 1
|
||||
/* #undef SDL_USE_LIBICONV */
|
||||
#define HAVE_PTHREAD_SETNAME_NP 1
|
||||
/* #undef HAVE_PTHREAD_SET_NAME_NP */
|
||||
#define HAVE_SEM_TIMEDWAIT 1
|
||||
#define HAVE_GETAUXVAL 1
|
||||
/* #undef HAVE_ELF_AUX_INFO */
|
||||
#define HAVE_POLL 1
|
||||
#define HAVE__EXIT 1
|
||||
|
||||
#else
|
||||
#define HAVE_STDARG_H 1
|
||||
#define HAVE_STDDEF_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_FLOAT_H 1
|
||||
#endif /* HAVE_LIBC */
|
||||
|
||||
/* #undef HAVE_ALTIVEC_H */
|
||||
/* #undef HAVE_DBUS_DBUS_H */
|
||||
/* #undef HAVE_FCITX */
|
||||
/* #undef HAVE_IBUS_IBUS_H */
|
||||
#define HAVE_SYS_INOTIFY_H 1
|
||||
#define HAVE_INOTIFY_INIT 1
|
||||
#define HAVE_INOTIFY_INIT1 1
|
||||
#define HAVE_INOTIFY 1
|
||||
/* #undef HAVE_LIBUSB */
|
||||
#define HAVE_O_CLOEXEC 1
|
||||
|
||||
/* Apple platforms might be building universal binaries, where Intel builds
|
||||
can use immintrin.h but other architectures can't. */
|
||||
#ifdef __APPLE__
|
||||
# if defined(__has_include) && (defined(__i386__) || defined(__x86_64))
|
||||
# if __has_include(<immintrin.h>)
|
||||
# define HAVE_IMMINTRIN_H 1
|
||||
# endif
|
||||
# endif
|
||||
#else /* non-Apple platforms can use the normal CMake check for this. */
|
||||
#define HAVE_IMMINTRIN_H 1
|
||||
#endif
|
||||
|
||||
/* #undef HAVE_LIBUDEV_H */
|
||||
/* #undef HAVE_LIBSAMPLERATE_H */
|
||||
/* #undef HAVE_LIBDECOR_H */
|
||||
|
||||
/* #undef HAVE_D3D_H */
|
||||
/* #undef HAVE_D3D11_H */
|
||||
/* #undef HAVE_D3D12_H */
|
||||
/* #undef HAVE_DDRAW_H */
|
||||
/* #undef HAVE_DSOUND_H */
|
||||
/* #undef HAVE_DINPUT_H */
|
||||
/* #undef HAVE_XINPUT_H */
|
||||
/* #undef HAVE_WINDOWS_GAMING_INPUT_H */
|
||||
/* #undef HAVE_DXGI_H */
|
||||
|
||||
/* #undef HAVE_MMDEVICEAPI_H */
|
||||
/* #undef HAVE_AUDIOCLIENT_H */
|
||||
/* #undef HAVE_TPCSHRD_H */
|
||||
/* #undef HAVE_SENSORSAPI_H */
|
||||
/* #undef HAVE_ROAPI_H */
|
||||
/* #undef HAVE_SHELLSCALINGAPI_H */
|
||||
|
||||
/* #undef USE_POSIX_SPAWN */
|
||||
|
||||
/* SDL internal assertion support */
|
||||
#if 0
|
||||
/* #undef SDL_DEFAULT_ASSERT_LEVEL */
|
||||
#endif
|
||||
|
||||
/* Allow disabling of core subsystems */
|
||||
/* #undef SDL_ATOMIC_DISABLED */
|
||||
/* #undef SDL_AUDIO_DISABLED */
|
||||
/* #undef SDL_CPUINFO_DISABLED */
|
||||
/* #undef SDL_EVENTS_DISABLED */
|
||||
/* #undef SDL_FILE_DISABLED */
|
||||
/* #undef SDL_JOYSTICK_DISABLED */
|
||||
/* #undef SDL_HAPTIC_DISABLED */
|
||||
/* #undef SDL_HIDAPI_DISABLED */
|
||||
/* #undef SDL_SENSOR_DISABLED */
|
||||
/* #undef SDL_LOADSO_DISABLED */
|
||||
/* #undef SDL_RENDER_DISABLED */
|
||||
/* #undef SDL_THREADS_DISABLED */
|
||||
/* #undef SDL_TIMERS_DISABLED */
|
||||
/* #undef SDL_VIDEO_DISABLED */
|
||||
/* #undef SDL_POWER_DISABLED */
|
||||
/* #undef SDL_FILESYSTEM_DISABLED */
|
||||
/* #undef SDL_LOCALE_DISABLED */
|
||||
/* #undef SDL_MISC_DISABLED */
|
||||
|
||||
/* Enable various audio drivers */
|
||||
/* #undef SDL_AUDIO_DRIVER_ALSA */
|
||||
/* #undef SDL_AUDIO_DRIVER_ALSA_DYNAMIC */
|
||||
/* #undef SDL_AUDIO_DRIVER_ANDROID */
|
||||
/* #undef SDL_AUDIO_DRIVER_OPENSLES */
|
||||
/* #undef SDL_AUDIO_DRIVER_AAUDIO */
|
||||
/* #undef SDL_AUDIO_DRIVER_ARTS */
|
||||
/* #undef SDL_AUDIO_DRIVER_ARTS_DYNAMIC */
|
||||
/* #undef SDL_AUDIO_DRIVER_COREAUDIO */
|
||||
#define SDL_AUDIO_DRIVER_DISK 1
|
||||
/* #undef SDL_AUDIO_DRIVER_DSOUND */
|
||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||
/* #undef SDL_AUDIO_DRIVER_EMSCRIPTEN */
|
||||
/* #undef SDL_AUDIO_DRIVER_ESD */
|
||||
/* #undef SDL_AUDIO_DRIVER_ESD_DYNAMIC */
|
||||
/* #undef SDL_AUDIO_DRIVER_FUSIONSOUND */
|
||||
/* #undef SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC */
|
||||
/* #undef SDL_AUDIO_DRIVER_HAIKU */
|
||||
/* #undef SDL_AUDIO_DRIVER_JACK */
|
||||
/* #undef SDL_AUDIO_DRIVER_JACK_DYNAMIC */
|
||||
/* #undef SDL_AUDIO_DRIVER_NAS */
|
||||
/* #undef SDL_AUDIO_DRIVER_NAS_DYNAMIC */
|
||||
/* #undef SDL_AUDIO_DRIVER_NETBSD */
|
||||
#define SDL_AUDIO_DRIVER_OSS 1
|
||||
/* #undef SDL_AUDIO_DRIVER_PAUDIO */
|
||||
/* #undef SDL_AUDIO_DRIVER_PIPEWIRE */
|
||||
/* #undef SDL_AUDIO_DRIVER_PIPEWIRE_DYNAMIC */
|
||||
/* #undef SDL_AUDIO_DRIVER_PULSEAUDIO */
|
||||
/* #undef SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC */
|
||||
/* #undef SDL_AUDIO_DRIVER_QSA */
|
||||
/* #undef SDL_AUDIO_DRIVER_SNDIO */
|
||||
/* #undef SDL_AUDIO_DRIVER_SNDIO_DYNAMIC */
|
||||
/* #undef SDL_AUDIO_DRIVER_SUNAUDIO */
|
||||
/* #undef SDL_AUDIO_DRIVER_WASAPI */
|
||||
/* #undef SDL_AUDIO_DRIVER_WINMM */
|
||||
/* #undef SDL_AUDIO_DRIVER_OS2 */
|
||||
/* #undef SDL_AUDIO_DRIVER_VITA */
|
||||
/* #undef SDL_AUDIO_DRIVER_PSP */
|
||||
/* #undef SDL_AUDIO_DRIVER_PS2 */
|
||||
/* #undef SDL_AUDIO_DRIVER_N3DS */
|
||||
|
||||
/* Enable various input drivers */
|
||||
#define SDL_INPUT_LINUXEV 1
|
||||
#define SDL_INPUT_LINUXKD 1
|
||||
/* #undef SDL_INPUT_FBSDKBIO */
|
||||
/* #undef SDL_INPUT_WSCONS */
|
||||
/* #undef SDL_JOYSTICK_ANDROID */
|
||||
/* #undef SDL_JOYSTICK_HAIKU */
|
||||
/* #undef SDL_JOYSTICK_WGI */
|
||||
/* #undef SDL_JOYSTICK_DINPUT */
|
||||
/* #undef SDL_JOYSTICK_XINPUT */
|
||||
/* #undef SDL_JOYSTICK_DUMMY */
|
||||
/* #undef SDL_JOYSTICK_IOKIT */
|
||||
/* #undef SDL_JOYSTICK_MFI */
|
||||
#define SDL_JOYSTICK_LINUX 1
|
||||
/* #undef SDL_JOYSTICK_OS2 */
|
||||
/* #undef SDL_JOYSTICK_USBHID */
|
||||
/* #undef SDL_HAVE_MACHINE_JOYSTICK_H */
|
||||
#define SDL_JOYSTICK_HIDAPI 1
|
||||
/* #undef SDL_JOYSTICK_RAWINPUT */
|
||||
/* #undef SDL_JOYSTICK_EMSCRIPTEN */
|
||||
#define SDL_JOYSTICK_VIRTUAL 1
|
||||
/* #undef SDL_JOYSTICK_VITA */
|
||||
/* #undef SDL_JOYSTICK_PSP */
|
||||
/* #undef SDL_JOYSTICK_PS2 */
|
||||
/* #undef SDL_JOYSTICK_N3DS */
|
||||
/* #undef SDL_HAPTIC_DUMMY */
|
||||
#define SDL_HAPTIC_LINUX 1
|
||||
/* #undef SDL_HAPTIC_IOKIT */
|
||||
/* #undef SDL_HAPTIC_DINPUT */
|
||||
/* #undef SDL_HAPTIC_XINPUT */
|
||||
/* #undef SDL_HAPTIC_ANDROID */
|
||||
/* #undef SDL_LIBUSB_DYNAMIC */
|
||||
/* #undef SDL_UDEV_DYNAMIC */
|
||||
|
||||
/* Enable various sensor drivers */
|
||||
/* #undef SDL_SENSOR_ANDROID */
|
||||
/* #undef SDL_SENSOR_COREMOTION */
|
||||
/* #undef SDL_SENSOR_WINDOWS */
|
||||
#define SDL_SENSOR_DUMMY 1
|
||||
/* #undef SDL_SENSOR_VITA */
|
||||
/* #undef SDL_SENSOR_N3DS */
|
||||
|
||||
/* Enable various shared object loading systems */
|
||||
#define SDL_LOADSO_DLOPEN 1
|
||||
/* #undef SDL_LOADSO_DUMMY */
|
||||
/* #undef SDL_LOADSO_LDG */
|
||||
/* #undef SDL_LOADSO_WINDOWS */
|
||||
/* #undef SDL_LOADSO_OS2 */
|
||||
|
||||
/* Enable various threading systems */
|
||||
/* #undef SDL_THREAD_GENERIC_COND_SUFFIX */
|
||||
#define SDL_THREAD_PTHREAD 1
|
||||
#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1
|
||||
/* #undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP */
|
||||
/* #undef SDL_THREAD_WINDOWS */
|
||||
/* #undef SDL_THREAD_OS2 */
|
||||
/* #undef SDL_THREAD_VITA */
|
||||
/* #undef SDL_THREAD_PSP */
|
||||
/* #undef SDL_THREAD_PS2 */
|
||||
/* #undef SDL_THREAD_N3DS */
|
||||
|
||||
/* Enable various timer systems */
|
||||
/* #undef SDL_TIMER_HAIKU */
|
||||
/* #undef SDL_TIMER_DUMMY */
|
||||
#define SDL_TIMER_UNIX 1
|
||||
/* #undef SDL_TIMER_WINDOWS */
|
||||
/* #undef SDL_TIMER_OS2 */
|
||||
/* #undef SDL_TIMER_VITA */
|
||||
/* #undef SDL_TIMER_PSP */
|
||||
/* #undef SDL_TIMER_PS2 */
|
||||
/* #undef SDL_TIMER_N3DS */
|
||||
|
||||
/* Enable various video drivers */
|
||||
/* #undef SDL_VIDEO_DRIVER_ANDROID */
|
||||
/* #undef SDL_VIDEO_DRIVER_EMSCRIPTEN */
|
||||
/* #undef SDL_VIDEO_DRIVER_HAIKU */
|
||||
/* #undef SDL_VIDEO_DRIVER_COCOA */
|
||||
/* #undef SDL_VIDEO_DRIVER_UIKIT */
|
||||
/* #undef SDL_VIDEO_DRIVER_DIRECTFB */
|
||||
/* #undef SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC */
|
||||
#define SDL_VIDEO_DRIVER_DUMMY 1
|
||||
#define SDL_VIDEO_DRIVER_OFFSCREEN 1
|
||||
/* #undef SDL_VIDEO_DRIVER_WINDOWS */
|
||||
/* #undef SDL_VIDEO_DRIVER_WINRT */
|
||||
#define SDL_VIDEO_DRIVER_WAYLAND 1
|
||||
/* #undef SDL_VIDEO_DRIVER_RPI */
|
||||
/* #undef SDL_VIDEO_DRIVER_VIVANTE */
|
||||
/* #undef SDL_VIDEO_DRIVER_VIVANTE_VDK */
|
||||
/* #undef SDL_VIDEO_DRIVER_OS2 */
|
||||
/* #undef SDL_VIDEO_DRIVER_QNX */
|
||||
/* #undef SDL_VIDEO_DRIVER_RISCOS */
|
||||
/* #undef SDL_VIDEO_DRIVER_PSP */
|
||||
/* #undef SDL_VIDEO_DRIVER_PS2 */
|
||||
|
||||
/* #undef SDL_VIDEO_DRIVER_KMSDRM */
|
||||
/* #undef SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC */
|
||||
/* #undef SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC_GBM */
|
||||
|
||||
#define SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH 1
|
||||
#define SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC "libwayland-client.so.0"
|
||||
#define SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL "libwayland-egl.so.1"
|
||||
#define SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR "libwayland-cursor.so.0"
|
||||
#define SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON "libxkbcommon.so.0"
|
||||
/* #undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR */
|
||||
|
||||
#define SDL_VIDEO_DRIVER_X11 1
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC "libX11.so.6"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT "libXext.so.6"
|
||||
/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR */
|
||||
/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 */
|
||||
/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XFIXES */
|
||||
/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR */
|
||||
/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS */
|
||||
/* #undef SDL_VIDEO_DRIVER_X11_XCURSOR */
|
||||
#define SDL_VIDEO_DRIVER_X11_XDBE 1
|
||||
/* #undef SDL_VIDEO_DRIVER_X11_XINPUT2 */
|
||||
/* #undef SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH */
|
||||
/* #undef SDL_VIDEO_DRIVER_X11_XFIXES */
|
||||
/* #undef SDL_VIDEO_DRIVER_X11_XRANDR */
|
||||
/* #undef SDL_VIDEO_DRIVER_X11_XSCRNSAVER */
|
||||
#define SDL_VIDEO_DRIVER_X11_XSHAPE 1
|
||||
#define SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS 1
|
||||
#define SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM 1
|
||||
/* #undef SDL_VIDEO_DRIVER_VITA */
|
||||
/* #undef SDL_VIDEO_DRIVER_N3DS */
|
||||
|
||||
/* #undef SDL_VIDEO_RENDER_D3D */
|
||||
/* #undef SDL_VIDEO_RENDER_D3D11 */
|
||||
/* #undef SDL_VIDEO_RENDER_D3D12 */
|
||||
#define SDL_VIDEO_RENDER_OGL 1
|
||||
#define SDL_VIDEO_RENDER_OGL_ES 1
|
||||
#define SDL_VIDEO_RENDER_OGL_ES2 1
|
||||
/* #undef SDL_VIDEO_RENDER_DIRECTFB */
|
||||
/* #undef SDL_VIDEO_RENDER_METAL */
|
||||
/* #undef SDL_VIDEO_RENDER_VITA_GXM */
|
||||
/* #undef SDL_VIDEO_RENDER_PS2 */
|
||||
/* #undef SDL_VIDEO_RENDER_PSP */
|
||||
|
||||
/* Enable OpenGL support */
|
||||
#define SDL_VIDEO_OPENGL 1
|
||||
#define SDL_VIDEO_OPENGL_ES 1
|
||||
#define SDL_VIDEO_OPENGL_ES2 1
|
||||
/* #undef SDL_VIDEO_OPENGL_BGL */
|
||||
/* #undef SDL_VIDEO_OPENGL_CGL */
|
||||
#define SDL_VIDEO_OPENGL_GLX 1
|
||||
/* #undef SDL_VIDEO_OPENGL_WGL */
|
||||
#define SDL_VIDEO_OPENGL_EGL 1
|
||||
/* #undef SDL_VIDEO_OPENGL_OSMESA */
|
||||
/* #undef SDL_VIDEO_OPENGL_OSMESA_DYNAMIC */
|
||||
|
||||
/* Enable Vulkan support */
|
||||
#define SDL_VIDEO_VULKAN 1
|
||||
|
||||
/* Enable Metal support */
|
||||
/* #undef SDL_VIDEO_METAL */
|
||||
|
||||
/* Enable system power support */
|
||||
/* #undef SDL_POWER_ANDROID */
|
||||
#define SDL_POWER_LINUX 1
|
||||
/* #undef SDL_POWER_WINDOWS */
|
||||
/* #undef SDL_POWER_WINRT */
|
||||
/* #undef SDL_POWER_MACOSX */
|
||||
/* #undef SDL_POWER_UIKIT */
|
||||
/* #undef SDL_POWER_HAIKU */
|
||||
/* #undef SDL_POWER_EMSCRIPTEN */
|
||||
/* #undef SDL_POWER_HARDWIRED */
|
||||
/* #undef SDL_POWER_VITA */
|
||||
/* #undef SDL_POWER_PSP */
|
||||
/* #undef SDL_POWER_N3DS */
|
||||
|
||||
/* Enable system filesystem support */
|
||||
/* #undef SDL_FILESYSTEM_ANDROID */
|
||||
/* #undef SDL_FILESYSTEM_HAIKU */
|
||||
/* #undef SDL_FILESYSTEM_COCOA */
|
||||
/* #undef SDL_FILESYSTEM_DUMMY */
|
||||
/* #undef SDL_FILESYSTEM_RISCOS */
|
||||
#define SDL_FILESYSTEM_UNIX 1
|
||||
/* #undef SDL_FILESYSTEM_WINDOWS */
|
||||
/* #undef SDL_FILESYSTEM_EMSCRIPTEN */
|
||||
/* #undef SDL_FILESYSTEM_OS2 */
|
||||
/* #undef SDL_FILESYSTEM_VITA */
|
||||
/* #undef SDL_FILESYSTEM_PSP */
|
||||
/* #undef SDL_FILESYSTEM_PS2 */
|
||||
/* #undef SDL_FILESYSTEM_N3DS */
|
||||
|
||||
/* Enable misc subsystem */
|
||||
/* #undef SDL_MISC_DUMMY */
|
||||
|
||||
/* Enable locale subsystem */
|
||||
/* #undef SDL_LOCALE_DUMMY */
|
||||
|
||||
/* Enable assembly routines */
|
||||
/* #undef SDL_ALTIVEC_BLITTERS */
|
||||
/* #undef SDL_ARM_SIMD_BLITTERS */
|
||||
/* #undef SDL_ARM_NEON_BLITTERS */
|
||||
|
||||
/* Whether SDL_DYNAMIC_API needs dlopen */
|
||||
#define DYNAPI_NEEDS_DLOPEN 1
|
||||
|
||||
/* Enable dynamic libsamplerate support */
|
||||
/* #undef SDL_LIBSAMPLERATE_DYNAMIC */
|
||||
|
||||
/* Enable ime support */
|
||||
/* #undef SDL_USE_IME */
|
||||
|
||||
/* Platform specific definitions */
|
||||
/* #undef SDL_IPHONE_KEYBOARD */
|
||||
/* #undef SDL_IPHONE_LAUNCHSCREEN */
|
||||
|
||||
/* #undef SDL_VIDEO_VITA_PIB */
|
||||
/* #undef SDL_VIDEO_VITA_PVR */
|
||||
/* #undef SDL_VIDEO_VITA_PVR_OGL */
|
||||
|
||||
/* #undef SDL_HAVE_LIBDECOR_GET_MIN_MAX */
|
||||
|
||||
#if !defined(HAVE_STDINT_H) && !defined(_STDINT_H_)
|
||||
/* Most everything except Visual Studio 2008 and earlier has stdint.h now */
|
||||
#if defined(_MSC_VER) && (_MSC_VER < 1600)
|
||||
typedef signed __int8 int8_t;
|
||||
typedef unsigned __int8 uint8_t;
|
||||
typedef signed __int16 int16_t;
|
||||
typedef unsigned __int16 uint16_t;
|
||||
typedef signed __int32 int32_t;
|
||||
typedef unsigned __int32 uint32_t;
|
||||
typedef signed __int64 int64_t;
|
||||
typedef unsigned __int64 uint64_t;
|
||||
#ifndef _UINTPTR_T_DEFINED
|
||||
#ifdef _WIN64
|
||||
typedef unsigned __int64 uintptr_t;
|
||||
#else
|
||||
typedef unsigned int uintptr_t;
|
||||
#endif
|
||||
#define _UINTPTR_T_DEFINED
|
||||
#endif
|
||||
#endif /* Visual Studio 2008 */
|
||||
#endif /* !_STDINT_H_ && !HAVE_STDINT_H */
|
||||
|
||||
#endif /* SDL_config_h_ */
|
||||
50
build-tests/Libraries/SDL/cmake_install.cmake
Normal file
50
build-tests/Libraries/SDL/cmake_install.cmake
Normal file
@ -0,0 +1,50 @@
|
||||
# Install script for directory: /home/ken/Projects/Tactility/Libraries/SDL
|
||||
|
||||
# Set the install prefix
|
||||
if(NOT DEFINED CMAKE_INSTALL_PREFIX)
|
||||
set(CMAKE_INSTALL_PREFIX "/usr/local")
|
||||
endif()
|
||||
string(REGEX REPLACE "/$" "" CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
|
||||
|
||||
# Set the install configuration name.
|
||||
if(NOT DEFINED CMAKE_INSTALL_CONFIG_NAME)
|
||||
if(BUILD_TYPE)
|
||||
string(REGEX REPLACE "^[^A-Za-z0-9_]+" ""
|
||||
CMAKE_INSTALL_CONFIG_NAME "${BUILD_TYPE}")
|
||||
else()
|
||||
set(CMAKE_INSTALL_CONFIG_NAME "")
|
||||
endif()
|
||||
message(STATUS "Install configuration: \"${CMAKE_INSTALL_CONFIG_NAME}\"")
|
||||
endif()
|
||||
|
||||
# Set the component getting installed.
|
||||
if(NOT CMAKE_INSTALL_COMPONENT)
|
||||
if(COMPONENT)
|
||||
message(STATUS "Install component: \"${COMPONENT}\"")
|
||||
set(CMAKE_INSTALL_COMPONENT "${COMPONENT}")
|
||||
else()
|
||||
set(CMAKE_INSTALL_COMPONENT)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Install shared libraries without execute permission?
|
||||
if(NOT DEFINED CMAKE_INSTALL_SO_NO_EXE)
|
||||
set(CMAKE_INSTALL_SO_NO_EXE "0")
|
||||
endif()
|
||||
|
||||
# Is this installation the result of a crosscompile?
|
||||
if(NOT DEFINED CMAKE_CROSSCOMPILING)
|
||||
set(CMAKE_CROSSCOMPILING "FALSE")
|
||||
endif()
|
||||
|
||||
# Set path to fallback-tool for dependency-resolution.
|
||||
if(NOT DEFINED CMAKE_OBJDUMP)
|
||||
set(CMAKE_OBJDUMP "/usr/bin/objdump")
|
||||
endif()
|
||||
|
||||
string(REPLACE ";" "\n" CMAKE_INSTALL_MANIFEST_CONTENT
|
||||
"${CMAKE_INSTALL_MANIFEST_FILES}")
|
||||
if(CMAKE_INSTALL_LOCAL_ONLY)
|
||||
file(WRITE "/home/ken/Projects/Tactility/build-tests/Libraries/SDL/install_local_manifest.txt"
|
||||
"${CMAKE_INSTALL_MANIFEST_CONTENT}")
|
||||
endif()
|
||||
18
build-tests/Libraries/SDL/cmake_uninstall.cmake
Normal file
18
build-tests/Libraries/SDL/cmake_uninstall.cmake
Normal file
@ -0,0 +1,18 @@
|
||||
if (NOT EXISTS "/home/ken/Projects/Tactility/build-tests/install_manifest.txt")
|
||||
message(FATAL_ERROR "Cannot find install manifest: \"/home/ken/Projects/Tactility/build-tests/install_manifest.txt\"")
|
||||
endif(NOT EXISTS "/home/ken/Projects/Tactility/build-tests/install_manifest.txt")
|
||||
|
||||
file(READ "/home/ken/Projects/Tactility/build-tests/install_manifest.txt" files)
|
||||
string(REGEX REPLACE "\n" ";" files "${files}")
|
||||
foreach (file ${files})
|
||||
message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
|
||||
execute_process(
|
||||
COMMAND /usr/bin/cmake -E remove "$ENV{DESTDIR}${file}"
|
||||
OUTPUT_VARIABLE rm_out
|
||||
RESULT_VARIABLE rm_retval
|
||||
)
|
||||
if(NOT ${rm_retval} EQUAL 0)
|
||||
message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
|
||||
endif (NOT ${rm_retval} EQUAL 0)
|
||||
endforeach(file)
|
||||
|
||||
571
build-tests/Libraries/SDL/include-config-/SDL2/SDL_config.h
Normal file
571
build-tests/Libraries/SDL/include-config-/SDL2/SDL_config.h
Normal file
@ -0,0 +1,571 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef SDL_config_h_
|
||||
#define SDL_config_h_
|
||||
|
||||
/**
|
||||
* \file SDL_config.h.in
|
||||
*
|
||||
* This is a set of defines to configure the SDL features
|
||||
*/
|
||||
|
||||
/* General platform specific identifiers */
|
||||
#include "SDL_platform.h"
|
||||
|
||||
/* C language features */
|
||||
/* #undef const */
|
||||
/* #undef inline */
|
||||
/* #undef volatile */
|
||||
|
||||
/* C datatypes */
|
||||
/* Define SIZEOF_VOIDP for 64/32 architectures */
|
||||
#if defined(__LP64__) || defined(_LP64) || defined(_WIN64)
|
||||
#define SIZEOF_VOIDP 8
|
||||
#else
|
||||
#define SIZEOF_VOIDP 4
|
||||
#endif
|
||||
|
||||
#define HAVE_GCC_ATOMICS 1
|
||||
/* #undef HAVE_GCC_SYNC_LOCK_TEST_AND_SET */
|
||||
|
||||
/* Comment this if you want to build without any C library requirements */
|
||||
#define HAVE_LIBC 1
|
||||
#ifdef HAVE_LIBC
|
||||
|
||||
/* Useful headers */
|
||||
#define STDC_HEADERS 1
|
||||
#define HAVE_ALLOCA_H 1
|
||||
#define HAVE_CTYPE_H 1
|
||||
#define HAVE_FLOAT_H 1
|
||||
#define HAVE_ICONV_H 1
|
||||
#define HAVE_INTTYPES_H 1
|
||||
#define HAVE_LIMITS_H 1
|
||||
#define HAVE_MALLOC_H 1
|
||||
#define HAVE_MATH_H 1
|
||||
#define HAVE_MEMORY_H 1
|
||||
#define HAVE_SIGNAL_H 1
|
||||
#define HAVE_STDARG_H 1
|
||||
#define HAVE_STDDEF_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_STDIO_H 1
|
||||
#define HAVE_STDLIB_H 1
|
||||
#define HAVE_STRINGS_H 1
|
||||
#define HAVE_STRING_H 1
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
#define HAVE_WCHAR_H 1
|
||||
#define HAVE_LINUX_INPUT_H 1
|
||||
/* #undef HAVE_PTHREAD_NP_H */
|
||||
/* #undef HAVE_LIBUNWIND_H */
|
||||
|
||||
/* C library functions */
|
||||
#define HAVE_DLOPEN 1
|
||||
#define HAVE_MALLOC 1
|
||||
#define HAVE_CALLOC 1
|
||||
#define HAVE_REALLOC 1
|
||||
#define HAVE_FREE 1
|
||||
#define HAVE_ALLOCA 1
|
||||
#ifndef __WIN32__ /* Don't use C runtime versions of these on Windows */
|
||||
#define HAVE_GETENV 1
|
||||
#define HAVE_SETENV 1
|
||||
#define HAVE_PUTENV 1
|
||||
#define HAVE_UNSETENV 1
|
||||
#endif
|
||||
#define HAVE_QSORT 1
|
||||
#define HAVE_BSEARCH 1
|
||||
#define HAVE_ABS 1
|
||||
#define HAVE_BCOPY 1
|
||||
#define HAVE_MEMSET 1
|
||||
#define HAVE_MEMCPY 1
|
||||
#define HAVE_MEMMOVE 1
|
||||
#define HAVE_MEMCMP 1
|
||||
#define HAVE_WCSLEN 1
|
||||
#define HAVE_WCSLCPY 1
|
||||
#define HAVE_WCSLCAT 1
|
||||
/* #undef HAVE__WCSDUP */
|
||||
#define HAVE_WCSDUP 1
|
||||
#define HAVE_WCSSTR 1
|
||||
#define HAVE_WCSCMP 1
|
||||
#define HAVE_WCSNCMP 1
|
||||
#define HAVE_WCSCASECMP 1
|
||||
/* #undef HAVE__WCSICMP */
|
||||
#define HAVE_WCSNCASECMP 1
|
||||
/* #undef HAVE__WCSNICMP */
|
||||
#define HAVE_STRLEN 1
|
||||
#define HAVE_STRLCPY 1
|
||||
#define HAVE_STRLCAT 1
|
||||
/* #undef HAVE__STRREV */
|
||||
/* #undef HAVE__STRUPR */
|
||||
/* #undef HAVE__STRLWR */
|
||||
#define HAVE_INDEX 1
|
||||
#define HAVE_RINDEX 1
|
||||
#define HAVE_STRCHR 1
|
||||
#define HAVE_STRRCHR 1
|
||||
#define HAVE_STRSTR 1
|
||||
#define HAVE_STRTOK_R 1
|
||||
/* #undef HAVE_ITOA */
|
||||
/* #undef HAVE__LTOA */
|
||||
/* #undef HAVE__UITOA */
|
||||
/* #undef HAVE__ULTOA */
|
||||
#define HAVE_STRTOL 1
|
||||
#define HAVE_STRTOUL 1
|
||||
/* #undef HAVE__I64TOA */
|
||||
/* #undef HAVE__UI64TOA */
|
||||
#define HAVE_STRTOLL 1
|
||||
#define HAVE_STRTOULL 1
|
||||
#define HAVE_STRTOD 1
|
||||
#define HAVE_ATOI 1
|
||||
#define HAVE_ATOF 1
|
||||
#define HAVE_STRCMP 1
|
||||
#define HAVE_STRNCMP 1
|
||||
/* #undef HAVE__STRICMP */
|
||||
#define HAVE_STRCASECMP 1
|
||||
/* #undef HAVE__STRNICMP */
|
||||
#define HAVE_STRNCASECMP 1
|
||||
#define HAVE_STRCASESTR 1
|
||||
#define HAVE_SSCANF 1
|
||||
#define HAVE_VSSCANF 1
|
||||
#define HAVE_VSNPRINTF 1
|
||||
#define HAVE_M_PI 1
|
||||
#define HAVE_ACOS 1
|
||||
#define HAVE_ACOSF 1
|
||||
#define HAVE_ASIN 1
|
||||
#define HAVE_ASINF 1
|
||||
#define HAVE_ATAN 1
|
||||
#define HAVE_ATANF 1
|
||||
#define HAVE_ATAN2 1
|
||||
#define HAVE_ATAN2F 1
|
||||
#define HAVE_CEIL 1
|
||||
#define HAVE_CEILF 1
|
||||
#define HAVE_COPYSIGN 1
|
||||
#define HAVE_COPYSIGNF 1
|
||||
#define HAVE_COS 1
|
||||
#define HAVE_COSF 1
|
||||
#define HAVE_EXP 1
|
||||
#define HAVE_EXPF 1
|
||||
#define HAVE_FABS 1
|
||||
#define HAVE_FABSF 1
|
||||
#define HAVE_FLOOR 1
|
||||
#define HAVE_FLOORF 1
|
||||
#define HAVE_FMOD 1
|
||||
#define HAVE_FMODF 1
|
||||
#define HAVE_LOG 1
|
||||
#define HAVE_LOGF 1
|
||||
#define HAVE_LOG10 1
|
||||
#define HAVE_LOG10F 1
|
||||
#define HAVE_LROUND 1
|
||||
#define HAVE_LROUNDF 1
|
||||
#define HAVE_POW 1
|
||||
#define HAVE_POWF 1
|
||||
#define HAVE_ROUND 1
|
||||
#define HAVE_ROUNDF 1
|
||||
#define HAVE_SCALBN 1
|
||||
#define HAVE_SCALBNF 1
|
||||
#define HAVE_SIN 1
|
||||
#define HAVE_SINF 1
|
||||
#define HAVE_SQRT 1
|
||||
#define HAVE_SQRTF 1
|
||||
#define HAVE_TAN 1
|
||||
#define HAVE_TANF 1
|
||||
#define HAVE_TRUNC 1
|
||||
#define HAVE_TRUNCF 1
|
||||
#define HAVE_FOPEN64 1
|
||||
#define HAVE_FSEEKO 1
|
||||
#define HAVE_FSEEKO64 1
|
||||
#define HAVE_MEMFD_CREATE 1
|
||||
#define HAVE_POSIX_FALLOCATE 1
|
||||
#define HAVE_SIGACTION 1
|
||||
#define HAVE_SIGTIMEDWAIT 1
|
||||
#define HAVE_SA_SIGACTION 1
|
||||
#define HAVE_SETJMP 1
|
||||
#define HAVE_NANOSLEEP 1
|
||||
#define HAVE_SYSCONF 1
|
||||
/* #undef HAVE_SYSCTLBYNAME */
|
||||
#define HAVE_CLOCK_GETTIME 1
|
||||
/* #undef HAVE_GETPAGESIZE */
|
||||
#define HAVE_MPROTECT 1
|
||||
#define HAVE_ICONV 1
|
||||
/* #undef SDL_USE_LIBICONV */
|
||||
#define HAVE_PTHREAD_SETNAME_NP 1
|
||||
/* #undef HAVE_PTHREAD_SET_NAME_NP */
|
||||
#define HAVE_SEM_TIMEDWAIT 1
|
||||
#define HAVE_GETAUXVAL 1
|
||||
/* #undef HAVE_ELF_AUX_INFO */
|
||||
#define HAVE_POLL 1
|
||||
#define HAVE__EXIT 1
|
||||
|
||||
#else
|
||||
#define HAVE_STDARG_H 1
|
||||
#define HAVE_STDDEF_H 1
|
||||
#define HAVE_STDINT_H 1
|
||||
#define HAVE_FLOAT_H 1
|
||||
#endif /* HAVE_LIBC */
|
||||
|
||||
/* #undef HAVE_ALTIVEC_H */
|
||||
/* #undef HAVE_DBUS_DBUS_H */
|
||||
/* #undef HAVE_FCITX */
|
||||
/* #undef HAVE_IBUS_IBUS_H */
|
||||
#define HAVE_SYS_INOTIFY_H 1
|
||||
#define HAVE_INOTIFY_INIT 1
|
||||
#define HAVE_INOTIFY_INIT1 1
|
||||
#define HAVE_INOTIFY 1
|
||||
/* #undef HAVE_LIBUSB */
|
||||
#define HAVE_O_CLOEXEC 1
|
||||
|
||||
/* Apple platforms might be building universal binaries, where Intel builds
|
||||
can use immintrin.h but other architectures can't. */
|
||||
#ifdef __APPLE__
|
||||
# if defined(__has_include) && (defined(__i386__) || defined(__x86_64))
|
||||
# if __has_include(<immintrin.h>)
|
||||
# define HAVE_IMMINTRIN_H 1
|
||||
# endif
|
||||
# endif
|
||||
#else /* non-Apple platforms can use the normal CMake check for this. */
|
||||
#define HAVE_IMMINTRIN_H 1
|
||||
#endif
|
||||
|
||||
/* #undef HAVE_LIBUDEV_H */
|
||||
/* #undef HAVE_LIBSAMPLERATE_H */
|
||||
/* #undef HAVE_LIBDECOR_H */
|
||||
|
||||
/* #undef HAVE_D3D_H */
|
||||
/* #undef HAVE_D3D11_H */
|
||||
/* #undef HAVE_D3D12_H */
|
||||
/* #undef HAVE_DDRAW_H */
|
||||
/* #undef HAVE_DSOUND_H */
|
||||
/* #undef HAVE_DINPUT_H */
|
||||
/* #undef HAVE_XINPUT_H */
|
||||
/* #undef HAVE_WINDOWS_GAMING_INPUT_H */
|
||||
/* #undef HAVE_DXGI_H */
|
||||
|
||||
/* #undef HAVE_MMDEVICEAPI_H */
|
||||
/* #undef HAVE_AUDIOCLIENT_H */
|
||||
/* #undef HAVE_TPCSHRD_H */
|
||||
/* #undef HAVE_SENSORSAPI_H */
|
||||
/* #undef HAVE_ROAPI_H */
|
||||
/* #undef HAVE_SHELLSCALINGAPI_H */
|
||||
|
||||
/* #undef USE_POSIX_SPAWN */
|
||||
|
||||
/* SDL internal assertion support */
|
||||
#if 0
|
||||
/* #undef SDL_DEFAULT_ASSERT_LEVEL */
|
||||
#endif
|
||||
|
||||
/* Allow disabling of core subsystems */
|
||||
/* #undef SDL_ATOMIC_DISABLED */
|
||||
/* #undef SDL_AUDIO_DISABLED */
|
||||
/* #undef SDL_CPUINFO_DISABLED */
|
||||
/* #undef SDL_EVENTS_DISABLED */
|
||||
/* #undef SDL_FILE_DISABLED */
|
||||
/* #undef SDL_JOYSTICK_DISABLED */
|
||||
/* #undef SDL_HAPTIC_DISABLED */
|
||||
/* #undef SDL_HIDAPI_DISABLED */
|
||||
/* #undef SDL_SENSOR_DISABLED */
|
||||
/* #undef SDL_LOADSO_DISABLED */
|
||||
/* #undef SDL_RENDER_DISABLED */
|
||||
/* #undef SDL_THREADS_DISABLED */
|
||||
/* #undef SDL_TIMERS_DISABLED */
|
||||
/* #undef SDL_VIDEO_DISABLED */
|
||||
/* #undef SDL_POWER_DISABLED */
|
||||
/* #undef SDL_FILESYSTEM_DISABLED */
|
||||
/* #undef SDL_LOCALE_DISABLED */
|
||||
/* #undef SDL_MISC_DISABLED */
|
||||
|
||||
/* Enable various audio drivers */
|
||||
/* #undef SDL_AUDIO_DRIVER_ALSA */
|
||||
/* #undef SDL_AUDIO_DRIVER_ALSA_DYNAMIC */
|
||||
/* #undef SDL_AUDIO_DRIVER_ANDROID */
|
||||
/* #undef SDL_AUDIO_DRIVER_OPENSLES */
|
||||
/* #undef SDL_AUDIO_DRIVER_AAUDIO */
|
||||
/* #undef SDL_AUDIO_DRIVER_ARTS */
|
||||
/* #undef SDL_AUDIO_DRIVER_ARTS_DYNAMIC */
|
||||
/* #undef SDL_AUDIO_DRIVER_COREAUDIO */
|
||||
#define SDL_AUDIO_DRIVER_DISK 1
|
||||
/* #undef SDL_AUDIO_DRIVER_DSOUND */
|
||||
#define SDL_AUDIO_DRIVER_DUMMY 1
|
||||
/* #undef SDL_AUDIO_DRIVER_EMSCRIPTEN */
|
||||
/* #undef SDL_AUDIO_DRIVER_ESD */
|
||||
/* #undef SDL_AUDIO_DRIVER_ESD_DYNAMIC */
|
||||
/* #undef SDL_AUDIO_DRIVER_FUSIONSOUND */
|
||||
/* #undef SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC */
|
||||
/* #undef SDL_AUDIO_DRIVER_HAIKU */
|
||||
/* #undef SDL_AUDIO_DRIVER_JACK */
|
||||
/* #undef SDL_AUDIO_DRIVER_JACK_DYNAMIC */
|
||||
/* #undef SDL_AUDIO_DRIVER_NAS */
|
||||
/* #undef SDL_AUDIO_DRIVER_NAS_DYNAMIC */
|
||||
/* #undef SDL_AUDIO_DRIVER_NETBSD */
|
||||
#define SDL_AUDIO_DRIVER_OSS 1
|
||||
/* #undef SDL_AUDIO_DRIVER_PAUDIO */
|
||||
/* #undef SDL_AUDIO_DRIVER_PIPEWIRE */
|
||||
/* #undef SDL_AUDIO_DRIVER_PIPEWIRE_DYNAMIC */
|
||||
/* #undef SDL_AUDIO_DRIVER_PULSEAUDIO */
|
||||
/* #undef SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC */
|
||||
/* #undef SDL_AUDIO_DRIVER_QSA */
|
||||
/* #undef SDL_AUDIO_DRIVER_SNDIO */
|
||||
/* #undef SDL_AUDIO_DRIVER_SNDIO_DYNAMIC */
|
||||
/* #undef SDL_AUDIO_DRIVER_SUNAUDIO */
|
||||
/* #undef SDL_AUDIO_DRIVER_WASAPI */
|
||||
/* #undef SDL_AUDIO_DRIVER_WINMM */
|
||||
/* #undef SDL_AUDIO_DRIVER_OS2 */
|
||||
/* #undef SDL_AUDIO_DRIVER_VITA */
|
||||
/* #undef SDL_AUDIO_DRIVER_PSP */
|
||||
/* #undef SDL_AUDIO_DRIVER_PS2 */
|
||||
/* #undef SDL_AUDIO_DRIVER_N3DS */
|
||||
|
||||
/* Enable various input drivers */
|
||||
#define SDL_INPUT_LINUXEV 1
|
||||
#define SDL_INPUT_LINUXKD 1
|
||||
/* #undef SDL_INPUT_FBSDKBIO */
|
||||
/* #undef SDL_INPUT_WSCONS */
|
||||
/* #undef SDL_JOYSTICK_ANDROID */
|
||||
/* #undef SDL_JOYSTICK_HAIKU */
|
||||
/* #undef SDL_JOYSTICK_WGI */
|
||||
/* #undef SDL_JOYSTICK_DINPUT */
|
||||
/* #undef SDL_JOYSTICK_XINPUT */
|
||||
/* #undef SDL_JOYSTICK_DUMMY */
|
||||
/* #undef SDL_JOYSTICK_IOKIT */
|
||||
/* #undef SDL_JOYSTICK_MFI */
|
||||
#define SDL_JOYSTICK_LINUX 1
|
||||
/* #undef SDL_JOYSTICK_OS2 */
|
||||
/* #undef SDL_JOYSTICK_USBHID */
|
||||
/* #undef SDL_HAVE_MACHINE_JOYSTICK_H */
|
||||
#define SDL_JOYSTICK_HIDAPI 1
|
||||
/* #undef SDL_JOYSTICK_RAWINPUT */
|
||||
/* #undef SDL_JOYSTICK_EMSCRIPTEN */
|
||||
#define SDL_JOYSTICK_VIRTUAL 1
|
||||
/* #undef SDL_JOYSTICK_VITA */
|
||||
/* #undef SDL_JOYSTICK_PSP */
|
||||
/* #undef SDL_JOYSTICK_PS2 */
|
||||
/* #undef SDL_JOYSTICK_N3DS */
|
||||
/* #undef SDL_HAPTIC_DUMMY */
|
||||
#define SDL_HAPTIC_LINUX 1
|
||||
/* #undef SDL_HAPTIC_IOKIT */
|
||||
/* #undef SDL_HAPTIC_DINPUT */
|
||||
/* #undef SDL_HAPTIC_XINPUT */
|
||||
/* #undef SDL_HAPTIC_ANDROID */
|
||||
/* #undef SDL_LIBUSB_DYNAMIC */
|
||||
/* #undef SDL_UDEV_DYNAMIC */
|
||||
|
||||
/* Enable various sensor drivers */
|
||||
/* #undef SDL_SENSOR_ANDROID */
|
||||
/* #undef SDL_SENSOR_COREMOTION */
|
||||
/* #undef SDL_SENSOR_WINDOWS */
|
||||
#define SDL_SENSOR_DUMMY 1
|
||||
/* #undef SDL_SENSOR_VITA */
|
||||
/* #undef SDL_SENSOR_N3DS */
|
||||
|
||||
/* Enable various shared object loading systems */
|
||||
#define SDL_LOADSO_DLOPEN 1
|
||||
/* #undef SDL_LOADSO_DUMMY */
|
||||
/* #undef SDL_LOADSO_LDG */
|
||||
/* #undef SDL_LOADSO_WINDOWS */
|
||||
/* #undef SDL_LOADSO_OS2 */
|
||||
|
||||
/* Enable various threading systems */
|
||||
/* #undef SDL_THREAD_GENERIC_COND_SUFFIX */
|
||||
#define SDL_THREAD_PTHREAD 1
|
||||
#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1
|
||||
/* #undef SDL_THREAD_PTHREAD_RECURSIVE_MUTEX_NP */
|
||||
/* #undef SDL_THREAD_WINDOWS */
|
||||
/* #undef SDL_THREAD_OS2 */
|
||||
/* #undef SDL_THREAD_VITA */
|
||||
/* #undef SDL_THREAD_PSP */
|
||||
/* #undef SDL_THREAD_PS2 */
|
||||
/* #undef SDL_THREAD_N3DS */
|
||||
|
||||
/* Enable various timer systems */
|
||||
/* #undef SDL_TIMER_HAIKU */
|
||||
/* #undef SDL_TIMER_DUMMY */
|
||||
#define SDL_TIMER_UNIX 1
|
||||
/* #undef SDL_TIMER_WINDOWS */
|
||||
/* #undef SDL_TIMER_OS2 */
|
||||
/* #undef SDL_TIMER_VITA */
|
||||
/* #undef SDL_TIMER_PSP */
|
||||
/* #undef SDL_TIMER_PS2 */
|
||||
/* #undef SDL_TIMER_N3DS */
|
||||
|
||||
/* Enable various video drivers */
|
||||
/* #undef SDL_VIDEO_DRIVER_ANDROID */
|
||||
/* #undef SDL_VIDEO_DRIVER_EMSCRIPTEN */
|
||||
/* #undef SDL_VIDEO_DRIVER_HAIKU */
|
||||
/* #undef SDL_VIDEO_DRIVER_COCOA */
|
||||
/* #undef SDL_VIDEO_DRIVER_UIKIT */
|
||||
/* #undef SDL_VIDEO_DRIVER_DIRECTFB */
|
||||
/* #undef SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC */
|
||||
#define SDL_VIDEO_DRIVER_DUMMY 1
|
||||
#define SDL_VIDEO_DRIVER_OFFSCREEN 1
|
||||
/* #undef SDL_VIDEO_DRIVER_WINDOWS */
|
||||
/* #undef SDL_VIDEO_DRIVER_WINRT */
|
||||
#define SDL_VIDEO_DRIVER_WAYLAND 1
|
||||
/* #undef SDL_VIDEO_DRIVER_RPI */
|
||||
/* #undef SDL_VIDEO_DRIVER_VIVANTE */
|
||||
/* #undef SDL_VIDEO_DRIVER_VIVANTE_VDK */
|
||||
/* #undef SDL_VIDEO_DRIVER_OS2 */
|
||||
/* #undef SDL_VIDEO_DRIVER_QNX */
|
||||
/* #undef SDL_VIDEO_DRIVER_RISCOS */
|
||||
/* #undef SDL_VIDEO_DRIVER_PSP */
|
||||
/* #undef SDL_VIDEO_DRIVER_PS2 */
|
||||
|
||||
/* #undef SDL_VIDEO_DRIVER_KMSDRM */
|
||||
/* #undef SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC */
|
||||
/* #undef SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC_GBM */
|
||||
|
||||
#define SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH 1
|
||||
#define SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC "libwayland-client.so.0"
|
||||
#define SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL "libwayland-egl.so.1"
|
||||
#define SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR "libwayland-cursor.so.0"
|
||||
#define SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON "libxkbcommon.so.0"
|
||||
/* #undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR */
|
||||
|
||||
#define SDL_VIDEO_DRIVER_X11 1
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC "libX11.so.6"
|
||||
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT "libXext.so.6"
|
||||
/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR */
|
||||
/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 */
|
||||
/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XFIXES */
|
||||
/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR */
|
||||
/* #undef SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS */
|
||||
/* #undef SDL_VIDEO_DRIVER_X11_XCURSOR */
|
||||
#define SDL_VIDEO_DRIVER_X11_XDBE 1
|
||||
/* #undef SDL_VIDEO_DRIVER_X11_XINPUT2 */
|
||||
/* #undef SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH */
|
||||
/* #undef SDL_VIDEO_DRIVER_X11_XFIXES */
|
||||
/* #undef SDL_VIDEO_DRIVER_X11_XRANDR */
|
||||
/* #undef SDL_VIDEO_DRIVER_X11_XSCRNSAVER */
|
||||
#define SDL_VIDEO_DRIVER_X11_XSHAPE 1
|
||||
#define SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS 1
|
||||
#define SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM 1
|
||||
/* #undef SDL_VIDEO_DRIVER_VITA */
|
||||
/* #undef SDL_VIDEO_DRIVER_N3DS */
|
||||
|
||||
/* #undef SDL_VIDEO_RENDER_D3D */
|
||||
/* #undef SDL_VIDEO_RENDER_D3D11 */
|
||||
/* #undef SDL_VIDEO_RENDER_D3D12 */
|
||||
#define SDL_VIDEO_RENDER_OGL 1
|
||||
#define SDL_VIDEO_RENDER_OGL_ES 1
|
||||
#define SDL_VIDEO_RENDER_OGL_ES2 1
|
||||
/* #undef SDL_VIDEO_RENDER_DIRECTFB */
|
||||
/* #undef SDL_VIDEO_RENDER_METAL */
|
||||
/* #undef SDL_VIDEO_RENDER_VITA_GXM */
|
||||
/* #undef SDL_VIDEO_RENDER_PS2 */
|
||||
/* #undef SDL_VIDEO_RENDER_PSP */
|
||||
|
||||
/* Enable OpenGL support */
|
||||
#define SDL_VIDEO_OPENGL 1
|
||||
#define SDL_VIDEO_OPENGL_ES 1
|
||||
#define SDL_VIDEO_OPENGL_ES2 1
|
||||
/* #undef SDL_VIDEO_OPENGL_BGL */
|
||||
/* #undef SDL_VIDEO_OPENGL_CGL */
|
||||
#define SDL_VIDEO_OPENGL_GLX 1
|
||||
/* #undef SDL_VIDEO_OPENGL_WGL */
|
||||
#define SDL_VIDEO_OPENGL_EGL 1
|
||||
/* #undef SDL_VIDEO_OPENGL_OSMESA */
|
||||
/* #undef SDL_VIDEO_OPENGL_OSMESA_DYNAMIC */
|
||||
|
||||
/* Enable Vulkan support */
|
||||
#define SDL_VIDEO_VULKAN 1
|
||||
|
||||
/* Enable Metal support */
|
||||
/* #undef SDL_VIDEO_METAL */
|
||||
|
||||
/* Enable system power support */
|
||||
/* #undef SDL_POWER_ANDROID */
|
||||
#define SDL_POWER_LINUX 1
|
||||
/* #undef SDL_POWER_WINDOWS */
|
||||
/* #undef SDL_POWER_WINRT */
|
||||
/* #undef SDL_POWER_MACOSX */
|
||||
/* #undef SDL_POWER_UIKIT */
|
||||
/* #undef SDL_POWER_HAIKU */
|
||||
/* #undef SDL_POWER_EMSCRIPTEN */
|
||||
/* #undef SDL_POWER_HARDWIRED */
|
||||
/* #undef SDL_POWER_VITA */
|
||||
/* #undef SDL_POWER_PSP */
|
||||
/* #undef SDL_POWER_N3DS */
|
||||
|
||||
/* Enable system filesystem support */
|
||||
/* #undef SDL_FILESYSTEM_ANDROID */
|
||||
/* #undef SDL_FILESYSTEM_HAIKU */
|
||||
/* #undef SDL_FILESYSTEM_COCOA */
|
||||
/* #undef SDL_FILESYSTEM_DUMMY */
|
||||
/* #undef SDL_FILESYSTEM_RISCOS */
|
||||
#define SDL_FILESYSTEM_UNIX 1
|
||||
/* #undef SDL_FILESYSTEM_WINDOWS */
|
||||
/* #undef SDL_FILESYSTEM_EMSCRIPTEN */
|
||||
/* #undef SDL_FILESYSTEM_OS2 */
|
||||
/* #undef SDL_FILESYSTEM_VITA */
|
||||
/* #undef SDL_FILESYSTEM_PSP */
|
||||
/* #undef SDL_FILESYSTEM_PS2 */
|
||||
/* #undef SDL_FILESYSTEM_N3DS */
|
||||
|
||||
/* Enable misc subsystem */
|
||||
/* #undef SDL_MISC_DUMMY */
|
||||
|
||||
/* Enable locale subsystem */
|
||||
/* #undef SDL_LOCALE_DUMMY */
|
||||
|
||||
/* Enable assembly routines */
|
||||
/* #undef SDL_ALTIVEC_BLITTERS */
|
||||
/* #undef SDL_ARM_SIMD_BLITTERS */
|
||||
/* #undef SDL_ARM_NEON_BLITTERS */
|
||||
|
||||
/* Whether SDL_DYNAMIC_API needs dlopen */
|
||||
#define DYNAPI_NEEDS_DLOPEN 1
|
||||
|
||||
/* Enable dynamic libsamplerate support */
|
||||
/* #undef SDL_LIBSAMPLERATE_DYNAMIC */
|
||||
|
||||
/* Enable ime support */
|
||||
/* #undef SDL_USE_IME */
|
||||
|
||||
/* Platform specific definitions */
|
||||
/* #undef SDL_IPHONE_KEYBOARD */
|
||||
/* #undef SDL_IPHONE_LAUNCHSCREEN */
|
||||
|
||||
/* #undef SDL_VIDEO_VITA_PIB */
|
||||
/* #undef SDL_VIDEO_VITA_PVR */
|
||||
/* #undef SDL_VIDEO_VITA_PVR_OGL */
|
||||
|
||||
/* #undef SDL_HAVE_LIBDECOR_GET_MIN_MAX */
|
||||
|
||||
#if !defined(HAVE_STDINT_H) && !defined(_STDINT_H_)
|
||||
/* Most everything except Visual Studio 2008 and earlier has stdint.h now */
|
||||
#if defined(_MSC_VER) && (_MSC_VER < 1600)
|
||||
typedef signed __int8 int8_t;
|
||||
typedef unsigned __int8 uint8_t;
|
||||
typedef signed __int16 int16_t;
|
||||
typedef unsigned __int16 uint16_t;
|
||||
typedef signed __int32 int32_t;
|
||||
typedef unsigned __int32 uint32_t;
|
||||
typedef signed __int64 int64_t;
|
||||
typedef unsigned __int64 uint64_t;
|
||||
#ifndef _UINTPTR_T_DEFINED
|
||||
#ifdef _WIN64
|
||||
typedef unsigned __int64 uintptr_t;
|
||||
#else
|
||||
typedef unsigned int uintptr_t;
|
||||
#endif
|
||||
#define _UINTPTR_T_DEFINED
|
||||
#endif
|
||||
#endif /* Visual Studio 2008 */
|
||||
#endif /* !_STDINT_H_ && !HAVE_STDINT_H */
|
||||
|
||||
#endif /* SDL_config_h_ */
|
||||
234
build-tests/Libraries/SDL/include/SDL2/SDL.h
Normal file
234
build-tests/Libraries/SDL/include/SDL2/SDL.h
Normal file
@ -0,0 +1,234 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file SDL.h
|
||||
*
|
||||
* Main include header for the SDL library
|
||||
*/
|
||||
|
||||
#ifndef SDL_h_
|
||||
#define SDL_h_
|
||||
|
||||
#include "SDL_main.h"
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_assert.h"
|
||||
#include "SDL_atomic.h"
|
||||
#include "SDL_audio.h"
|
||||
#include "SDL_clipboard.h"
|
||||
#include "SDL_cpuinfo.h"
|
||||
#include "SDL_endian.h"
|
||||
#include "SDL_error.h"
|
||||
#include "SDL_events.h"
|
||||
#include "SDL_filesystem.h"
|
||||
#include "SDL_gamecontroller.h"
|
||||
#include "SDL_guid.h"
|
||||
#include "SDL_haptic.h"
|
||||
#include "SDL_hidapi.h"
|
||||
#include "SDL_hints.h"
|
||||
#include "SDL_joystick.h"
|
||||
#include "SDL_loadso.h"
|
||||
#include "SDL_log.h"
|
||||
#include "SDL_messagebox.h"
|
||||
#include "SDL_metal.h"
|
||||
#include "SDL_mutex.h"
|
||||
#include "SDL_power.h"
|
||||
#include "SDL_render.h"
|
||||
#include "SDL_rwops.h"
|
||||
#include "SDL_sensor.h"
|
||||
#include "SDL_shape.h"
|
||||
#include "SDL_system.h"
|
||||
#include "SDL_thread.h"
|
||||
#include "SDL_timer.h"
|
||||
#include "SDL_version.h"
|
||||
#include "SDL_video.h"
|
||||
#include "SDL_locale.h"
|
||||
#include "SDL_misc.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* WIKI CATEGORY: Init */
|
||||
|
||||
/* As of version 0.5, SDL is loaded dynamically into the application */
|
||||
|
||||
/**
|
||||
* \name SDL_INIT_*
|
||||
*
|
||||
* These are the flags which may be passed to SDL_Init(). You should
|
||||
* specify the subsystems which you will be using in your application.
|
||||
*/
|
||||
/* @{ */
|
||||
#define SDL_INIT_TIMER 0x00000001u
|
||||
#define SDL_INIT_AUDIO 0x00000010u
|
||||
#define SDL_INIT_VIDEO 0x00000020u /**< SDL_INIT_VIDEO implies SDL_INIT_EVENTS */
|
||||
#define SDL_INIT_JOYSTICK 0x00000200u /**< SDL_INIT_JOYSTICK implies SDL_INIT_EVENTS */
|
||||
#define SDL_INIT_HAPTIC 0x00001000u
|
||||
#define SDL_INIT_GAMECONTROLLER 0x00002000u /**< SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK */
|
||||
#define SDL_INIT_EVENTS 0x00004000u
|
||||
#define SDL_INIT_SENSOR 0x00008000u
|
||||
#define SDL_INIT_NOPARACHUTE 0x00100000u /**< compatibility; this flag is ignored. */
|
||||
#define SDL_INIT_EVERYTHING ( \
|
||||
SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_EVENTS | \
|
||||
SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER | SDL_INIT_SENSOR \
|
||||
)
|
||||
/* @} */
|
||||
|
||||
/**
|
||||
* Initialize the SDL library.
|
||||
*
|
||||
* SDL_Init() simply forwards to calling SDL_InitSubSystem(). Therefore, the
|
||||
* two may be used interchangeably. Though for readability of your code
|
||||
* SDL_InitSubSystem() might be preferred.
|
||||
*
|
||||
* The file I/O (for example: SDL_RWFromFile) and threading (SDL_CreateThread)
|
||||
* subsystems are initialized by default. Message boxes
|
||||
* (SDL_ShowSimpleMessageBox) also attempt to work without initializing the
|
||||
* video subsystem, in hopes of being useful in showing an error dialog when
|
||||
* SDL_Init fails. You must specifically initialize other subsystems if you
|
||||
* use them in your application.
|
||||
*
|
||||
* Logging (such as SDL_Log) works without initialization, too.
|
||||
*
|
||||
* `flags` may be any of the following OR'd together:
|
||||
*
|
||||
* - `SDL_INIT_TIMER`: timer subsystem
|
||||
* - `SDL_INIT_AUDIO`: audio subsystem
|
||||
* - `SDL_INIT_VIDEO`: video subsystem; automatically initializes the events
|
||||
* subsystem
|
||||
* - `SDL_INIT_JOYSTICK`: joystick subsystem; automatically initializes the
|
||||
* events subsystem
|
||||
* - `SDL_INIT_HAPTIC`: haptic (force feedback) subsystem
|
||||
* - `SDL_INIT_GAMECONTROLLER`: controller subsystem; automatically
|
||||
* initializes the joystick subsystem
|
||||
* - `SDL_INIT_EVENTS`: events subsystem
|
||||
* - `SDL_INIT_EVERYTHING`: all of the above subsystems
|
||||
* - `SDL_INIT_NOPARACHUTE`: compatibility; this flag is ignored
|
||||
*
|
||||
* Subsystem initialization is ref-counted, you must call SDL_QuitSubSystem()
|
||||
* for each SDL_InitSubSystem() to correctly shutdown a subsystem manually (or
|
||||
* call SDL_Quit() to force shutdown). If a subsystem is already loaded then
|
||||
* this call will increase the ref-count and return.
|
||||
*
|
||||
* \param flags subsystem initialization flags.
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_InitSubSystem
|
||||
* \sa SDL_Quit
|
||||
* \sa SDL_SetMainReady
|
||||
* \sa SDL_WasInit
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags);
|
||||
|
||||
/**
|
||||
* Compatibility function to initialize the SDL library.
|
||||
*
|
||||
* In SDL2, this function and SDL_Init() are interchangeable.
|
||||
*
|
||||
* \param flags any of the flags used by SDL_Init(); see SDL_Init for details.
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_Init
|
||||
* \sa SDL_Quit
|
||||
* \sa SDL_QuitSubSystem
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags);
|
||||
|
||||
/**
|
||||
* Shut down specific SDL subsystems.
|
||||
*
|
||||
* If you start a subsystem using a call to that subsystem's init function
|
||||
* (for example SDL_VideoInit()) instead of SDL_Init() or SDL_InitSubSystem(),
|
||||
* SDL_QuitSubSystem() and SDL_WasInit() will not work. You will need to use
|
||||
* that subsystem's quit function (SDL_VideoQuit()) directly instead. But
|
||||
* generally, you should not be using those functions directly anyhow; use
|
||||
* SDL_Init() instead.
|
||||
*
|
||||
* You still need to call SDL_Quit() even if you close all open subsystems
|
||||
* with SDL_QuitSubSystem().
|
||||
*
|
||||
* \param flags any of the flags used by SDL_Init(); see SDL_Init for details.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_InitSubSystem
|
||||
* \sa SDL_Quit
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_QuitSubSystem(Uint32 flags);
|
||||
|
||||
/**
|
||||
* Get a mask of the specified subsystems which are currently initialized.
|
||||
*
|
||||
* \param flags any of the flags used by SDL_Init(); see SDL_Init for details.
|
||||
* \returns a mask of all initialized subsystems if `flags` is 0, otherwise it
|
||||
* returns the initialization status of the specified subsystems.
|
||||
*
|
||||
* The return value does not include SDL_INIT_NOPARACHUTE.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_Init
|
||||
* \sa SDL_InitSubSystem
|
||||
*/
|
||||
extern DECLSPEC Uint32 SDLCALL SDL_WasInit(Uint32 flags);
|
||||
|
||||
/**
|
||||
* Clean up all initialized subsystems.
|
||||
*
|
||||
* You should call this function even if you have already shutdown each
|
||||
* initialized subsystem with SDL_QuitSubSystem(). It is safe to call this
|
||||
* function even in the case of errors in initialization.
|
||||
*
|
||||
* If you start a subsystem using a call to that subsystem's init function
|
||||
* (for example SDL_VideoInit()) instead of SDL_Init() or SDL_InitSubSystem(),
|
||||
* then you must use that subsystem's quit function (SDL_VideoQuit()) to shut
|
||||
* it down before calling SDL_Quit(). But generally, you should not be using
|
||||
* those functions directly anyhow; use SDL_Init() instead.
|
||||
*
|
||||
* You can use this function with atexit() to ensure that it is run when your
|
||||
* application is shutdown, but it is not wise to do this from a library or
|
||||
* other dynamically loaded code.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_Init
|
||||
* \sa SDL_QuitSubSystem
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_Quit(void);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* SDL_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
324
build-tests/Libraries/SDL/include/SDL2/SDL_assert.h
Normal file
324
build-tests/Libraries/SDL/include/SDL2/SDL_assert.h
Normal file
@ -0,0 +1,324 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
#ifndef SDL_assert_h_
|
||||
#define SDL_assert_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef SDL_ASSERT_LEVEL
|
||||
#ifdef SDL_DEFAULT_ASSERT_LEVEL
|
||||
#define SDL_ASSERT_LEVEL SDL_DEFAULT_ASSERT_LEVEL
|
||||
#elif defined(_DEBUG) || defined(DEBUG) || \
|
||||
(defined(__GNUC__) && !defined(__OPTIMIZE__))
|
||||
#define SDL_ASSERT_LEVEL 2
|
||||
#else
|
||||
#define SDL_ASSERT_LEVEL 1
|
||||
#endif
|
||||
#endif /* SDL_ASSERT_LEVEL */
|
||||
|
||||
/*
|
||||
These are macros and not first class functions so that the debugger breaks
|
||||
on the assertion line and not in some random guts of SDL, and so each
|
||||
assert can have unique static variables associated with it.
|
||||
*/
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
/* Don't include intrin.h here because it contains C++ code */
|
||||
extern void __cdecl __debugbreak(void);
|
||||
#define SDL_TriggerBreakpoint() __debugbreak()
|
||||
#elif _SDL_HAS_BUILTIN(__builtin_debugtrap)
|
||||
#define SDL_TriggerBreakpoint() __builtin_debugtrap()
|
||||
#elif ( (!defined(__NACL__)) && ((defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))) )
|
||||
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" )
|
||||
#elif (defined(__GNUC__) || defined(__clang__)) && defined(__riscv)
|
||||
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "ebreak\n\t" )
|
||||
#elif ( defined(__APPLE__) && (defined(__arm64__) || defined(__aarch64__)) ) /* this might work on other ARM targets, but this is a known quantity... */
|
||||
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "brk #22\n\t" )
|
||||
#elif defined(__APPLE__) && defined(__arm__)
|
||||
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "bkpt #22\n\t" )
|
||||
#elif defined(_WIN32) && ((defined(__GNUC__) || defined(__clang__)) && (defined(__arm64__) || defined(__aarch64__)) )
|
||||
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "brk #0xF000\n\t" )
|
||||
#elif defined(__386__) && defined(__WATCOMC__)
|
||||
#define SDL_TriggerBreakpoint() { _asm { int 0x03 } }
|
||||
#elif defined(HAVE_SIGNAL_H) && !defined(__WATCOMC__)
|
||||
#include <signal.h>
|
||||
#define SDL_TriggerBreakpoint() raise(SIGTRAP)
|
||||
#else
|
||||
/* How do we trigger breakpoints on this platform? */
|
||||
#define SDL_TriggerBreakpoint()
|
||||
#endif
|
||||
|
||||
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) /* C99 supports __func__ as a standard. */
|
||||
# define SDL_FUNCTION __func__
|
||||
#elif ((defined(__GNUC__) && (__GNUC__ >= 2)) || defined(_MSC_VER) || defined (__WATCOMC__))
|
||||
# define SDL_FUNCTION __FUNCTION__
|
||||
#else
|
||||
# define SDL_FUNCTION "???"
|
||||
#endif
|
||||
#define SDL_FILE __FILE__
|
||||
#define SDL_LINE __LINE__
|
||||
|
||||
/*
|
||||
sizeof (x) makes the compiler still parse the expression even without
|
||||
assertions enabled, so the code is always checked at compile time, but
|
||||
doesn't actually generate code for it, so there are no side effects or
|
||||
expensive checks at run time, just the constant size of what x WOULD be,
|
||||
which presumably gets optimized out as unused.
|
||||
This also solves the problem of...
|
||||
|
||||
int somevalue = blah();
|
||||
SDL_assert(somevalue == 1);
|
||||
|
||||
...which would cause compiles to complain that somevalue is unused if we
|
||||
disable assertions.
|
||||
*/
|
||||
|
||||
/* "while (0,0)" fools Microsoft's compiler's /W4 warning level into thinking
|
||||
this condition isn't constant. And looks like an owl's face! */
|
||||
#ifdef _MSC_VER /* stupid /W4 warnings. */
|
||||
#define SDL_NULL_WHILE_LOOP_CONDITION (0,0)
|
||||
#else
|
||||
#define SDL_NULL_WHILE_LOOP_CONDITION (0)
|
||||
#endif
|
||||
|
||||
#define SDL_disabled_assert(condition) \
|
||||
do { (void) sizeof ((condition)); } while (SDL_NULL_WHILE_LOOP_CONDITION)
|
||||
|
||||
typedef enum
|
||||
{
|
||||
SDL_ASSERTION_RETRY, /**< Retry the assert immediately. */
|
||||
SDL_ASSERTION_BREAK, /**< Make the debugger trigger a breakpoint. */
|
||||
SDL_ASSERTION_ABORT, /**< Terminate the program. */
|
||||
SDL_ASSERTION_IGNORE, /**< Ignore the assert. */
|
||||
SDL_ASSERTION_ALWAYS_IGNORE /**< Ignore the assert from now on. */
|
||||
} SDL_AssertState;
|
||||
|
||||
typedef struct SDL_AssertData
|
||||
{
|
||||
int always_ignore;
|
||||
unsigned int trigger_count;
|
||||
const char *condition;
|
||||
const char *filename;
|
||||
int linenum;
|
||||
const char *function;
|
||||
const struct SDL_AssertData *next;
|
||||
} SDL_AssertData;
|
||||
|
||||
/* Never call this directly. Use the SDL_assert* macros. */
|
||||
extern DECLSPEC SDL_AssertState SDLCALL SDL_ReportAssertion(SDL_AssertData *,
|
||||
const char *,
|
||||
const char *, int)
|
||||
#if defined(__clang__)
|
||||
#if __has_feature(attribute_analyzer_noreturn)
|
||||
/* this tells Clang's static analysis that we're a custom assert function,
|
||||
and that the analyzer should assume the condition was always true past this
|
||||
SDL_assert test. */
|
||||
__attribute__((analyzer_noreturn))
|
||||
#endif
|
||||
#endif
|
||||
;
|
||||
|
||||
/* the do {} while(0) avoids dangling else problems:
|
||||
if (x) SDL_assert(y); else blah();
|
||||
... without the do/while, the "else" could attach to this macro's "if".
|
||||
We try to handle just the minimum we need here in a macro...the loop,
|
||||
the static vars, and break points. The heavy lifting is handled in
|
||||
SDL_ReportAssertion(), in SDL_assert.c.
|
||||
*/
|
||||
#define SDL_enabled_assert(condition) \
|
||||
do { \
|
||||
while ( !(condition) ) { \
|
||||
static struct SDL_AssertData sdl_assert_data = { 0, 0, #condition, NULL, 0, NULL, NULL }; \
|
||||
const SDL_AssertState sdl_assert_state = SDL_ReportAssertion(&sdl_assert_data, SDL_FUNCTION, SDL_FILE, SDL_LINE); \
|
||||
if (sdl_assert_state == SDL_ASSERTION_RETRY) { \
|
||||
continue; /* go again. */ \
|
||||
} else if (sdl_assert_state == SDL_ASSERTION_BREAK) { \
|
||||
SDL_TriggerBreakpoint(); \
|
||||
} \
|
||||
break; /* not retrying. */ \
|
||||
} \
|
||||
} while (SDL_NULL_WHILE_LOOP_CONDITION)
|
||||
|
||||
/* Enable various levels of assertions. */
|
||||
#if SDL_ASSERT_LEVEL == 0 /* assertions disabled */
|
||||
# define SDL_assert(condition) SDL_disabled_assert(condition)
|
||||
# define SDL_assert_release(condition) SDL_disabled_assert(condition)
|
||||
# define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)
|
||||
#elif SDL_ASSERT_LEVEL == 1 /* release settings. */
|
||||
# define SDL_assert(condition) SDL_disabled_assert(condition)
|
||||
# define SDL_assert_release(condition) SDL_enabled_assert(condition)
|
||||
# define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)
|
||||
#elif SDL_ASSERT_LEVEL == 2 /* normal settings. */
|
||||
# define SDL_assert(condition) SDL_enabled_assert(condition)
|
||||
# define SDL_assert_release(condition) SDL_enabled_assert(condition)
|
||||
# define SDL_assert_paranoid(condition) SDL_disabled_assert(condition)
|
||||
#elif SDL_ASSERT_LEVEL == 3 /* paranoid settings. */
|
||||
# define SDL_assert(condition) SDL_enabled_assert(condition)
|
||||
# define SDL_assert_release(condition) SDL_enabled_assert(condition)
|
||||
# define SDL_assert_paranoid(condition) SDL_enabled_assert(condition)
|
||||
#else
|
||||
# error Unknown assertion level.
|
||||
#endif
|
||||
|
||||
/* this assertion is never disabled at any level. */
|
||||
#define SDL_assert_always(condition) SDL_enabled_assert(condition)
|
||||
|
||||
|
||||
/**
|
||||
* A callback that fires when an SDL assertion fails.
|
||||
*
|
||||
* \param data a pointer to the SDL_AssertData structure corresponding to the
|
||||
* current assertion.
|
||||
* \param userdata what was passed as `userdata` to SDL_SetAssertionHandler().
|
||||
* \returns an SDL_AssertState value indicating how to handle the failure.
|
||||
*/
|
||||
typedef SDL_AssertState (SDLCALL *SDL_AssertionHandler)(
|
||||
const SDL_AssertData* data, void* userdata);
|
||||
|
||||
/**
|
||||
* Set an application-defined assertion handler.
|
||||
*
|
||||
* This function allows an application to show its own assertion UI and/or
|
||||
* force the response to an assertion failure. If the application doesn't
|
||||
* provide this, SDL will try to do the right thing, popping up a
|
||||
* system-specific GUI dialog, and probably minimizing any fullscreen windows.
|
||||
*
|
||||
* This callback may fire from any thread, but it runs wrapped in a mutex, so
|
||||
* it will only fire from one thread at a time.
|
||||
*
|
||||
* This callback is NOT reset to SDL's internal handler upon SDL_Quit()!
|
||||
*
|
||||
* \param handler the SDL_AssertionHandler function to call when an assertion
|
||||
* fails or NULL for the default handler.
|
||||
* \param userdata a pointer that is passed to `handler`.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GetAssertionHandler
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_SetAssertionHandler(
|
||||
SDL_AssertionHandler handler,
|
||||
void *userdata);
|
||||
|
||||
/**
|
||||
* Get the default assertion handler.
|
||||
*
|
||||
* This returns the function pointer that is called by default when an
|
||||
* assertion is triggered. This is an internal function provided by SDL, that
|
||||
* is used for assertions when SDL_SetAssertionHandler() hasn't been used to
|
||||
* provide a different function.
|
||||
*
|
||||
* \returns the default SDL_AssertionHandler that is called when an assert
|
||||
* triggers.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.2.
|
||||
*
|
||||
* \sa SDL_GetAssertionHandler
|
||||
*/
|
||||
extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetDefaultAssertionHandler(void);
|
||||
|
||||
/**
|
||||
* Get the current assertion handler.
|
||||
*
|
||||
* This returns the function pointer that is called when an assertion is
|
||||
* triggered. This is either the value last passed to
|
||||
* SDL_SetAssertionHandler(), or if no application-specified function is set,
|
||||
* is equivalent to calling SDL_GetDefaultAssertionHandler().
|
||||
*
|
||||
* The parameter `puserdata` is a pointer to a void*, which will store the
|
||||
* "userdata" pointer that was passed to SDL_SetAssertionHandler(). This value
|
||||
* will always be NULL for the default handler. If you don't care about this
|
||||
* data, it is safe to pass a NULL pointer to this function to ignore it.
|
||||
*
|
||||
* \param puserdata pointer which is filled with the "userdata" pointer that
|
||||
* was passed to SDL_SetAssertionHandler().
|
||||
* \returns the SDL_AssertionHandler that is called when an assert triggers.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.2.
|
||||
*
|
||||
* \sa SDL_SetAssertionHandler
|
||||
*/
|
||||
extern DECLSPEC SDL_AssertionHandler SDLCALL SDL_GetAssertionHandler(void **puserdata);
|
||||
|
||||
/**
|
||||
* Get a list of all assertion failures.
|
||||
*
|
||||
* This function gets all assertions triggered since the last call to
|
||||
* SDL_ResetAssertionReport(), or the start of the program.
|
||||
*
|
||||
* The proper way to examine this data looks something like this:
|
||||
*
|
||||
* ```c
|
||||
* const SDL_AssertData *item = SDL_GetAssertionReport();
|
||||
* while (item) {
|
||||
* printf("'%s', %s (%s:%d), triggered %u times, always ignore: %s.\\n",
|
||||
* item->condition, item->function, item->filename,
|
||||
* item->linenum, item->trigger_count,
|
||||
* item->always_ignore ? "yes" : "no");
|
||||
* item = item->next;
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* \returns a list of all failed assertions or NULL if the list is empty. This
|
||||
* memory should not be modified or freed by the application.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_ResetAssertionReport
|
||||
*/
|
||||
extern DECLSPEC const SDL_AssertData * SDLCALL SDL_GetAssertionReport(void);
|
||||
|
||||
/**
|
||||
* Clear the list of all assertion failures.
|
||||
*
|
||||
* This function will clear the list of all assertions triggered up to that
|
||||
* point. Immediately following this call, SDL_GetAssertionReport will return
|
||||
* no items. In addition, any previously-triggered assertions will be reset to
|
||||
* a trigger_count of zero, and their always_ignore state will be false.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GetAssertionReport
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_ResetAssertionReport(void);
|
||||
|
||||
|
||||
/* these had wrong naming conventions until 2.0.4. Please update your app! */
|
||||
#define SDL_assert_state SDL_AssertState
|
||||
#define SDL_assert_data SDL_AssertData
|
||||
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* SDL_assert_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
408
build-tests/Libraries/SDL/include/SDL2/SDL_atomic.h
Normal file
408
build-tests/Libraries/SDL/include/SDL2/SDL_atomic.h
Normal file
@ -0,0 +1,408 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* # CategoryAtomic
|
||||
*
|
||||
* Atomic operations.
|
||||
*
|
||||
* IMPORTANT: If you are not an expert in concurrent lockless programming, you
|
||||
* should not be using any functions in this file. You should be protecting
|
||||
* your data structures with full mutexes instead.
|
||||
*
|
||||
* ***Seriously, here be dragons!***
|
||||
*
|
||||
* You can find out a little more about lockless programming and the subtle
|
||||
* issues that can arise here:
|
||||
* https://learn.microsoft.com/en-us/windows/win32/dxtecharts/lockless-programming
|
||||
*
|
||||
* There's also lots of good information here:
|
||||
*
|
||||
* - https://www.1024cores.net/home/lock-free-algorithms
|
||||
* - https://preshing.com/
|
||||
*
|
||||
* These operations may or may not actually be implemented using processor
|
||||
* specific atomic operations. When possible they are implemented as true
|
||||
* processor specific atomic operations. When that is not possible the are
|
||||
* implemented using locks that *do* use the available atomic operations.
|
||||
*
|
||||
* All of the atomic operations that modify memory are full memory barriers.
|
||||
*/
|
||||
|
||||
#ifndef SDL_atomic_h_
|
||||
#define SDL_atomic_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_platform.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \name SDL AtomicLock
|
||||
*
|
||||
* The atomic locks are efficient spinlocks using CPU instructions,
|
||||
* but are vulnerable to starvation and can spin forever if a thread
|
||||
* holding a lock has been terminated. For this reason you should
|
||||
* minimize the code executed inside an atomic lock and never do
|
||||
* expensive things like API or system calls while holding them.
|
||||
*
|
||||
* The atomic locks are not safe to lock recursively.
|
||||
*
|
||||
* Porting Note:
|
||||
* The spin lock functions and type are required and can not be
|
||||
* emulated because they are used in the atomic emulation code.
|
||||
*/
|
||||
/* @{ */
|
||||
|
||||
typedef int SDL_SpinLock;
|
||||
|
||||
/**
|
||||
* Try to lock a spin lock by setting it to a non-zero value.
|
||||
*
|
||||
* ***Please note that spinlocks are dangerous if you don't know what you're
|
||||
* doing. Please be careful using any sort of spinlock!***
|
||||
*
|
||||
* \param lock a pointer to a lock variable.
|
||||
* \returns SDL_TRUE if the lock succeeded, SDL_FALSE if the lock is already
|
||||
* held.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_AtomicLock
|
||||
* \sa SDL_AtomicUnlock
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_AtomicTryLock(SDL_SpinLock *lock);
|
||||
|
||||
/**
|
||||
* Lock a spin lock by setting it to a non-zero value.
|
||||
*
|
||||
* ***Please note that spinlocks are dangerous if you don't know what you're
|
||||
* doing. Please be careful using any sort of spinlock!***
|
||||
*
|
||||
* \param lock a pointer to a lock variable.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_AtomicTryLock
|
||||
* \sa SDL_AtomicUnlock
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_AtomicLock(SDL_SpinLock *lock);
|
||||
|
||||
/**
|
||||
* Unlock a spin lock by setting it to 0.
|
||||
*
|
||||
* Always returns immediately.
|
||||
*
|
||||
* ***Please note that spinlocks are dangerous if you don't know what you're
|
||||
* doing. Please be careful using any sort of spinlock!***
|
||||
*
|
||||
* \param lock a pointer to a lock variable.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_AtomicLock
|
||||
* \sa SDL_AtomicTryLock
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_AtomicUnlock(SDL_SpinLock *lock);
|
||||
|
||||
/* @} *//* SDL AtomicLock */
|
||||
|
||||
|
||||
/**
|
||||
* The compiler barrier prevents the compiler from reordering
|
||||
* reads and writes to globally visible variables across the call.
|
||||
*/
|
||||
#if defined(_MSC_VER) && (_MSC_VER > 1200) && !defined(__clang__)
|
||||
void _ReadWriteBarrier(void);
|
||||
#pragma intrinsic(_ReadWriteBarrier)
|
||||
#define SDL_CompilerBarrier() _ReadWriteBarrier()
|
||||
#elif (defined(__GNUC__) && !defined(__EMSCRIPTEN__)) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5120))
|
||||
/* This is correct for all CPUs when using GCC or Solaris Studio 12.1+. */
|
||||
#define SDL_CompilerBarrier() __asm__ __volatile__ ("" : : : "memory")
|
||||
#elif defined(__WATCOMC__)
|
||||
extern __inline void SDL_CompilerBarrier(void);
|
||||
#pragma aux SDL_CompilerBarrier = "" parm [] modify exact [];
|
||||
#else
|
||||
#define SDL_CompilerBarrier() \
|
||||
{ SDL_SpinLock _tmp = 0; SDL_AtomicLock(&_tmp); SDL_AtomicUnlock(&_tmp); }
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Memory barriers are designed to prevent reads and writes from being
|
||||
* reordered by the compiler and being seen out of order on multi-core CPUs.
|
||||
*
|
||||
* A typical pattern would be for thread A to write some data and a flag, and
|
||||
* for thread B to read the flag and get the data. In this case you would
|
||||
* insert a release barrier between writing the data and the flag,
|
||||
* guaranteeing that the data write completes no later than the flag is
|
||||
* written, and you would insert an acquire barrier between reading the flag
|
||||
* and reading the data, to ensure that all the reads associated with the flag
|
||||
* have completed.
|
||||
*
|
||||
* In this pattern you should always see a release barrier paired with an
|
||||
* acquire barrier and you should gate the data reads/writes with a single
|
||||
* flag variable.
|
||||
*
|
||||
* For more information on these semantics, take a look at the blog post:
|
||||
* http://preshing.com/20120913/acquire-and-release-semantics
|
||||
*
|
||||
* \since This function is available since SDL 2.0.6.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_MemoryBarrierReleaseFunction(void);
|
||||
extern DECLSPEC void SDLCALL SDL_MemoryBarrierAcquireFunction(void);
|
||||
|
||||
#if defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
|
||||
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("lwsync" : : : "memory")
|
||||
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("lwsync" : : : "memory")
|
||||
#elif defined(__GNUC__) && defined(__aarch64__)
|
||||
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
||||
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
||||
#elif defined(__GNUC__) && defined(__arm__)
|
||||
#if 0 /* defined(__LINUX__) || defined(__ANDROID__) */
|
||||
/* Information from:
|
||||
https://chromium.googlesource.com/chromium/chromium/+/trunk/base/atomicops_internals_arm_gcc.h#19
|
||||
|
||||
The Linux kernel provides a helper function which provides the right code for a memory barrier,
|
||||
hard-coded at address 0xffff0fa0
|
||||
*/
|
||||
typedef void (*SDL_KernelMemoryBarrierFunc)();
|
||||
#define SDL_MemoryBarrierRelease() ((SDL_KernelMemoryBarrierFunc)0xffff0fa0)()
|
||||
#define SDL_MemoryBarrierAcquire() ((SDL_KernelMemoryBarrierFunc)0xffff0fa0)()
|
||||
#elif 0 /* defined(__QNXNTO__) */
|
||||
#include <sys/cpuinline.h>
|
||||
|
||||
#define SDL_MemoryBarrierRelease() __cpu_membarrier()
|
||||
#define SDL_MemoryBarrierAcquire() __cpu_membarrier()
|
||||
#else
|
||||
#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__) || defined(__ARM_ARCH_8A__)
|
||||
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
||||
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
||||
#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__)
|
||||
#ifdef __thumb__
|
||||
/* The mcr instruction isn't available in thumb mode, use real functions */
|
||||
#define SDL_MEMORY_BARRIER_USES_FUNCTION
|
||||
#define SDL_MemoryBarrierRelease() SDL_MemoryBarrierReleaseFunction()
|
||||
#define SDL_MemoryBarrierAcquire() SDL_MemoryBarrierAcquireFunction()
|
||||
#else
|
||||
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" : : "r"(0) : "memory")
|
||||
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("mcr p15, 0, %0, c7, c10, 5" : : "r"(0) : "memory")
|
||||
#endif /* __thumb__ */
|
||||
#else
|
||||
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("" : : : "memory")
|
||||
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("" : : : "memory")
|
||||
#endif /* __LINUX__ || __ANDROID__ */
|
||||
#endif /* __GNUC__ && __arm__ */
|
||||
#else
|
||||
#if (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5120))
|
||||
/* This is correct for all CPUs on Solaris when using Solaris Studio 12.1+. */
|
||||
#include <mbarrier.h>
|
||||
#define SDL_MemoryBarrierRelease() __machine_rel_barrier()
|
||||
#define SDL_MemoryBarrierAcquire() __machine_acq_barrier()
|
||||
#else
|
||||
/* This is correct for the x86 and x64 CPUs, and we'll expand this over time. */
|
||||
#define SDL_MemoryBarrierRelease() SDL_CompilerBarrier()
|
||||
#define SDL_MemoryBarrierAcquire() SDL_CompilerBarrier()
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* "REP NOP" is PAUSE, coded for tools that don't know it by that name. */
|
||||
#if (defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))
|
||||
#define SDL_CPUPauseInstruction() __asm__ __volatile__("pause\n") /* Some assemblers can't do REP NOP, so go with PAUSE. */
|
||||
#elif (defined(__arm__) && defined(__ARM_ARCH) && __ARM_ARCH >= 7) || defined(__aarch64__)
|
||||
#define SDL_CPUPauseInstruction() __asm__ __volatile__("yield" ::: "memory")
|
||||
#elif (defined(__powerpc__) || defined(__powerpc64__))
|
||||
#define SDL_CPUPauseInstruction() __asm__ __volatile__("or 27,27,27");
|
||||
#elif defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64))
|
||||
#define SDL_CPUPauseInstruction() _mm_pause() /* this is actually "rep nop" and not a SIMD instruction. No inline asm in MSVC x86-64! */
|
||||
#elif defined(_MSC_VER) && (defined(_M_ARM) || defined(_M_ARM64))
|
||||
#define SDL_CPUPauseInstruction() __yield()
|
||||
#elif defined(__WATCOMC__) && defined(__386__)
|
||||
extern __inline void SDL_CPUPauseInstruction(void);
|
||||
#pragma aux SDL_CPUPauseInstruction = ".686p" ".xmm2" "pause"
|
||||
#else
|
||||
#define SDL_CPUPauseInstruction()
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* A type representing an atomic integer value.
|
||||
*
|
||||
* It is a struct so people don't accidentally use numeric operations on it.
|
||||
*/
|
||||
typedef struct SDL_atomic_t {
|
||||
int value;
|
||||
} SDL_atomic_t;
|
||||
|
||||
/**
|
||||
* Set an atomic variable to a new value if it is currently an old value.
|
||||
*
|
||||
* ***Note: If you don't know what this function is for, you shouldn't use
|
||||
* it!***
|
||||
*
|
||||
* \param a a pointer to an SDL_atomic_t variable to be modified.
|
||||
* \param oldval the old value.
|
||||
* \param newval the new value.
|
||||
* \returns SDL_TRUE if the atomic variable was set, SDL_FALSE otherwise.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_AtomicCASPtr
|
||||
* \sa SDL_AtomicGet
|
||||
* \sa SDL_AtomicSet
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCAS(SDL_atomic_t *a, int oldval, int newval);
|
||||
|
||||
/**
|
||||
* Set an atomic variable to a value.
|
||||
*
|
||||
* This function also acts as a full memory barrier.
|
||||
*
|
||||
* ***Note: If you don't know what this function is for, you shouldn't use
|
||||
* it!***
|
||||
*
|
||||
* \param a a pointer to an SDL_atomic_t variable to be modified.
|
||||
* \param v the desired value.
|
||||
* \returns the previous value of the atomic variable.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.2.
|
||||
*
|
||||
* \sa SDL_AtomicGet
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_AtomicSet(SDL_atomic_t *a, int v);
|
||||
|
||||
/**
|
||||
* Get the value of an atomic variable.
|
||||
*
|
||||
* ***Note: If you don't know what this function is for, you shouldn't use
|
||||
* it!***
|
||||
*
|
||||
* \param a a pointer to an SDL_atomic_t variable.
|
||||
* \returns the current value of an atomic variable.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.2.
|
||||
*
|
||||
* \sa SDL_AtomicSet
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_AtomicGet(SDL_atomic_t *a);
|
||||
|
||||
/**
|
||||
* Add to an atomic variable.
|
||||
*
|
||||
* This function also acts as a full memory barrier.
|
||||
*
|
||||
* ***Note: If you don't know what this function is for, you shouldn't use
|
||||
* it!***
|
||||
*
|
||||
* \param a a pointer to an SDL_atomic_t variable to be modified.
|
||||
* \param v the desired value to add.
|
||||
* \returns the previous value of the atomic variable.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.2.
|
||||
*
|
||||
* \sa SDL_AtomicDecRef
|
||||
* \sa SDL_AtomicIncRef
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_AtomicAdd(SDL_atomic_t *a, int v);
|
||||
|
||||
/**
|
||||
* \brief Increment an atomic variable used as a reference count.
|
||||
*/
|
||||
#ifndef SDL_AtomicIncRef
|
||||
#define SDL_AtomicIncRef(a) SDL_AtomicAdd(a, 1)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \brief Decrement an atomic variable used as a reference count.
|
||||
*
|
||||
* \return SDL_TRUE if the variable reached zero after decrementing,
|
||||
* SDL_FALSE otherwise
|
||||
*/
|
||||
#ifndef SDL_AtomicDecRef
|
||||
#define SDL_AtomicDecRef(a) (SDL_AtomicAdd(a, -1) == 1)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Set a pointer to a new value if it is currently an old value.
|
||||
*
|
||||
* ***Note: If you don't know what this function is for, you shouldn't use
|
||||
* it!***
|
||||
*
|
||||
* \param a a pointer to a pointer.
|
||||
* \param oldval the old pointer value.
|
||||
* \param newval the new pointer value.
|
||||
* \returns SDL_TRUE if the pointer was set, SDL_FALSE otherwise.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_AtomicCAS
|
||||
* \sa SDL_AtomicGetPtr
|
||||
* \sa SDL_AtomicSetPtr
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_AtomicCASPtr(void **a, void *oldval, void *newval);
|
||||
|
||||
/**
|
||||
* Set a pointer to a value atomically.
|
||||
*
|
||||
* ***Note: If you don't know what this function is for, you shouldn't use
|
||||
* it!***
|
||||
*
|
||||
* \param a a pointer to a pointer.
|
||||
* \param v the desired pointer value.
|
||||
* \returns the previous value of the pointer.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.2.
|
||||
*
|
||||
* \sa SDL_AtomicCASPtr
|
||||
* \sa SDL_AtomicGetPtr
|
||||
*/
|
||||
extern DECLSPEC void* SDLCALL SDL_AtomicSetPtr(void **a, void* v);
|
||||
|
||||
/**
|
||||
* Get the value of a pointer atomically.
|
||||
*
|
||||
* ***Note: If you don't know what this function is for, you shouldn't use
|
||||
* it!***
|
||||
*
|
||||
* \param a a pointer to a pointer.
|
||||
* \returns the current value of a pointer.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.2.
|
||||
*
|
||||
* \sa SDL_AtomicCASPtr
|
||||
* \sa SDL_AtomicSetPtr
|
||||
*/
|
||||
extern DECLSPEC void* SDLCALL SDL_AtomicGetPtr(void **a);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* SDL_atomic_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
1512
build-tests/Libraries/SDL/include/SDL2/SDL_audio.h
Normal file
1512
build-tests/Libraries/SDL/include/SDL2/SDL_audio.h
Normal file
File diff suppressed because it is too large
Load Diff
132
build-tests/Libraries/SDL/include/SDL2/SDL_bits.h
Normal file
132
build-tests/Libraries/SDL/include/SDL2/SDL_bits.h
Normal file
@ -0,0 +1,132 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* # CategoryBits
|
||||
*
|
||||
* Functions for fiddling with bits and bitmasks.
|
||||
*/
|
||||
|
||||
#ifndef SDL_bits_h_
|
||||
#define SDL_bits_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \file SDL_bits.h
|
||||
*/
|
||||
|
||||
/**
|
||||
* Get the index of the most significant bit. Result is undefined when called
|
||||
* with 0. This operation can also be stated as "count leading zeroes" and
|
||||
* "log base 2".
|
||||
*
|
||||
* \return the index of the most significant bit, or -1 if the value is 0.
|
||||
*/
|
||||
#if defined(__WATCOMC__) && defined(__386__)
|
||||
extern __inline int _SDL_bsr_watcom(Uint32);
|
||||
#pragma aux _SDL_bsr_watcom = \
|
||||
"bsr eax, eax" \
|
||||
parm [eax] nomemory \
|
||||
value [eax] \
|
||||
modify exact [eax] nomemory;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Use this function to get the index of the most significant (set) bit in a
|
||||
*
|
||||
* \param x the number to find the MSB of.
|
||||
* \returns the index of the most significant bit of x, or -1 if x is 0.
|
||||
*/
|
||||
SDL_FORCE_INLINE int
|
||||
SDL_MostSignificantBitIndex32(Uint32 x)
|
||||
{
|
||||
#if defined(__GNUC__) && (__GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
|
||||
/* Count Leading Zeroes builtin in GCC.
|
||||
* http://gcc.gnu.org/onlinedocs/gcc-4.3.4/gcc/Other-Builtins.html
|
||||
*/
|
||||
if (x == 0) {
|
||||
return -1;
|
||||
}
|
||||
return 31 - __builtin_clz(x);
|
||||
#elif defined(__WATCOMC__) && defined(__386__)
|
||||
if (x == 0) {
|
||||
return -1;
|
||||
}
|
||||
return _SDL_bsr_watcom(x);
|
||||
#elif defined(_MSC_VER)
|
||||
unsigned long index;
|
||||
if (_BitScanReverse(&index, x)) {
|
||||
return index;
|
||||
}
|
||||
return -1;
|
||||
#else
|
||||
/* Based off of Bit Twiddling Hacks by Sean Eron Anderson
|
||||
* <seander@cs.stanford.edu>, released in the public domain.
|
||||
* http://graphics.stanford.edu/~seander/bithacks.html#IntegerLog
|
||||
*/
|
||||
const Uint32 b[] = {0x2, 0xC, 0xF0, 0xFF00, 0xFFFF0000};
|
||||
const int S[] = {1, 2, 4, 8, 16};
|
||||
|
||||
int msbIndex = 0;
|
||||
int i;
|
||||
|
||||
if (x == 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
for (i = 4; i >= 0; i--)
|
||||
{
|
||||
if (x & b[i])
|
||||
{
|
||||
x >>= S[i];
|
||||
msbIndex |= S[i];
|
||||
}
|
||||
}
|
||||
|
||||
return msbIndex;
|
||||
#endif
|
||||
}
|
||||
|
||||
SDL_FORCE_INLINE SDL_bool
|
||||
SDL_HasExactlyOneBitSet32(Uint32 x)
|
||||
{
|
||||
if (x && !(x & (x - 1))) {
|
||||
return SDL_TRUE;
|
||||
}
|
||||
return SDL_FALSE;
|
||||
}
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* SDL_bits_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
199
build-tests/Libraries/SDL/include/SDL2/SDL_blendmode.h
Normal file
199
build-tests/Libraries/SDL/include/SDL2/SDL_blendmode.h
Normal file
@ -0,0 +1,199 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* # CategoryBlendmode
|
||||
*
|
||||
* Header file declaring the SDL_BlendMode enumeration
|
||||
*/
|
||||
|
||||
#ifndef SDL_blendmode_h_
|
||||
#define SDL_blendmode_h_
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* The blend mode used in SDL_RenderCopy() and drawing operations.
|
||||
*/
|
||||
typedef enum SDL_BlendMode
|
||||
{
|
||||
SDL_BLENDMODE_NONE = 0x00000000, /**< no blending
|
||||
dstRGBA = srcRGBA */
|
||||
SDL_BLENDMODE_BLEND = 0x00000001, /**< alpha blending
|
||||
dstRGB = (srcRGB * srcA) + (dstRGB * (1-srcA))
|
||||
dstA = srcA + (dstA * (1-srcA)) */
|
||||
SDL_BLENDMODE_ADD = 0x00000002, /**< additive blending
|
||||
dstRGB = (srcRGB * srcA) + dstRGB
|
||||
dstA = dstA */
|
||||
SDL_BLENDMODE_MOD = 0x00000004, /**< color modulate
|
||||
dstRGB = srcRGB * dstRGB
|
||||
dstA = dstA */
|
||||
SDL_BLENDMODE_MUL = 0x00000008, /**< color multiply
|
||||
dstRGB = (srcRGB * dstRGB) + (dstRGB * (1-srcA))
|
||||
dstA = dstA */
|
||||
SDL_BLENDMODE_INVALID = 0x7FFFFFFF
|
||||
|
||||
/* Additional custom blend modes can be returned by SDL_ComposeCustomBlendMode() */
|
||||
|
||||
} SDL_BlendMode;
|
||||
|
||||
/**
|
||||
* The blend operation used when combining source and destination pixel
|
||||
* components
|
||||
*/
|
||||
typedef enum SDL_BlendOperation
|
||||
{
|
||||
SDL_BLENDOPERATION_ADD = 0x1, /**< dst + src: supported by all renderers */
|
||||
SDL_BLENDOPERATION_SUBTRACT = 0x2, /**< src - dst : supported by D3D9, D3D11, OpenGL, OpenGLES */
|
||||
SDL_BLENDOPERATION_REV_SUBTRACT = 0x3, /**< dst - src : supported by D3D9, D3D11, OpenGL, OpenGLES */
|
||||
SDL_BLENDOPERATION_MINIMUM = 0x4, /**< min(dst, src) : supported by D3D9, D3D11 */
|
||||
SDL_BLENDOPERATION_MAXIMUM = 0x5 /**< max(dst, src) : supported by D3D9, D3D11 */
|
||||
} SDL_BlendOperation;
|
||||
|
||||
/**
|
||||
* The normalized factor used to multiply pixel components
|
||||
*/
|
||||
typedef enum SDL_BlendFactor
|
||||
{
|
||||
SDL_BLENDFACTOR_ZERO = 0x1, /**< 0, 0, 0, 0 */
|
||||
SDL_BLENDFACTOR_ONE = 0x2, /**< 1, 1, 1, 1 */
|
||||
SDL_BLENDFACTOR_SRC_COLOR = 0x3, /**< srcR, srcG, srcB, srcA */
|
||||
SDL_BLENDFACTOR_ONE_MINUS_SRC_COLOR = 0x4, /**< 1-srcR, 1-srcG, 1-srcB, 1-srcA */
|
||||
SDL_BLENDFACTOR_SRC_ALPHA = 0x5, /**< srcA, srcA, srcA, srcA */
|
||||
SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA = 0x6, /**< 1-srcA, 1-srcA, 1-srcA, 1-srcA */
|
||||
SDL_BLENDFACTOR_DST_COLOR = 0x7, /**< dstR, dstG, dstB, dstA */
|
||||
SDL_BLENDFACTOR_ONE_MINUS_DST_COLOR = 0x8, /**< 1-dstR, 1-dstG, 1-dstB, 1-dstA */
|
||||
SDL_BLENDFACTOR_DST_ALPHA = 0x9, /**< dstA, dstA, dstA, dstA */
|
||||
SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA = 0xA /**< 1-dstA, 1-dstA, 1-dstA, 1-dstA */
|
||||
} SDL_BlendFactor;
|
||||
|
||||
/**
|
||||
* Compose a custom blend mode for renderers.
|
||||
*
|
||||
* The functions SDL_SetRenderDrawBlendMode and SDL_SetTextureBlendMode accept
|
||||
* the SDL_BlendMode returned by this function if the renderer supports it.
|
||||
*
|
||||
* A blend mode controls how the pixels from a drawing operation (source) get
|
||||
* combined with the pixels from the render target (destination). First, the
|
||||
* components of the source and destination pixels get multiplied with their
|
||||
* blend factors. Then, the blend operation takes the two products and
|
||||
* calculates the result that will get stored in the render target.
|
||||
*
|
||||
* Expressed in pseudocode, it would look like this:
|
||||
*
|
||||
* ```c
|
||||
* dstRGB = colorOperation(srcRGB * srcColorFactor, dstRGB * dstColorFactor);
|
||||
* dstA = alphaOperation(srcA * srcAlphaFactor, dstA * dstAlphaFactor);
|
||||
* ```
|
||||
*
|
||||
* Where the functions `colorOperation(src, dst)` and `alphaOperation(src,
|
||||
* dst)` can return one of the following:
|
||||
*
|
||||
* - `src + dst`
|
||||
* - `src - dst`
|
||||
* - `dst - src`
|
||||
* - `min(src, dst)`
|
||||
* - `max(src, dst)`
|
||||
*
|
||||
* The red, green, and blue components are always multiplied with the first,
|
||||
* second, and third components of the SDL_BlendFactor, respectively. The
|
||||
* fourth component is not used.
|
||||
*
|
||||
* The alpha component is always multiplied with the fourth component of the
|
||||
* SDL_BlendFactor. The other components are not used in the alpha
|
||||
* calculation.
|
||||
*
|
||||
* Support for these blend modes varies for each renderer. To check if a
|
||||
* specific SDL_BlendMode is supported, create a renderer and pass it to
|
||||
* either SDL_SetRenderDrawBlendMode or SDL_SetTextureBlendMode. They will
|
||||
* return with an error if the blend mode is not supported.
|
||||
*
|
||||
* This list describes the support of custom blend modes for each renderer in
|
||||
* SDL 2.0.6. All renderers support the four blend modes listed in the
|
||||
* SDL_BlendMode enumeration.
|
||||
*
|
||||
* - **direct3d**: Supports all operations with all factors. However, some
|
||||
* factors produce unexpected results with `SDL_BLENDOPERATION_MINIMUM` and
|
||||
* `SDL_BLENDOPERATION_MAXIMUM`.
|
||||
* - **direct3d11**: Same as Direct3D 9.
|
||||
* - **opengl**: Supports the `SDL_BLENDOPERATION_ADD` operation with all
|
||||
* factors. OpenGL versions 1.1, 1.2, and 1.3 do not work correctly with SDL
|
||||
* 2.0.6.
|
||||
* - **opengles**: Supports the `SDL_BLENDOPERATION_ADD` operation with all
|
||||
* factors. Color and alpha factors need to be the same. OpenGL ES 1
|
||||
* implementation specific: May also support `SDL_BLENDOPERATION_SUBTRACT`
|
||||
* and `SDL_BLENDOPERATION_REV_SUBTRACT`. May support color and alpha
|
||||
* operations being different from each other. May support color and alpha
|
||||
* factors being different from each other.
|
||||
* - **opengles2**: Supports the `SDL_BLENDOPERATION_ADD`,
|
||||
* `SDL_BLENDOPERATION_SUBTRACT`, `SDL_BLENDOPERATION_REV_SUBTRACT`
|
||||
* operations with all factors.
|
||||
* - **psp**: No custom blend mode support.
|
||||
* - **software**: No custom blend mode support.
|
||||
*
|
||||
* Some renderers do not provide an alpha component for the default render
|
||||
* target. The `SDL_BLENDFACTOR_DST_ALPHA` and
|
||||
* `SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA` factors do not have an effect in this
|
||||
* case.
|
||||
*
|
||||
* \param srcColorFactor the SDL_BlendFactor applied to the red, green, and
|
||||
* blue components of the source pixels.
|
||||
* \param dstColorFactor the SDL_BlendFactor applied to the red, green, and
|
||||
* blue components of the destination pixels.
|
||||
* \param colorOperation the SDL_BlendOperation used to combine the red,
|
||||
* green, and blue components of the source and
|
||||
* destination pixels.
|
||||
* \param srcAlphaFactor the SDL_BlendFactor applied to the alpha component of
|
||||
* the source pixels.
|
||||
* \param dstAlphaFactor the SDL_BlendFactor applied to the alpha component of
|
||||
* the destination pixels.
|
||||
* \param alphaOperation the SDL_BlendOperation used to combine the alpha
|
||||
* component of the source and destination pixels.
|
||||
* \returns an SDL_BlendMode that represents the chosen factors and
|
||||
* operations.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.6.
|
||||
*
|
||||
* \sa SDL_SetRenderDrawBlendMode
|
||||
* \sa SDL_GetRenderDrawBlendMode
|
||||
* \sa SDL_SetTextureBlendMode
|
||||
* \sa SDL_GetTextureBlendMode
|
||||
*/
|
||||
extern DECLSPEC SDL_BlendMode SDLCALL SDL_ComposeCustomBlendMode(SDL_BlendFactor srcColorFactor,
|
||||
SDL_BlendFactor dstColorFactor,
|
||||
SDL_BlendOperation colorOperation,
|
||||
SDL_BlendFactor srcAlphaFactor,
|
||||
SDL_BlendFactor dstAlphaFactor,
|
||||
SDL_BlendOperation alphaOperation);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* SDL_blendmode_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
141
build-tests/Libraries/SDL/include/SDL2/SDL_clipboard.h
Normal file
141
build-tests/Libraries/SDL/include/SDL2/SDL_clipboard.h
Normal file
@ -0,0 +1,141 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* # CategoryClipboard
|
||||
*
|
||||
* Include file for SDL clipboard handling
|
||||
*/
|
||||
|
||||
#ifndef SDL_clipboard_h_
|
||||
#define SDL_clipboard_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Function prototypes */
|
||||
|
||||
/**
|
||||
* Put UTF-8 text into the clipboard.
|
||||
*
|
||||
* \param text the text to store in the clipboard.
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GetClipboardText
|
||||
* \sa SDL_HasClipboardText
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetClipboardText(const char *text);
|
||||
|
||||
/**
|
||||
* Get UTF-8 text from the clipboard, which must be freed with SDL_free().
|
||||
*
|
||||
* This functions returns empty string if there was not enough memory left for
|
||||
* a copy of the clipboard's content.
|
||||
*
|
||||
* \returns the clipboard text on success or an empty string on failure; call
|
||||
* SDL_GetError() for more information. Caller must call SDL_free()
|
||||
* on the returned pointer when done with it (even if there was an
|
||||
* error).
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_HasClipboardText
|
||||
* \sa SDL_SetClipboardText
|
||||
*/
|
||||
extern DECLSPEC char * SDLCALL SDL_GetClipboardText(void);
|
||||
|
||||
/**
|
||||
* Query whether the clipboard exists and contains a non-empty text string.
|
||||
*
|
||||
* \returns SDL_TRUE if the clipboard has text, or SDL_FALSE if it does not.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GetClipboardText
|
||||
* \sa SDL_SetClipboardText
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasClipboardText(void);
|
||||
|
||||
/**
|
||||
* Put UTF-8 text into the primary selection.
|
||||
*
|
||||
* \param text the text to store in the primary selection.
|
||||
* \returns 0 on success or a negative error code on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.26.0.
|
||||
*
|
||||
* \sa SDL_GetPrimarySelectionText
|
||||
* \sa SDL_HasPrimarySelectionText
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetPrimarySelectionText(const char *text);
|
||||
|
||||
/**
|
||||
* Get UTF-8 text from the primary selection, which must be freed with
|
||||
* SDL_free().
|
||||
*
|
||||
* This functions returns empty string if there was not enough memory left for
|
||||
* a copy of the primary selection's content.
|
||||
*
|
||||
* \returns the primary selection text on success or an empty string on
|
||||
* failure; call SDL_GetError() for more information. Caller must
|
||||
* call SDL_free() on the returned pointer when done with it (even if
|
||||
* there was an error).
|
||||
*
|
||||
* \since This function is available since SDL 2.26.0.
|
||||
*
|
||||
* \sa SDL_HasPrimarySelectionText
|
||||
* \sa SDL_SetPrimarySelectionText
|
||||
*/
|
||||
extern DECLSPEC char * SDLCALL SDL_GetPrimarySelectionText(void);
|
||||
|
||||
/**
|
||||
* Query whether the primary selection exists and contains a non-empty text
|
||||
* string.
|
||||
*
|
||||
* \returns SDL_TRUE if the primary selection has text, or SDL_FALSE if it
|
||||
* does not.
|
||||
*
|
||||
* \since This function is available since SDL 2.26.0.
|
||||
*
|
||||
* \sa SDL_GetPrimarySelectionText
|
||||
* \sa SDL_SetPrimarySelectionText
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasPrimarySelectionText(void);
|
||||
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* SDL_clipboard_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
20
build-tests/Libraries/SDL/include/SDL2/SDL_copying.h
Normal file
20
build-tests/Libraries/SDL/include/SDL2/SDL_copying.h
Normal file
@ -0,0 +1,20 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
603
build-tests/Libraries/SDL/include/SDL2/SDL_cpuinfo.h
Normal file
603
build-tests/Libraries/SDL/include/SDL2/SDL_cpuinfo.h
Normal file
@ -0,0 +1,603 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/* WIKI CATEGORY: CPUInfo */
|
||||
|
||||
/**
|
||||
* # CategoryCPUInfo
|
||||
*
|
||||
* CPU feature detection for SDL.
|
||||
*
|
||||
* These functions are largely concerned with reporting if the system has
|
||||
* access to various SIMD instruction sets, but also has other important info
|
||||
* to share, such as number of logical CPU cores.
|
||||
*/
|
||||
|
||||
#ifndef SDL_cpuinfo_h_
|
||||
#define SDL_cpuinfo_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
/* Need to do this here because intrin.h has C++ code in it */
|
||||
/* Visual Studio 2005 has a bug where intrin.h conflicts with winnt.h */
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1500) && (defined(_M_IX86) || defined(_M_X64))
|
||||
#ifdef __clang__
|
||||
/* As of Clang 11, '_m_prefetchw' is conflicting with the winnt.h's version,
|
||||
so we define the needed '_m_prefetch' here as a pseudo-header, until the issue is fixed. */
|
||||
|
||||
#ifndef __PRFCHWINTRIN_H
|
||||
#define __PRFCHWINTRIN_H
|
||||
|
||||
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
||||
_m_prefetch(void *__P)
|
||||
{
|
||||
__builtin_prefetch (__P, 0, 3 /* _MM_HINT_T0 */);
|
||||
}
|
||||
|
||||
#endif /* __PRFCHWINTRIN_H */
|
||||
#endif /* __clang__ */
|
||||
#include <intrin.h>
|
||||
#ifndef _WIN64
|
||||
#ifndef __MMX__
|
||||
#define __MMX__
|
||||
#endif
|
||||
/*
|
||||
#ifndef __3dNOW__
|
||||
#define __3dNOW__
|
||||
#endif
|
||||
*/
|
||||
#endif
|
||||
#ifndef __SSE__
|
||||
#define __SSE__
|
||||
#endif
|
||||
#ifndef __SSE2__
|
||||
#define __SSE2__
|
||||
#endif
|
||||
#ifndef __SSE3__
|
||||
#define __SSE3__
|
||||
#endif
|
||||
#elif defined(__MINGW64_VERSION_MAJOR)
|
||||
#include <intrin.h>
|
||||
#if !defined(SDL_DISABLE_ARM_NEON_H) && defined(__ARM_NEON)
|
||||
# include <arm_neon.h>
|
||||
#endif
|
||||
#else
|
||||
/* altivec.h redefining bool causes a number of problems, see bugs 3993 and 4392, so you need to explicitly define SDL_ENABLE_ALTIVEC_H to have it included. */
|
||||
#if defined(HAVE_ALTIVEC_H) && defined(__ALTIVEC__) && !defined(__APPLE_ALTIVEC__) && defined(SDL_ENABLE_ALTIVEC_H)
|
||||
#include <altivec.h>
|
||||
#endif
|
||||
#if !defined(SDL_DISABLE_ARM_NEON_H)
|
||||
# if defined(__ARM_NEON)
|
||||
# include <arm_neon.h>
|
||||
# elif defined(__WINDOWS__) || defined(__WINRT__) || defined(__GDK__)
|
||||
/* Visual Studio doesn't define __ARM_ARCH, but _M_ARM (if set, always 7), and _M_ARM64 (if set, always 1). */
|
||||
# if defined(_M_ARM)
|
||||
# include <armintr.h>
|
||||
# include <arm_neon.h>
|
||||
# define __ARM_NEON 1 /* Set __ARM_NEON so that it can be used elsewhere, at compile time */
|
||||
# endif
|
||||
# if defined (_M_ARM64)
|
||||
# include <arm64intr.h>
|
||||
# include <arm64_neon.h>
|
||||
# define __ARM_NEON 1 /* Set __ARM_NEON so that it can be used elsewhere, at compile time */
|
||||
# define __ARM_ARCH 8
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
#endif /* compiler version */
|
||||
|
||||
#if defined(__3dNOW__) && !defined(SDL_DISABLE_MM3DNOW_H)
|
||||
#include <mm3dnow.h>
|
||||
#endif
|
||||
#if defined(__loongarch_sx) && !defined(SDL_DISABLE_LSX_H)
|
||||
#include <lsxintrin.h>
|
||||
#define __LSX__
|
||||
#endif
|
||||
#if defined(__loongarch_asx) && !defined(SDL_DISABLE_LASX_H)
|
||||
#include <lasxintrin.h>
|
||||
#define __LASX__
|
||||
#endif
|
||||
#if defined(HAVE_IMMINTRIN_H) && !defined(SDL_DISABLE_IMMINTRIN_H) && \
|
||||
(defined(__x86_64__) || defined(_M_X64) || defined(__i386__) || defined(_M_IX86))
|
||||
#include <immintrin.h>
|
||||
#else
|
||||
#if defined(__MMX__) && !defined(SDL_DISABLE_MMINTRIN_H)
|
||||
#include <mmintrin.h>
|
||||
#endif
|
||||
#if defined(__SSE__) && !defined(SDL_DISABLE_XMMINTRIN_H)
|
||||
#include <xmmintrin.h>
|
||||
#endif
|
||||
#if defined(__SSE2__) && !defined(SDL_DISABLE_EMMINTRIN_H)
|
||||
#include <emmintrin.h>
|
||||
#endif
|
||||
#if defined(__SSE3__) && !defined(SDL_DISABLE_PMMINTRIN_H)
|
||||
#include <pmmintrin.h>
|
||||
#endif
|
||||
#endif /* HAVE_IMMINTRIN_H */
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* This is a guess for the cacheline size used for padding.
|
||||
* Most x86 processors have a 64 byte cache line.
|
||||
* The 64-bit PowerPC processors have a 128 byte cache line.
|
||||
* We'll use the larger value to be generally safe.
|
||||
*/
|
||||
#define SDL_CACHELINE_SIZE 128
|
||||
|
||||
/**
|
||||
* Get the number of CPU cores available.
|
||||
*
|
||||
* \returns the total number of logical CPU cores. On CPUs that include
|
||||
* technologies such as hyperthreading, the number of logical cores
|
||||
* may be more than the number of physical cores.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetCPUCount(void);
|
||||
|
||||
/**
|
||||
* Determine the L1 cache line size of the CPU.
|
||||
*
|
||||
* This is useful for determining multi-threaded structure padding or SIMD
|
||||
* prefetch sizes.
|
||||
*
|
||||
* \returns the L1 cache line size of the CPU, in bytes.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetCPUCacheLineSize(void);
|
||||
|
||||
/**
|
||||
* Determine whether the CPU has the RDTSC instruction.
|
||||
*
|
||||
* This always returns false on CPUs that aren't using Intel instruction sets.
|
||||
*
|
||||
* \returns SDL_TRUE if the CPU has the RDTSC instruction or SDL_FALSE if not.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_Has3DNow
|
||||
* \sa SDL_HasAltiVec
|
||||
* \sa SDL_HasAVX
|
||||
* \sa SDL_HasAVX2
|
||||
* \sa SDL_HasMMX
|
||||
* \sa SDL_HasSSE
|
||||
* \sa SDL_HasSSE2
|
||||
* \sa SDL_HasSSE3
|
||||
* \sa SDL_HasSSE41
|
||||
* \sa SDL_HasSSE42
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasRDTSC(void);
|
||||
|
||||
/**
|
||||
* Determine whether the CPU has AltiVec features.
|
||||
*
|
||||
* This always returns false on CPUs that aren't using PowerPC instruction
|
||||
* sets.
|
||||
*
|
||||
* \returns SDL_TRUE if the CPU has AltiVec features or SDL_FALSE if not.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_Has3DNow
|
||||
* \sa SDL_HasAVX
|
||||
* \sa SDL_HasAVX2
|
||||
* \sa SDL_HasMMX
|
||||
* \sa SDL_HasRDTSC
|
||||
* \sa SDL_HasSSE
|
||||
* \sa SDL_HasSSE2
|
||||
* \sa SDL_HasSSE3
|
||||
* \sa SDL_HasSSE41
|
||||
* \sa SDL_HasSSE42
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec(void);
|
||||
|
||||
/**
|
||||
* Determine whether the CPU has MMX features.
|
||||
*
|
||||
* This always returns false on CPUs that aren't using Intel instruction sets.
|
||||
*
|
||||
* \returns SDL_TRUE if the CPU has MMX features or SDL_FALSE if not.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_Has3DNow
|
||||
* \sa SDL_HasAltiVec
|
||||
* \sa SDL_HasAVX
|
||||
* \sa SDL_HasAVX2
|
||||
* \sa SDL_HasRDTSC
|
||||
* \sa SDL_HasSSE
|
||||
* \sa SDL_HasSSE2
|
||||
* \sa SDL_HasSSE3
|
||||
* \sa SDL_HasSSE41
|
||||
* \sa SDL_HasSSE42
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasMMX(void);
|
||||
|
||||
/**
|
||||
* Determine whether the CPU has 3DNow! features.
|
||||
*
|
||||
* This always returns false on CPUs that aren't using AMD instruction sets.
|
||||
*
|
||||
* \returns SDL_TRUE if the CPU has 3DNow! features or SDL_FALSE if not.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_HasAltiVec
|
||||
* \sa SDL_HasAVX
|
||||
* \sa SDL_HasAVX2
|
||||
* \sa SDL_HasMMX
|
||||
* \sa SDL_HasRDTSC
|
||||
* \sa SDL_HasSSE
|
||||
* \sa SDL_HasSSE2
|
||||
* \sa SDL_HasSSE3
|
||||
* \sa SDL_HasSSE41
|
||||
* \sa SDL_HasSSE42
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNow(void);
|
||||
|
||||
/**
|
||||
* Determine whether the CPU has SSE features.
|
||||
*
|
||||
* This always returns false on CPUs that aren't using Intel instruction sets.
|
||||
*
|
||||
* \returns SDL_TRUE if the CPU has SSE features or SDL_FALSE if not.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_Has3DNow
|
||||
* \sa SDL_HasAltiVec
|
||||
* \sa SDL_HasAVX
|
||||
* \sa SDL_HasAVX2
|
||||
* \sa SDL_HasMMX
|
||||
* \sa SDL_HasRDTSC
|
||||
* \sa SDL_HasSSE2
|
||||
* \sa SDL_HasSSE3
|
||||
* \sa SDL_HasSSE41
|
||||
* \sa SDL_HasSSE42
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE(void);
|
||||
|
||||
/**
|
||||
* Determine whether the CPU has SSE2 features.
|
||||
*
|
||||
* This always returns false on CPUs that aren't using Intel instruction sets.
|
||||
*
|
||||
* \returns SDL_TRUE if the CPU has SSE2 features or SDL_FALSE if not.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_Has3DNow
|
||||
* \sa SDL_HasAltiVec
|
||||
* \sa SDL_HasAVX
|
||||
* \sa SDL_HasAVX2
|
||||
* \sa SDL_HasMMX
|
||||
* \sa SDL_HasRDTSC
|
||||
* \sa SDL_HasSSE
|
||||
* \sa SDL_HasSSE3
|
||||
* \sa SDL_HasSSE41
|
||||
* \sa SDL_HasSSE42
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE2(void);
|
||||
|
||||
/**
|
||||
* Determine whether the CPU has SSE3 features.
|
||||
*
|
||||
* This always returns false on CPUs that aren't using Intel instruction sets.
|
||||
*
|
||||
* \returns SDL_TRUE if the CPU has SSE3 features or SDL_FALSE if not.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_Has3DNow
|
||||
* \sa SDL_HasAltiVec
|
||||
* \sa SDL_HasAVX
|
||||
* \sa SDL_HasAVX2
|
||||
* \sa SDL_HasMMX
|
||||
* \sa SDL_HasRDTSC
|
||||
* \sa SDL_HasSSE
|
||||
* \sa SDL_HasSSE2
|
||||
* \sa SDL_HasSSE41
|
||||
* \sa SDL_HasSSE42
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE3(void);
|
||||
|
||||
/**
|
||||
* Determine whether the CPU has SSE4.1 features.
|
||||
*
|
||||
* This always returns false on CPUs that aren't using Intel instruction sets.
|
||||
*
|
||||
* \returns SDL_TRUE if the CPU has SSE4.1 features or SDL_FALSE if not.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_Has3DNow
|
||||
* \sa SDL_HasAltiVec
|
||||
* \sa SDL_HasAVX
|
||||
* \sa SDL_HasAVX2
|
||||
* \sa SDL_HasMMX
|
||||
* \sa SDL_HasRDTSC
|
||||
* \sa SDL_HasSSE
|
||||
* \sa SDL_HasSSE2
|
||||
* \sa SDL_HasSSE3
|
||||
* \sa SDL_HasSSE42
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE41(void);
|
||||
|
||||
/**
|
||||
* Determine whether the CPU has SSE4.2 features.
|
||||
*
|
||||
* This always returns false on CPUs that aren't using Intel instruction sets.
|
||||
*
|
||||
* \returns SDL_TRUE if the CPU has SSE4.2 features or SDL_FALSE if not.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_Has3DNow
|
||||
* \sa SDL_HasAltiVec
|
||||
* \sa SDL_HasAVX
|
||||
* \sa SDL_HasAVX2
|
||||
* \sa SDL_HasMMX
|
||||
* \sa SDL_HasRDTSC
|
||||
* \sa SDL_HasSSE
|
||||
* \sa SDL_HasSSE2
|
||||
* \sa SDL_HasSSE3
|
||||
* \sa SDL_HasSSE41
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE42(void);
|
||||
|
||||
/**
|
||||
* Determine whether the CPU has AVX features.
|
||||
*
|
||||
* This always returns false on CPUs that aren't using Intel instruction sets.
|
||||
*
|
||||
* \returns SDL_TRUE if the CPU has AVX features or SDL_FALSE if not.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.2.
|
||||
*
|
||||
* \sa SDL_Has3DNow
|
||||
* \sa SDL_HasAltiVec
|
||||
* \sa SDL_HasAVX2
|
||||
* \sa SDL_HasMMX
|
||||
* \sa SDL_HasRDTSC
|
||||
* \sa SDL_HasSSE
|
||||
* \sa SDL_HasSSE2
|
||||
* \sa SDL_HasSSE3
|
||||
* \sa SDL_HasSSE41
|
||||
* \sa SDL_HasSSE42
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX(void);
|
||||
|
||||
/**
|
||||
* Determine whether the CPU has AVX2 features.
|
||||
*
|
||||
* This always returns false on CPUs that aren't using Intel instruction sets.
|
||||
*
|
||||
* \returns SDL_TRUE if the CPU has AVX2 features or SDL_FALSE if not.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.4.
|
||||
*
|
||||
* \sa SDL_Has3DNow
|
||||
* \sa SDL_HasAltiVec
|
||||
* \sa SDL_HasAVX
|
||||
* \sa SDL_HasMMX
|
||||
* \sa SDL_HasRDTSC
|
||||
* \sa SDL_HasSSE
|
||||
* \sa SDL_HasSSE2
|
||||
* \sa SDL_HasSSE3
|
||||
* \sa SDL_HasSSE41
|
||||
* \sa SDL_HasSSE42
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX2(void);
|
||||
|
||||
/**
|
||||
* Determine whether the CPU has AVX-512F (foundation) features.
|
||||
*
|
||||
* This always returns false on CPUs that aren't using Intel instruction sets.
|
||||
*
|
||||
* \returns SDL_TRUE if the CPU has AVX-512F features or SDL_FALSE if not.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.9.
|
||||
*
|
||||
* \sa SDL_HasAVX
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX512F(void);
|
||||
|
||||
/**
|
||||
* Determine whether the CPU has ARM SIMD (ARMv6) features.
|
||||
*
|
||||
* This is different from ARM NEON, which is a different instruction set.
|
||||
*
|
||||
* This always returns false on CPUs that aren't using ARM instruction sets.
|
||||
*
|
||||
* \returns SDL_TRUE if the CPU has ARM SIMD features or SDL_FALSE if not.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.12.
|
||||
*
|
||||
* \sa SDL_HasNEON
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasARMSIMD(void);
|
||||
|
||||
/**
|
||||
* Determine whether the CPU has NEON (ARM SIMD) features.
|
||||
*
|
||||
* This always returns false on CPUs that aren't using ARM instruction sets.
|
||||
*
|
||||
* \returns SDL_TRUE if the CPU has ARM NEON features or SDL_FALSE if not.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.6.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasNEON(void);
|
||||
|
||||
/**
|
||||
* Determine whether the CPU has LSX (LOONGARCH SIMD) features.
|
||||
*
|
||||
* This always returns false on CPUs that aren't using LOONGARCH instruction
|
||||
* sets.
|
||||
*
|
||||
* \returns SDL_TRUE if the CPU has LOONGARCH LSX features or SDL_FALSE if
|
||||
* not.
|
||||
*
|
||||
* \since This function is available since SDL 2.24.0.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasLSX(void);
|
||||
|
||||
/**
|
||||
* Determine whether the CPU has LASX (LOONGARCH SIMD) features.
|
||||
*
|
||||
* This always returns false on CPUs that aren't using LOONGARCH instruction
|
||||
* sets.
|
||||
*
|
||||
* \returns SDL_TRUE if the CPU has LOONGARCH LASX features or SDL_FALSE if
|
||||
* not.
|
||||
*
|
||||
* \since This function is available since SDL 2.24.0.
|
||||
*/
|
||||
extern DECLSPEC SDL_bool SDLCALL SDL_HasLASX(void);
|
||||
|
||||
/**
|
||||
* Get the amount of RAM configured in the system.
|
||||
*
|
||||
* \returns the amount of RAM configured in the system in MiB.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.1.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_GetSystemRAM(void);
|
||||
|
||||
/**
|
||||
* Report the alignment this system needs for SIMD allocations.
|
||||
*
|
||||
* This will return the minimum number of bytes to which a pointer must be
|
||||
* aligned to be compatible with SIMD instructions on the current machine. For
|
||||
* example, if the machine supports SSE only, it will return 16, but if it
|
||||
* supports AVX-512F, it'll return 64 (etc). This only reports values for
|
||||
* instruction sets SDL knows about, so if your SDL build doesn't have
|
||||
* SDL_HasAVX512F(), then it might return 16 for the SSE support it sees and
|
||||
* not 64 for the AVX-512 instructions that exist but SDL doesn't know about.
|
||||
* Plan accordingly.
|
||||
*
|
||||
* \returns the alignment in bytes needed for available, known SIMD
|
||||
* instructions.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.10.
|
||||
*/
|
||||
extern DECLSPEC size_t SDLCALL SDL_SIMDGetAlignment(void);
|
||||
|
||||
/**
|
||||
* Allocate memory in a SIMD-friendly way.
|
||||
*
|
||||
* This will allocate a block of memory that is suitable for use with SIMD
|
||||
* instructions. Specifically, it will be properly aligned and padded for the
|
||||
* system's supported vector instructions.
|
||||
*
|
||||
* The memory returned will be padded such that it is safe to read or write an
|
||||
* incomplete vector at the end of the memory block. This can be useful so you
|
||||
* don't have to drop back to a scalar fallback at the end of your SIMD
|
||||
* processing loop to deal with the final elements without overflowing the
|
||||
* allocated buffer.
|
||||
*
|
||||
* You must free this memory with SDL_FreeSIMD(), not free() or SDL_free() or
|
||||
* delete[], etc.
|
||||
*
|
||||
* Note that SDL will only deal with SIMD instruction sets it is aware of; for
|
||||
* example, SDL 2.0.8 knows that SSE wants 16-byte vectors (SDL_HasSSE()), and
|
||||
* AVX2 wants 32 bytes (SDL_HasAVX2()), but doesn't know that AVX-512 wants
|
||||
* 64. To be clear: if you can't decide to use an instruction set with an
|
||||
* SDL_Has*() function, don't use that instruction set with memory allocated
|
||||
* through here.
|
||||
*
|
||||
* SDL_AllocSIMD(0) will return a non-NULL pointer, assuming the system isn't
|
||||
* out of memory, but you are not allowed to dereference it (because you only
|
||||
* own zero bytes of that buffer).
|
||||
*
|
||||
* \param len The length, in bytes, of the block to allocate. The actual
|
||||
* allocated block might be larger due to padding, etc.
|
||||
* \returns a pointer to the newly-allocated block, NULL if out of memory.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.10.
|
||||
*
|
||||
* \sa SDL_SIMDGetAlignment
|
||||
* \sa SDL_SIMDRealloc
|
||||
* \sa SDL_SIMDFree
|
||||
*/
|
||||
extern DECLSPEC void * SDLCALL SDL_SIMDAlloc(const size_t len);
|
||||
|
||||
/**
|
||||
* Reallocate memory obtained from SDL_SIMDAlloc
|
||||
*
|
||||
* It is not valid to use this function on a pointer from anything but
|
||||
* SDL_SIMDAlloc(). It can't be used on pointers from malloc, realloc,
|
||||
* SDL_malloc, memalign, new[], etc.
|
||||
*
|
||||
* \param mem The pointer obtained from SDL_SIMDAlloc. This function also
|
||||
* accepts NULL, at which point this function is the same as
|
||||
* calling SDL_SIMDAlloc with a NULL pointer.
|
||||
* \param len The length, in bytes, of the block to allocated. The actual
|
||||
* allocated block might be larger due to padding, etc. Passing 0
|
||||
* will return a non-NULL pointer, assuming the system isn't out of
|
||||
* memory.
|
||||
* \returns a pointer to the newly-reallocated block, NULL if out of memory.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.14.
|
||||
*
|
||||
* \sa SDL_SIMDGetAlignment
|
||||
* \sa SDL_SIMDAlloc
|
||||
* \sa SDL_SIMDFree
|
||||
*/
|
||||
extern DECLSPEC void * SDLCALL SDL_SIMDRealloc(void *mem, const size_t len);
|
||||
|
||||
/**
|
||||
* Deallocate memory obtained from SDL_SIMDAlloc
|
||||
*
|
||||
* It is not valid to use this function on a pointer from anything but
|
||||
* SDL_SIMDAlloc() or SDL_SIMDRealloc(). It can't be used on pointers from
|
||||
* malloc, realloc, SDL_malloc, memalign, new[], etc.
|
||||
*
|
||||
* However, SDL_SIMDFree(NULL) is a legal no-op.
|
||||
*
|
||||
* The memory pointed to by `ptr` is no longer valid for access upon return,
|
||||
* and may be returned to the system or reused by a future allocation. The
|
||||
* pointer passed to this function is no longer safe to dereference once this
|
||||
* function returns, and should be discarded.
|
||||
*
|
||||
* \param ptr The pointer, returned from SDL_SIMDAlloc or SDL_SIMDRealloc, to
|
||||
* deallocate. NULL is a legal no-op.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.10.
|
||||
*
|
||||
* \sa SDL_SIMDAlloc
|
||||
* \sa SDL_SIMDRealloc
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_SIMDFree(void *ptr);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* SDL_cpuinfo_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
2351
build-tests/Libraries/SDL/include/SDL2/SDL_egl.h
Normal file
2351
build-tests/Libraries/SDL/include/SDL2/SDL_egl.h
Normal file
File diff suppressed because it is too large
Load Diff
396
build-tests/Libraries/SDL/include/SDL2/SDL_endian.h
Normal file
396
build-tests/Libraries/SDL/include/SDL2/SDL_endian.h
Normal file
@ -0,0 +1,396 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* # CategoryEndian
|
||||
*
|
||||
* Functions for reading and writing endian-specific values
|
||||
*/
|
||||
|
||||
#ifndef SDL_endian_h_
|
||||
#define SDL_endian_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1400)
|
||||
/* As of Clang 11, '_m_prefetchw' is conflicting with the winnt.h's version,
|
||||
so we define the needed '_m_prefetch' here as a pseudo-header, until the issue is fixed. */
|
||||
#if defined(__clang__) && !_SDL_HAS_BUILTIN(_m_prefetch)
|
||||
#ifndef __PRFCHWINTRIN_H
|
||||
#define __PRFCHWINTRIN_H
|
||||
static __inline__ void __attribute__((__always_inline__, __nodebug__))
|
||||
_m_prefetch(void *__P)
|
||||
{
|
||||
__builtin_prefetch(__P, 0, 3 /* _MM_HINT_T0 */);
|
||||
}
|
||||
#endif /* __PRFCHWINTRIN_H */
|
||||
#endif /* __clang__ */
|
||||
|
||||
#include <intrin.h>
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \name The two types of endianness
|
||||
*/
|
||||
/* @{ */
|
||||
#define SDL_LIL_ENDIAN 1234
|
||||
#define SDL_BIG_ENDIAN 4321
|
||||
/* @} */
|
||||
|
||||
#ifndef SDL_BYTEORDER /* Not defined in SDL_config.h? */
|
||||
#ifdef __linux__
|
||||
#include <endian.h>
|
||||
#define SDL_BYTEORDER __BYTE_ORDER
|
||||
#elif defined(__sun) && defined(__SVR4) /* Solaris */
|
||||
#include <sys/byteorder.h>
|
||||
#if defined(_LITTLE_ENDIAN)
|
||||
#define SDL_BYTEORDER SDL_LIL_ENDIAN
|
||||
#elif defined(_BIG_ENDIAN)
|
||||
#define SDL_BYTEORDER SDL_BIG_ENDIAN
|
||||
#else
|
||||
#error Unsupported endianness
|
||||
#endif
|
||||
#elif defined(__OpenBSD__) || defined(__DragonFly__)
|
||||
#include <endian.h>
|
||||
#define SDL_BYTEORDER BYTE_ORDER
|
||||
#elif defined(__FreeBSD__) || defined(__NetBSD__)
|
||||
#include <sys/endian.h>
|
||||
#define SDL_BYTEORDER BYTE_ORDER
|
||||
/* predefs from newer gcc and clang versions: */
|
||||
#elif defined(__ORDER_LITTLE_ENDIAN__) && defined(__ORDER_BIG_ENDIAN__) && defined(__BYTE_ORDER__)
|
||||
#if (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
|
||||
#define SDL_BYTEORDER SDL_LIL_ENDIAN
|
||||
#elif (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
|
||||
#define SDL_BYTEORDER SDL_BIG_ENDIAN
|
||||
#else
|
||||
#error Unsupported endianness
|
||||
#endif /**/
|
||||
#else
|
||||
#if defined(__hppa__) || \
|
||||
defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \
|
||||
(defined(__MIPS__) && defined(__MIPSEB__)) || \
|
||||
defined(__ppc__) || defined(__POWERPC__) || defined(__powerpc__) || defined(__PPC__) || \
|
||||
defined(__sparc__) || defined(__sparc)
|
||||
#define SDL_BYTEORDER SDL_BIG_ENDIAN
|
||||
#else
|
||||
#define SDL_BYTEORDER SDL_LIL_ENDIAN
|
||||
#endif
|
||||
#endif /* __linux__ */
|
||||
#endif /* !SDL_BYTEORDER */
|
||||
|
||||
#ifndef SDL_FLOATWORDORDER /* Not defined in SDL_config.h? */
|
||||
/* predefs from newer gcc versions: */
|
||||
#if defined(__ORDER_LITTLE_ENDIAN__) && defined(__ORDER_BIG_ENDIAN__) && defined(__FLOAT_WORD_ORDER__)
|
||||
#if (__FLOAT_WORD_ORDER__ == __ORDER_LITTLE_ENDIAN__)
|
||||
#define SDL_FLOATWORDORDER SDL_LIL_ENDIAN
|
||||
#elif (__FLOAT_WORD_ORDER__ == __ORDER_BIG_ENDIAN__)
|
||||
#define SDL_FLOATWORDORDER SDL_BIG_ENDIAN
|
||||
#else
|
||||
#error Unsupported endianness
|
||||
#endif /**/
|
||||
#elif defined(__MAVERICK__)
|
||||
/* For Maverick, float words are always little-endian. */
|
||||
#define SDL_FLOATWORDORDER SDL_LIL_ENDIAN
|
||||
#elif (defined(__arm__) || defined(__thumb__)) && !defined(__VFP_FP__) && !defined(__ARM_EABI__)
|
||||
/* For FPA, float words are always big-endian. */
|
||||
#define SDL_FLOATWORDORDER SDL_BIG_ENDIAN
|
||||
#else
|
||||
/* By default, assume that floats words follow the memory system mode. */
|
||||
#define SDL_FLOATWORDORDER SDL_BYTEORDER
|
||||
#endif /* __FLOAT_WORD_ORDER__ */
|
||||
#endif /* !SDL_FLOATWORDORDER */
|
||||
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \file SDL_endian.h
|
||||
*/
|
||||
|
||||
/* various modern compilers may have builtin swap */
|
||||
#if defined(__GNUC__) || defined(__clang__)
|
||||
# define HAS_BUILTIN_BSWAP16 (_SDL_HAS_BUILTIN(__builtin_bswap16)) || \
|
||||
(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8))
|
||||
# define HAS_BUILTIN_BSWAP32 (_SDL_HAS_BUILTIN(__builtin_bswap32)) || \
|
||||
(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
|
||||
# define HAS_BUILTIN_BSWAP64 (_SDL_HAS_BUILTIN(__builtin_bswap64)) || \
|
||||
(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
|
||||
|
||||
/* this one is broken */
|
||||
# define HAS_BROKEN_BSWAP (__GNUC__ == 2 && __GNUC_MINOR__ <= 95)
|
||||
#else
|
||||
# define HAS_BUILTIN_BSWAP16 0
|
||||
# define HAS_BUILTIN_BSWAP32 0
|
||||
# define HAS_BUILTIN_BSWAP64 0
|
||||
# define HAS_BROKEN_BSWAP 0
|
||||
#endif
|
||||
|
||||
#if HAS_BUILTIN_BSWAP16
|
||||
#define SDL_Swap16(x) __builtin_bswap16(x)
|
||||
#elif (defined(_MSC_VER) && (_MSC_VER >= 1400)) && !defined(__ICL)
|
||||
#pragma intrinsic(_byteswap_ushort)
|
||||
#define SDL_Swap16(x) _byteswap_ushort(x)
|
||||
#elif defined(__i386__) && !HAS_BROKEN_BSWAP
|
||||
SDL_FORCE_INLINE Uint16
|
||||
SDL_Swap16(Uint16 x)
|
||||
{
|
||||
__asm__("xchgb %b0,%h0": "=q"(x):"0"(x));
|
||||
return x;
|
||||
}
|
||||
#elif defined(__x86_64__)
|
||||
SDL_FORCE_INLINE Uint16
|
||||
SDL_Swap16(Uint16 x)
|
||||
{
|
||||
__asm__("xchgb %b0,%h0": "=Q"(x):"0"(x));
|
||||
return x;
|
||||
}
|
||||
#elif (defined(__powerpc__) || defined(__ppc__))
|
||||
SDL_FORCE_INLINE Uint16
|
||||
SDL_Swap16(Uint16 x)
|
||||
{
|
||||
int result;
|
||||
|
||||
__asm__("rlwimi %0,%2,8,16,23": "=&r"(result):"0"(x >> 8), "r"(x));
|
||||
return (Uint16)result;
|
||||
}
|
||||
#elif (defined(__m68k__) && !defined(__mcoldfire__))
|
||||
SDL_FORCE_INLINE Uint16
|
||||
SDL_Swap16(Uint16 x)
|
||||
{
|
||||
__asm__("rorw #8,%0": "=d"(x): "0"(x):"cc");
|
||||
return x;
|
||||
}
|
||||
#elif defined(__WATCOMC__) && defined(__386__)
|
||||
extern __inline Uint16 SDL_Swap16(Uint16);
|
||||
#pragma aux SDL_Swap16 = \
|
||||
"xchg al, ah" \
|
||||
parm [ax] \
|
||||
modify [ax];
|
||||
#else
|
||||
|
||||
/**
|
||||
* Use this function to swap the byte order of a 16-bit value.
|
||||
*
|
||||
* \param x the value to be swapped.
|
||||
* \returns the swapped value.
|
||||
*
|
||||
* \sa SDL_SwapBE16
|
||||
* \sa SDL_SwapLE16
|
||||
*/
|
||||
SDL_FORCE_INLINE Uint16
|
||||
SDL_Swap16(Uint16 x)
|
||||
{
|
||||
return SDL_static_cast(Uint16, ((x << 8) | (x >> 8)));
|
||||
}
|
||||
#endif
|
||||
|
||||
#if HAS_BUILTIN_BSWAP32
|
||||
#define SDL_Swap32(x) __builtin_bswap32(x)
|
||||
#elif (defined(_MSC_VER) && (_MSC_VER >= 1400)) && !defined(__ICL)
|
||||
#pragma intrinsic(_byteswap_ulong)
|
||||
#define SDL_Swap32(x) _byteswap_ulong(x)
|
||||
#elif defined(__i386__) && !HAS_BROKEN_BSWAP
|
||||
SDL_FORCE_INLINE Uint32
|
||||
SDL_Swap32(Uint32 x)
|
||||
{
|
||||
__asm__("bswap %0": "=r"(x):"0"(x));
|
||||
return x;
|
||||
}
|
||||
#elif defined(__x86_64__)
|
||||
SDL_FORCE_INLINE Uint32
|
||||
SDL_Swap32(Uint32 x)
|
||||
{
|
||||
__asm__("bswapl %0": "=r"(x):"0"(x));
|
||||
return x;
|
||||
}
|
||||
#elif (defined(__powerpc__) || defined(__ppc__))
|
||||
SDL_FORCE_INLINE Uint32
|
||||
SDL_Swap32(Uint32 x)
|
||||
{
|
||||
Uint32 result;
|
||||
|
||||
__asm__("rlwimi %0,%2,24,16,23": "=&r"(result): "0" (x>>24), "r"(x));
|
||||
__asm__("rlwimi %0,%2,8,8,15" : "=&r"(result): "0" (result), "r"(x));
|
||||
__asm__("rlwimi %0,%2,24,0,7" : "=&r"(result): "0" (result), "r"(x));
|
||||
return result;
|
||||
}
|
||||
#elif (defined(__m68k__) && !defined(__mcoldfire__))
|
||||
SDL_FORCE_INLINE Uint32
|
||||
SDL_Swap32(Uint32 x)
|
||||
{
|
||||
__asm__("rorw #8,%0\n\tswap %0\n\trorw #8,%0": "=d"(x): "0"(x):"cc");
|
||||
return x;
|
||||
}
|
||||
#elif defined(__WATCOMC__) && defined(__386__)
|
||||
extern __inline Uint32 SDL_Swap32(Uint32);
|
||||
#pragma aux SDL_Swap32 = \
|
||||
"bswap eax" \
|
||||
parm [eax] \
|
||||
modify [eax];
|
||||
#else
|
||||
|
||||
/**
|
||||
* Use this function to swap the byte order of a 32-bit value.
|
||||
*
|
||||
* \param x the value to be swapped.
|
||||
* \returns the swapped value.
|
||||
*
|
||||
* \sa SDL_SwapBE32
|
||||
* \sa SDL_SwapLE32
|
||||
*/
|
||||
SDL_FORCE_INLINE Uint32
|
||||
SDL_Swap32(Uint32 x)
|
||||
{
|
||||
return SDL_static_cast(Uint32, ((x << 24) | ((x << 8) & 0x00FF0000) |
|
||||
((x >> 8) & 0x0000FF00) | (x >> 24)));
|
||||
}
|
||||
#endif
|
||||
|
||||
#if HAS_BUILTIN_BSWAP64
|
||||
#define SDL_Swap64(x) __builtin_bswap64(x)
|
||||
#elif (defined(_MSC_VER) && (_MSC_VER >= 1400)) && !defined(__ICL)
|
||||
#pragma intrinsic(_byteswap_uint64)
|
||||
#define SDL_Swap64(x) _byteswap_uint64(x)
|
||||
#elif defined(__i386__) && !HAS_BROKEN_BSWAP
|
||||
SDL_FORCE_INLINE Uint64
|
||||
SDL_Swap64(Uint64 x)
|
||||
{
|
||||
union {
|
||||
struct {
|
||||
Uint32 a, b;
|
||||
} s;
|
||||
Uint64 u;
|
||||
} v;
|
||||
v.u = x;
|
||||
__asm__("bswapl %0 ; bswapl %1 ; xchgl %0,%1"
|
||||
: "=r"(v.s.a), "=r"(v.s.b)
|
||||
: "0" (v.s.a), "1"(v.s.b));
|
||||
return v.u;
|
||||
}
|
||||
#elif defined(__x86_64__)
|
||||
SDL_FORCE_INLINE Uint64
|
||||
SDL_Swap64(Uint64 x)
|
||||
{
|
||||
__asm__("bswapq %0": "=r"(x):"0"(x));
|
||||
return x;
|
||||
}
|
||||
#elif defined(__WATCOMC__) && defined(__386__)
|
||||
extern __inline Uint64 SDL_Swap64(Uint64);
|
||||
#pragma aux SDL_Swap64 = \
|
||||
"bswap eax" \
|
||||
"bswap edx" \
|
||||
"xchg eax,edx" \
|
||||
parm [eax edx] \
|
||||
modify [eax edx];
|
||||
#else
|
||||
|
||||
/**
|
||||
* Use this function to swap the byte order of a 64-bit value.
|
||||
*
|
||||
* \param x the value to be swapped.
|
||||
* \returns the swapped value.
|
||||
*
|
||||
* \sa SDL_SwapBE64
|
||||
* \sa SDL_SwapLE64
|
||||
*/
|
||||
SDL_FORCE_INLINE Uint64
|
||||
SDL_Swap64(Uint64 x)
|
||||
{
|
||||
Uint32 hi, lo;
|
||||
|
||||
/* Separate into high and low 32-bit values and swap them */
|
||||
lo = SDL_static_cast(Uint32, x & 0xFFFFFFFF);
|
||||
x >>= 32;
|
||||
hi = SDL_static_cast(Uint32, x & 0xFFFFFFFF);
|
||||
x = SDL_Swap32(lo);
|
||||
x <<= 32;
|
||||
x |= SDL_Swap32(hi);
|
||||
return (x);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* Use this function to swap the byte order of a floating point value.
|
||||
*
|
||||
* \param x the value to be swapped.
|
||||
* \returns the swapped value.
|
||||
*
|
||||
* \sa SDL_SwapFloatBE
|
||||
* \sa SDL_SwapFloatLE
|
||||
*/
|
||||
SDL_FORCE_INLINE float
|
||||
SDL_SwapFloat(float x)
|
||||
{
|
||||
union {
|
||||
float f;
|
||||
Uint32 ui32;
|
||||
} swapper;
|
||||
swapper.f = x;
|
||||
swapper.ui32 = SDL_Swap32(swapper.ui32);
|
||||
return swapper.f;
|
||||
}
|
||||
|
||||
/* remove extra macros */
|
||||
#undef HAS_BROKEN_BSWAP
|
||||
#undef HAS_BUILTIN_BSWAP16
|
||||
#undef HAS_BUILTIN_BSWAP32
|
||||
#undef HAS_BUILTIN_BSWAP64
|
||||
|
||||
/**
|
||||
* \name Swap to native
|
||||
* Byteswap item from the specified endianness to the native endianness.
|
||||
*/
|
||||
/* @{ */
|
||||
#if SDL_BYTEORDER == SDL_LIL_ENDIAN
|
||||
#define SDL_SwapLE16(X) (X)
|
||||
#define SDL_SwapLE32(X) (X)
|
||||
#define SDL_SwapLE64(X) (X)
|
||||
#define SDL_SwapFloatLE(X) (X)
|
||||
#define SDL_SwapBE16(X) SDL_Swap16(X)
|
||||
#define SDL_SwapBE32(X) SDL_Swap32(X)
|
||||
#define SDL_SwapBE64(X) SDL_Swap64(X)
|
||||
#define SDL_SwapFloatBE(X) SDL_SwapFloat(X)
|
||||
#else
|
||||
#define SDL_SwapLE16(X) SDL_Swap16(X)
|
||||
#define SDL_SwapLE32(X) SDL_Swap32(X)
|
||||
#define SDL_SwapLE64(X) SDL_Swap64(X)
|
||||
#define SDL_SwapFloatLE(X) SDL_SwapFloat(X)
|
||||
#define SDL_SwapBE16(X) (X)
|
||||
#define SDL_SwapBE32(X) (X)
|
||||
#define SDL_SwapBE64(X) (X)
|
||||
#define SDL_SwapFloatBE(X) (X)
|
||||
#endif
|
||||
/* @} *//* Swap to native */
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* SDL_endian_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
163
build-tests/Libraries/SDL/include/SDL2/SDL_error.h
Normal file
163
build-tests/Libraries/SDL/include/SDL2/SDL_error.h
Normal file
@ -0,0 +1,163 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* # CategoryError
|
||||
*
|
||||
* Simple error message routines for SDL.
|
||||
*/
|
||||
|
||||
#ifndef SDL_error_h_
|
||||
#define SDL_error_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/* Public functions */
|
||||
|
||||
|
||||
/**
|
||||
* Set the SDL error message for the current thread.
|
||||
*
|
||||
* Calling this function will replace any previous error message that was set.
|
||||
*
|
||||
* This function always returns -1, since SDL frequently uses -1 to signify an
|
||||
* failing result, leading to this idiom:
|
||||
*
|
||||
* ```c
|
||||
* if (error_code) {
|
||||
* return SDL_SetError("This operation has failed: %d", error_code);
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* \param fmt a printf()-style message format string.
|
||||
* \param ... additional parameters matching % tokens in the `fmt` string, if
|
||||
* any.
|
||||
* \returns always -1.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_ClearError
|
||||
* \sa SDL_GetError
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SetError(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1);
|
||||
|
||||
/**
|
||||
* Retrieve a message about the last error that occurred on the current
|
||||
* thread.
|
||||
*
|
||||
* It is possible for multiple errors to occur before calling SDL_GetError().
|
||||
* Only the last error is returned.
|
||||
*
|
||||
* The message is only applicable when an SDL function has signaled an error.
|
||||
* You must check the return values of SDL function calls to determine when to
|
||||
* appropriately call SDL_GetError(). You should *not* use the results of
|
||||
* SDL_GetError() to decide if an error has occurred! Sometimes SDL will set
|
||||
* an error string even when reporting success.
|
||||
*
|
||||
* SDL will *not* clear the error string for successful API calls. You *must*
|
||||
* check return values for failure cases before you can assume the error
|
||||
* string applies.
|
||||
*
|
||||
* Error strings are set per-thread, so an error set in a different thread
|
||||
* will not interfere with the current thread's operation.
|
||||
*
|
||||
* The returned string is internally allocated and must not be freed by the
|
||||
* application.
|
||||
*
|
||||
* \returns a message with information about the specific error that occurred,
|
||||
* or an empty string if there hasn't been an error message set since
|
||||
* the last call to SDL_ClearError(). The message is only applicable
|
||||
* when an SDL function has signaled an error. You must check the
|
||||
* return values of SDL function calls to determine when to
|
||||
* appropriately call SDL_GetError().
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_ClearError
|
||||
* \sa SDL_SetError
|
||||
*/
|
||||
extern DECLSPEC const char *SDLCALL SDL_GetError(void);
|
||||
|
||||
/**
|
||||
* Get the last error message that was set for the current thread.
|
||||
*
|
||||
* This allows the caller to copy the error string into a provided buffer, but
|
||||
* otherwise operates exactly the same as SDL_GetError().
|
||||
*
|
||||
* \param errstr A buffer to fill with the last error message that was set for
|
||||
* the current thread.
|
||||
* \param maxlen The size of the buffer pointed to by the errstr parameter.
|
||||
* \returns the pointer passed in as the `errstr` parameter.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.14.
|
||||
*
|
||||
* \sa SDL_GetError
|
||||
*/
|
||||
extern DECLSPEC char * SDLCALL SDL_GetErrorMsg(char *errstr, int maxlen);
|
||||
|
||||
/**
|
||||
* Clear any previous error message for this thread.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GetError
|
||||
* \sa SDL_SetError
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_ClearError(void);
|
||||
|
||||
/**
|
||||
* \name Internal error functions
|
||||
*
|
||||
* \internal
|
||||
* Private error reporting function - used internally.
|
||||
*/
|
||||
/* @{ */
|
||||
#define SDL_OutOfMemory() SDL_Error(SDL_ENOMEM)
|
||||
#define SDL_Unsupported() SDL_Error(SDL_UNSUPPORTED)
|
||||
#define SDL_InvalidParamError(param) SDL_SetError("Parameter '%s' is invalid", (param))
|
||||
typedef enum
|
||||
{
|
||||
SDL_ENOMEM,
|
||||
SDL_EFREAD,
|
||||
SDL_EFWRITE,
|
||||
SDL_EFSEEK,
|
||||
SDL_UNSUPPORTED,
|
||||
SDL_LASTERROR
|
||||
} SDL_errorcode;
|
||||
/* SDL_Error() unconditionally returns -1. */
|
||||
extern DECLSPEC int SDLCALL SDL_Error(SDL_errorcode code);
|
||||
/* @} *//* Internal error functions */
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* SDL_error_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
1196
build-tests/Libraries/SDL/include/SDL2/SDL_events.h
Normal file
1196
build-tests/Libraries/SDL/include/SDL2/SDL_events.h
Normal file
File diff suppressed because it is too large
Load Diff
149
build-tests/Libraries/SDL/include/SDL2/SDL_filesystem.h
Normal file
149
build-tests/Libraries/SDL/include/SDL2/SDL_filesystem.h
Normal file
@ -0,0 +1,149 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* # CategoryFilesystem
|
||||
*
|
||||
* Include file for filesystem SDL API functions
|
||||
*/
|
||||
|
||||
#ifndef SDL_filesystem_h_
|
||||
#define SDL_filesystem_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Get the directory where the application was run from.
|
||||
*
|
||||
* This is not necessarily a fast call, so you should call this once near
|
||||
* startup and save the string if you need it.
|
||||
*
|
||||
* **Mac OS X and iOS Specific Functionality**: If the application is in a
|
||||
* ".app" bundle, this function returns the Resource directory (e.g.
|
||||
* MyApp.app/Contents/Resources/). This behaviour can be overridden by adding
|
||||
* a property to the Info.plist file. Adding a string key with the name
|
||||
* SDL_FILESYSTEM_BASE_DIR_TYPE with a supported value will change the
|
||||
* behaviour.
|
||||
*
|
||||
* Supported values for the SDL_FILESYSTEM_BASE_DIR_TYPE property (Given an
|
||||
* application in /Applications/SDLApp/MyApp.app):
|
||||
*
|
||||
* - `resource`: bundle resource directory (the default). For example:
|
||||
* `/Applications/SDLApp/MyApp.app/Contents/Resources`
|
||||
* - `bundle`: the Bundle directory. For example:
|
||||
* `/Applications/SDLApp/MyApp.app/`
|
||||
* - `parent`: the containing directory of the bundle. For example:
|
||||
* `/Applications/SDLApp/`
|
||||
*
|
||||
* **Nintendo 3DS Specific Functionality**: This function returns "romfs"
|
||||
* directory of the application as it is uncommon to store resources outside
|
||||
* the executable. As such it is not a writable directory.
|
||||
*
|
||||
* The returned path is guaranteed to end with a path separator ('\\' on
|
||||
* Windows, '/' on most other platforms).
|
||||
*
|
||||
* The pointer returned is owned by the caller. Please call SDL_free() on the
|
||||
* pointer when done with it.
|
||||
*
|
||||
* \returns an absolute path in UTF-8 encoding to the application data
|
||||
* directory. NULL will be returned on error or when the platform
|
||||
* doesn't implement this functionality, call SDL_GetError() for more
|
||||
* information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.1.
|
||||
*
|
||||
* \sa SDL_GetPrefPath
|
||||
*/
|
||||
extern DECLSPEC char *SDLCALL SDL_GetBasePath(void);
|
||||
|
||||
/**
|
||||
* Get the user-and-app-specific path where files can be written.
|
||||
*
|
||||
* Get the "pref dir". This is meant to be where users can write personal
|
||||
* files (preferences and save games, etc) that are specific to your
|
||||
* application. This directory is unique per user, per application.
|
||||
*
|
||||
* This function will decide the appropriate location in the native
|
||||
* filesystem, create the directory if necessary, and return a string of the
|
||||
* absolute path to the directory in UTF-8 encoding.
|
||||
*
|
||||
* On Windows, the string might look like:
|
||||
*
|
||||
* `C:\\Users\\bob\\AppData\\Roaming\\My Company\\My Program Name\\`
|
||||
*
|
||||
* On Linux, the string might look like:
|
||||
*
|
||||
* `/home/bob/.local/share/My Program Name/`
|
||||
*
|
||||
* On Mac OS X, the string might look like:
|
||||
*
|
||||
* `/Users/bob/Library/Application Support/My Program Name/`
|
||||
*
|
||||
* You should assume the path returned by this function is the only safe place
|
||||
* to write files (and that SDL_GetBasePath(), while it might be writable, or
|
||||
* even the parent of the returned path, isn't where you should be writing
|
||||
* things).
|
||||
*
|
||||
* Both the org and app strings may become part of a directory name, so please
|
||||
* follow these rules:
|
||||
*
|
||||
* - Try to use the same org string (_including case-sensitivity_) for all
|
||||
* your applications that use this function.
|
||||
* - Always use a unique app string for each one, and make sure it never
|
||||
* changes for an app once you've decided on it.
|
||||
* - Unicode characters are legal, as long as it's UTF-8 encoded, but...
|
||||
* - ...only use letters, numbers, and spaces. Avoid punctuation like "Game
|
||||
* Name 2: Bad Guy's Revenge!" ... "Game Name 2" is sufficient.
|
||||
*
|
||||
* The returned path is guaranteed to end with a path separator ('\\' on
|
||||
* Windows, '/' on most other platforms).
|
||||
*
|
||||
* The pointer returned is owned by the caller. Please call SDL_free() on the
|
||||
* pointer when done with it.
|
||||
*
|
||||
* \param org the name of your organization.
|
||||
* \param app the name of your application.
|
||||
* \returns a UTF-8 string of the user directory in platform-dependent
|
||||
* notation. NULL if there's a problem (creating directory failed,
|
||||
* etc.).
|
||||
*
|
||||
* \since This function is available since SDL 2.0.1.
|
||||
*
|
||||
* \sa SDL_GetBasePath
|
||||
*/
|
||||
extern DECLSPEC char *SDLCALL SDL_GetPrefPath(const char *org, const char *app);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* SDL_filesystem_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
1127
build-tests/Libraries/SDL/include/SDL2/SDL_gamecontroller.h
Normal file
1127
build-tests/Libraries/SDL/include/SDL2/SDL_gamecontroller.h
Normal file
File diff suppressed because it is too large
Load Diff
117
build-tests/Libraries/SDL/include/SDL2/SDL_gesture.h
Normal file
117
build-tests/Libraries/SDL/include/SDL2/SDL_gesture.h
Normal file
@ -0,0 +1,117 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/**
|
||||
* # CategoryGesture
|
||||
*
|
||||
* Include file for SDL gesture event handling.
|
||||
*/
|
||||
|
||||
#ifndef SDL_gesture_h_
|
||||
#define SDL_gesture_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
#include "SDL_video.h"
|
||||
|
||||
#include "SDL_touch.h"
|
||||
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef Sint64 SDL_GestureID;
|
||||
|
||||
/* Function prototypes */
|
||||
|
||||
/**
|
||||
* Begin recording a gesture on a specified touch device or all touch devices.
|
||||
*
|
||||
* If the parameter `touchId` is -1 (i.e., all devices), this function will
|
||||
* always return 1, regardless of whether there actually are any devices.
|
||||
*
|
||||
* \param touchId the touch device id, or -1 for all touch devices.
|
||||
* \returns 1 on success or 0 if the specified device could not be found.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_GetTouchDevice
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_RecordGesture(SDL_TouchID touchId);
|
||||
|
||||
|
||||
/**
|
||||
* Save all currently loaded Dollar Gesture templates.
|
||||
*
|
||||
* \param dst a SDL_RWops to save to.
|
||||
* \returns the number of saved templates on success or 0 on failure; call
|
||||
* SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_LoadDollarTemplates
|
||||
* \sa SDL_SaveDollarTemplate
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SaveAllDollarTemplates(SDL_RWops *dst);
|
||||
|
||||
/**
|
||||
* Save a currently loaded Dollar Gesture template.
|
||||
*
|
||||
* \param gestureId a gesture id.
|
||||
* \param dst a SDL_RWops to save to.
|
||||
* \returns 1 on success or 0 on failure; call SDL_GetError() for more
|
||||
* information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_LoadDollarTemplates
|
||||
* \sa SDL_SaveAllDollarTemplates
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_SaveDollarTemplate(SDL_GestureID gestureId,SDL_RWops *dst);
|
||||
|
||||
|
||||
/**
|
||||
* Load Dollar Gesture templates from a file.
|
||||
*
|
||||
* \param touchId a touch id.
|
||||
* \param src a SDL_RWops to load from.
|
||||
* \returns the number of loaded templates on success or a negative error code
|
||||
* (or 0) on failure; call SDL_GetError() for more information.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.0.
|
||||
*
|
||||
* \sa SDL_SaveAllDollarTemplates
|
||||
* \sa SDL_SaveDollarTemplate
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_LoadDollarTemplates(SDL_TouchID touchId, SDL_RWops *src);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* SDL_gesture_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
107
build-tests/Libraries/SDL/include/SDL2/SDL_guid.h
Normal file
107
build-tests/Libraries/SDL/include/SDL2/SDL_guid.h
Normal file
@ -0,0 +1,107 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/* WIKI CATEGORY: GUID */
|
||||
|
||||
/**
|
||||
* # CategoryGUID
|
||||
*
|
||||
* A GUID is a 128-bit value that represents something that is uniquely
|
||||
* identifiable by this value: "globally unique."
|
||||
*/
|
||||
|
||||
#ifndef SDL_guid_h_
|
||||
#define SDL_guid_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
#include "SDL_error.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* An SDL_GUID is a 128-bit identifier.
|
||||
*
|
||||
* This is an acronym for "Globally Unique ID."
|
||||
*
|
||||
* While a GUID can be used to assign a unique value to almost anything, in
|
||||
* SDL these are largely used to identify input devices across runs of SDL
|
||||
* programs on the same platform.If the device is detached and then
|
||||
* re-attached to a different port, or if the base system is rebooted, the
|
||||
* device should still report the same GUID.
|
||||
*
|
||||
* GUIDs are as precise as possible but are not guaranteed to distinguish
|
||||
* physically distinct but equivalent devices. For example, two game
|
||||
* controllers from the same vendor with the same product ID and revision may
|
||||
* have the same GUID.
|
||||
*
|
||||
* GUIDs may be platform-dependent (i.e., the same device may report different
|
||||
* GUIDs on different operating systems).
|
||||
*/
|
||||
typedef struct SDL_GUID {
|
||||
Uint8 data[16];
|
||||
} SDL_GUID;
|
||||
|
||||
/* Function prototypes */
|
||||
|
||||
/**
|
||||
* Get an ASCII string representation for a given SDL_GUID.
|
||||
*
|
||||
* You should supply at least 33 bytes for pszGUID.
|
||||
*
|
||||
* \param guid the SDL_GUID you wish to convert to string.
|
||||
* \param pszGUID buffer in which to write the ASCII string.
|
||||
* \param cbGUID the size of pszGUID.
|
||||
*
|
||||
* \since This function is available since SDL 2.24.0.
|
||||
*
|
||||
* \sa SDL_GUIDFromString
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_GUIDToString(SDL_GUID guid, char *pszGUID, int cbGUID);
|
||||
|
||||
/**
|
||||
* Convert a GUID string into a SDL_GUID structure.
|
||||
*
|
||||
* Performs no error checking. If this function is given a string containing
|
||||
* an invalid GUID, the function will silently succeed, but the GUID generated
|
||||
* will not be useful.
|
||||
*
|
||||
* \param pchGUID string containing an ASCII representation of a GUID.
|
||||
* \returns a SDL_GUID structure.
|
||||
*
|
||||
* \since This function is available since SDL 2.24.0.
|
||||
*
|
||||
* \sa SDL_GUIDToString
|
||||
*/
|
||||
extern DECLSPEC SDL_GUID SDLCALL SDL_GUIDFromString(const char *pchGUID);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* SDL_guid_h_ */
|
||||
|
||||
/* vi: set ts=4 sw=4 expandtab: */
|
||||
1354
build-tests/Libraries/SDL/include/SDL2/SDL_haptic.h
Normal file
1354
build-tests/Libraries/SDL/include/SDL2/SDL_haptic.h
Normal file
File diff suppressed because it is too large
Load Diff
444
build-tests/Libraries/SDL/include/SDL2/SDL_hidapi.h
Normal file
444
build-tests/Libraries/SDL/include/SDL2/SDL_hidapi.h
Normal file
@ -0,0 +1,444 @@
|
||||
/*
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2025 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
*/
|
||||
|
||||
/* WIKI CATEGORY: HIDAPI */
|
||||
|
||||
/**
|
||||
* # CategoryHIDAPI
|
||||
*
|
||||
* Header file for SDL HIDAPI functions.
|
||||
*
|
||||
* This is an adaptation of the original HIDAPI interface by Alan Ott, and
|
||||
* includes source code licensed under the following license:
|
||||
*
|
||||
* ```
|
||||
* HIDAPI - Multi-Platform library for
|
||||
* communication with HID devices.
|
||||
*
|
||||
* Copyright 2009, Alan Ott, Signal 11 Software.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* This software may be used by anyone for any reason so
|
||||
* long as the copyright notice in the source files
|
||||
* remains intact.
|
||||
* ```
|
||||
*
|
||||
* (Note that this license is the same as item three of SDL's zlib license, so
|
||||
* it adds no new requirements on the user.)
|
||||
*
|
||||
* If you would like a version of SDL without this code, you can build SDL
|
||||
* with SDL_HIDAPI_DISABLED defined to 1. You might want to do this for
|
||||
* example on iOS or tvOS to avoid a dependency on the CoreBluetooth
|
||||
* framework.
|
||||
*/
|
||||
|
||||
#ifndef SDL_hidapi_h_
|
||||
#define SDL_hidapi_h_
|
||||
|
||||
#include "SDL_stdinc.h"
|
||||
|
||||
#include "begin_code.h"
|
||||
/* Set up for C function definitions, even when using C++ */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* A handle representing an open HID device
|
||||
*/
|
||||
struct SDL_hid_device_;
|
||||
typedef struct SDL_hid_device_ SDL_hid_device; /**< opaque hidapi structure */
|
||||
|
||||
/** hidapi info structure */
|
||||
|
||||
/**
|
||||
* Information about a connected HID device
|
||||
*/
|
||||
typedef struct SDL_hid_device_info
|
||||
{
|
||||
/** Platform-specific device path */
|
||||
char *path;
|
||||
/** Device Vendor ID */
|
||||
unsigned short vendor_id;
|
||||
/** Device Product ID */
|
||||
unsigned short product_id;
|
||||
/** Serial Number */
|
||||
wchar_t *serial_number;
|
||||
/** Device Release Number in binary-coded decimal,
|
||||
also known as Device Version Number */
|
||||
unsigned short release_number;
|
||||
/** Manufacturer String */
|
||||
wchar_t *manufacturer_string;
|
||||
/** Product string */
|
||||
wchar_t *product_string;
|
||||
/** Usage Page for this Device/Interface
|
||||
(Windows/Mac only). */
|
||||
unsigned short usage_page;
|
||||
/** Usage for this Device/Interface
|
||||
(Windows/Mac only).*/
|
||||
unsigned short usage;
|
||||
/** The USB interface which this logical device
|
||||
represents.
|
||||
|
||||
* Valid on both Linux implementations in all cases.
|
||||
* Valid on the Windows implementation only if the device
|
||||
contains more than one interface. */
|
||||
int interface_number;
|
||||
|
||||
/** Additional information about the USB interface.
|
||||
Valid on libusb and Android implementations. */
|
||||
int interface_class;
|
||||
int interface_subclass;
|
||||
int interface_protocol;
|
||||
|
||||
/** Pointer to the next device */
|
||||
struct SDL_hid_device_info *next;
|
||||
} SDL_hid_device_info;
|
||||
|
||||
|
||||
/**
|
||||
* Initialize the HIDAPI library.
|
||||
*
|
||||
* This function initializes the HIDAPI library. Calling it is not strictly
|
||||
* necessary, as it will be called automatically by SDL_hid_enumerate() and
|
||||
* any of the SDL_hid_open_*() functions if it is needed. This function should
|
||||
* be called at the beginning of execution however, if there is a chance of
|
||||
* HIDAPI handles being opened by different threads simultaneously.
|
||||
*
|
||||
* Each call to this function should have a matching call to SDL_hid_exit()
|
||||
*
|
||||
* \returns 0 on success and -1 on error.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*
|
||||
* \sa SDL_hid_exit
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_hid_init(void);
|
||||
|
||||
/**
|
||||
* Finalize the HIDAPI library.
|
||||
*
|
||||
* This function frees all of the static data associated with HIDAPI. It
|
||||
* should be called at the end of execution to avoid memory leaks.
|
||||
*
|
||||
* \returns 0 on success and -1 on error.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*
|
||||
* \sa SDL_hid_init
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_hid_exit(void);
|
||||
|
||||
/**
|
||||
* Check to see if devices may have been added or removed.
|
||||
*
|
||||
* Enumerating the HID devices is an expensive operation, so you can call this
|
||||
* to see if there have been any system device changes since the last call to
|
||||
* this function. A change in the counter returned doesn't necessarily mean
|
||||
* that anything has changed, but you can call SDL_hid_enumerate() to get an
|
||||
* updated device list.
|
||||
*
|
||||
* Calling this function for the first time may cause a thread or other system
|
||||
* resource to be allocated to track device change notifications.
|
||||
*
|
||||
* \returns a change counter that is incremented with each potential device
|
||||
* change, or 0 if device change detection isn't available.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*
|
||||
* \sa SDL_hid_enumerate
|
||||
*/
|
||||
extern DECLSPEC Uint32 SDLCALL SDL_hid_device_change_count(void);
|
||||
|
||||
/**
|
||||
* Enumerate the HID Devices.
|
||||
*
|
||||
* This function returns a linked list of all the HID devices attached to the
|
||||
* system which match vendor_id and product_id. If `vendor_id` is set to 0
|
||||
* then any vendor matches. If `product_id` is set to 0 then any product
|
||||
* matches. If `vendor_id` and `product_id` are both set to 0, then all HID
|
||||
* devices will be returned.
|
||||
*
|
||||
* \param vendor_id The Vendor ID (VID) of the types of device to open.
|
||||
* \param product_id The Product ID (PID) of the types of device to open.
|
||||
* \returns a pointer to a linked list of type SDL_hid_device_info, containing
|
||||
* information about the HID devices attached to the system, or NULL
|
||||
* in the case of failure. Free this linked list by calling
|
||||
* SDL_hid_free_enumeration().
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*
|
||||
* \sa SDL_hid_device_change_count
|
||||
*/
|
||||
extern DECLSPEC SDL_hid_device_info * SDLCALL SDL_hid_enumerate(unsigned short vendor_id, unsigned short product_id);
|
||||
|
||||
/**
|
||||
* Free an enumeration Linked List
|
||||
*
|
||||
* This function frees a linked list created by SDL_hid_enumerate().
|
||||
*
|
||||
* \param devs Pointer to a list of struct_device returned from
|
||||
* SDL_hid_enumerate().
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_hid_free_enumeration(SDL_hid_device_info *devs);
|
||||
|
||||
/**
|
||||
* Open a HID device using a Vendor ID (VID), Product ID (PID) and optionally
|
||||
* a serial number.
|
||||
*
|
||||
* If `serial_number` is NULL, the first device with the specified VID and PID
|
||||
* is opened.
|
||||
*
|
||||
* \param vendor_id The Vendor ID (VID) of the device to open.
|
||||
* \param product_id The Product ID (PID) of the device to open.
|
||||
* \param serial_number The Serial Number of the device to open (Optionally
|
||||
* NULL).
|
||||
* \returns a pointer to a SDL_hid_device object on success or NULL on
|
||||
* failure.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*/
|
||||
extern DECLSPEC SDL_hid_device * SDLCALL SDL_hid_open(unsigned short vendor_id, unsigned short product_id, const wchar_t *serial_number);
|
||||
|
||||
/**
|
||||
* Open a HID device by its path name.
|
||||
*
|
||||
* The path name be determined by calling SDL_hid_enumerate(), or a
|
||||
* platform-specific path name can be used (eg: /dev/hidraw0 on Linux).
|
||||
*
|
||||
* \param path The path name of the device to open.
|
||||
* \param bExclusive boolean exclusive.
|
||||
* \returns a pointer to a SDL_hid_device object on success or NULL on
|
||||
* failure.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*/
|
||||
extern DECLSPEC SDL_hid_device * SDLCALL SDL_hid_open_path(const char *path, int bExclusive);
|
||||
|
||||
/**
|
||||
* Write an Output report to a HID device.
|
||||
*
|
||||
* The first byte of `data` must contain the Report ID. For devices which only
|
||||
* support a single report, this must be set to 0x0. The remaining bytes
|
||||
* contain the report data. Since the Report ID is mandatory, calls to
|
||||
* SDL_hid_write() will always contain one more byte than the report contains.
|
||||
* For example, if a hid report is 16 bytes long, 17 bytes must be passed to
|
||||
* SDL_hid_write(), the Report ID (or 0x0, for devices with a single report),
|
||||
* followed by the report data (16 bytes). In this example, the length passed
|
||||
* in would be 17.
|
||||
*
|
||||
* SDL_hid_write() will send the data on the first OUT endpoint, if one
|
||||
* exists. If it does not, it will send the data through the Control Endpoint
|
||||
* (Endpoint 0).
|
||||
*
|
||||
* \param dev A device handle returned from SDL_hid_open().
|
||||
* \param data The data to send, including the report number as the first
|
||||
* byte.
|
||||
* \param length The length in bytes of the data to send.
|
||||
* \returns the actual number of bytes written and -1 on error.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_hid_write(SDL_hid_device *dev, const unsigned char *data, size_t length);
|
||||
|
||||
/**
|
||||
* Read an Input report from a HID device with timeout.
|
||||
*
|
||||
* Input reports are returned to the host through the INTERRUPT IN endpoint.
|
||||
* The first byte will contain the Report number if the device uses numbered
|
||||
* reports.
|
||||
*
|
||||
* \param dev A device handle returned from SDL_hid_open().
|
||||
* \param data A buffer to put the read data into.
|
||||
* \param length The number of bytes to read. For devices with multiple
|
||||
* reports, make sure to read an extra byte for the report
|
||||
* number.
|
||||
* \param milliseconds timeout in milliseconds or -1 for blocking wait.
|
||||
* \returns the actual number of bytes read and -1 on error. If no packet was
|
||||
* available to be read within the timeout period, this function
|
||||
* returns 0.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_hid_read_timeout(SDL_hid_device *dev, unsigned char *data, size_t length, int milliseconds);
|
||||
|
||||
/**
|
||||
* Read an Input report from a HID device.
|
||||
*
|
||||
* Input reports are returned to the host through the INTERRUPT IN endpoint.
|
||||
* The first byte will contain the Report number if the device uses numbered
|
||||
* reports.
|
||||
*
|
||||
* \param dev A device handle returned from SDL_hid_open().
|
||||
* \param data A buffer to put the read data into.
|
||||
* \param length The number of bytes to read. For devices with multiple
|
||||
* reports, make sure to read an extra byte for the report
|
||||
* number.
|
||||
* \returns the actual number of bytes read and -1 on error. If no packet was
|
||||
* available to be read and the handle is in non-blocking mode, this
|
||||
* function returns 0.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_hid_read(SDL_hid_device *dev, unsigned char *data, size_t length);
|
||||
|
||||
/**
|
||||
* Set the device handle to be non-blocking.
|
||||
*
|
||||
* In non-blocking mode calls to SDL_hid_read() will return immediately with a
|
||||
* value of 0 if there is no data to be read. In blocking mode, SDL_hid_read()
|
||||
* will wait (block) until there is data to read before returning.
|
||||
*
|
||||
* Nonblocking can be turned on and off at any time.
|
||||
*
|
||||
* \param dev A device handle returned from SDL_hid_open().
|
||||
* \param nonblock enable or not the nonblocking reads - 1 to enable
|
||||
* nonblocking - 0 to disable nonblocking.
|
||||
* \returns 0 on success and -1 on error.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_hid_set_nonblocking(SDL_hid_device *dev, int nonblock);
|
||||
|
||||
/**
|
||||
* Send a Feature report to the device.
|
||||
*
|
||||
* Feature reports are sent over the Control endpoint as a Set_Report
|
||||
* transfer. The first byte of `data` must contain the Report ID. For devices
|
||||
* which only support a single report, this must be set to 0x0. The remaining
|
||||
* bytes contain the report data. Since the Report ID is mandatory, calls to
|
||||
* SDL_hid_send_feature_report() will always contain one more byte than the
|
||||
* report contains. For example, if a hid report is 16 bytes long, 17 bytes
|
||||
* must be passed to SDL_hid_send_feature_report(): the Report ID (or 0x0, for
|
||||
* devices which do not use numbered reports), followed by the report data (16
|
||||
* bytes). In this example, the length passed in would be 17.
|
||||
*
|
||||
* \param dev A device handle returned from SDL_hid_open().
|
||||
* \param data The data to send, including the report number as the first
|
||||
* byte.
|
||||
* \param length The length in bytes of the data to send, including the report
|
||||
* number.
|
||||
* \returns the actual number of bytes written and -1 on error.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_hid_send_feature_report(SDL_hid_device *dev, const unsigned char *data, size_t length);
|
||||
|
||||
/**
|
||||
* Get a feature report from a HID device.
|
||||
*
|
||||
* Set the first byte of `data` to the Report ID of the report to be read.
|
||||
* Make sure to allow space for this extra byte in `data`. Upon return, the
|
||||
* first byte will still contain the Report ID, and the report data will start
|
||||
* in data[1].
|
||||
*
|
||||
* \param dev A device handle returned from SDL_hid_open().
|
||||
* \param data A buffer to put the read data into, including the Report ID.
|
||||
* Set the first byte of `data` to the Report ID of the report to
|
||||
* be read, or set it to zero if your device does not use numbered
|
||||
* reports.
|
||||
* \param length The number of bytes to read, including an extra byte for the
|
||||
* report ID. The buffer can be longer than the actual report.
|
||||
* \returns the number of bytes read plus one for the report ID (which is
|
||||
* still in the first byte), or -1 on error.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_hid_get_feature_report(SDL_hid_device *dev, unsigned char *data, size_t length);
|
||||
|
||||
/**
|
||||
* Close a HID device.
|
||||
*
|
||||
* \param dev A device handle returned from SDL_hid_open().
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_hid_close(SDL_hid_device *dev);
|
||||
|
||||
/**
|
||||
* Get The Manufacturer String from a HID device.
|
||||
*
|
||||
* \param dev A device handle returned from SDL_hid_open().
|
||||
* \param string A wide string buffer to put the data into.
|
||||
* \param maxlen The length of the buffer in multiples of wchar_t.
|
||||
* \returns 0 on success and -1 on error.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_hid_get_manufacturer_string(SDL_hid_device *dev, wchar_t *string, size_t maxlen);
|
||||
|
||||
/**
|
||||
* Get The Product String from a HID device.
|
||||
*
|
||||
* \param dev A device handle returned from SDL_hid_open().
|
||||
* \param string A wide string buffer to put the data into.
|
||||
* \param maxlen The length of the buffer in multiples of wchar_t.
|
||||
* \returns 0 on success and -1 on error.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_hid_get_product_string(SDL_hid_device *dev, wchar_t *string, size_t maxlen);
|
||||
|
||||
/**
|
||||
* Get The Serial Number String from a HID device.
|
||||
*
|
||||
* \param dev A device handle returned from SDL_hid_open().
|
||||
* \param string A wide string buffer to put the data into.
|
||||
* \param maxlen The length of the buffer in multiples of wchar_t.
|
||||
* \returns 0 on success and -1 on error.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_hid_get_serial_number_string(SDL_hid_device *dev, wchar_t *string, size_t maxlen);
|
||||
|
||||
/**
|
||||
* Get a string from a HID device, based on its string index.
|
||||
*
|
||||
* \param dev A device handle returned from SDL_hid_open().
|
||||
* \param string_index The index of the string to get.
|
||||
* \param string A wide string buffer to put the data into.
|
||||
* \param maxlen The length of the buffer in multiples of wchar_t.
|
||||
* \returns 0 on success and -1 on error.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*/
|
||||
extern DECLSPEC int SDLCALL SDL_hid_get_indexed_string(SDL_hid_device *dev, int string_index, wchar_t *string, size_t maxlen);
|
||||
|
||||
/**
|
||||
* Start or stop a BLE scan on iOS and tvOS to pair Steam Controllers
|
||||
*
|
||||
* \param active SDL_TRUE to start the scan, SDL_FALSE to stop the scan.
|
||||
*
|
||||
* \since This function is available since SDL 2.0.18.
|
||||
*/
|
||||
extern DECLSPEC void SDLCALL SDL_hid_ble_scan(SDL_bool active);
|
||||
|
||||
/* Ends C function definitions when using C++ */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#include "close_code.h"
|
||||
|
||||
#endif /* SDL_hidapi_h_ */
|
||||
|
||||
/* vi: set sts=4 ts=4 sw=4 expandtab: */
|
||||
3334
build-tests/Libraries/SDL/include/SDL2/SDL_hints.h
Normal file
3334
build-tests/Libraries/SDL/include/SDL2/SDL_hints.h
Normal file
File diff suppressed because it is too large
Load Diff
1096
build-tests/Libraries/SDL/include/SDL2/SDL_joystick.h
Normal file
1096
build-tests/Libraries/SDL/include/SDL2/SDL_joystick.h
Normal file
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user