ram, instr reel, runtime, etc
This commit is contained in:
@@ -1,17 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
// ========================================================== //
|
||||
// Compiling or Writing? //
|
||||
// ========================================================== //
|
||||
|
||||
#ifdef SPIDER_WRITING
|
||||
#error "[Spider Distro] Please do not set this macro."
|
||||
#endif
|
||||
|
||||
#ifndef SPIDER_COMPILING
|
||||
#define SPIDER_WRITING
|
||||
#endif
|
||||
|
||||
// ========================================================== //
|
||||
// Distro //
|
||||
// ========================================================== //
|
||||
@@ -43,11 +31,9 @@
|
||||
#define SPIDER_DISTRO_DESKTOP
|
||||
#define SPIDER_OS_LINUX
|
||||
#else
|
||||
// ========================================================== //
|
||||
// MUST be a microcontroller! //
|
||||
// ========================================================== //
|
||||
#include <spider/config_mcu.hpp>
|
||||
#ifdef SPIDER_DISTRO_MICRO
|
||||
// === MUST be a microcontroller! === //
|
||||
#include <spider/runtime/native/distro_mcu.hpp>
|
||||
#ifndef SPIDER_DISTRO_MICRO
|
||||
#error "[Spider Distro] Could not autodetect. Please select a distro and OS manually."
|
||||
#endif
|
||||
#endif
|
||||
@@ -107,8 +93,6 @@
|
||||
|
||||
#elif defined(SPIDER_DISTRO_MICRO)
|
||||
|
||||
#include <spider/runtime/native/distro_mcu.hpp>
|
||||
|
||||
#define SPIDER_DISTRO_NAME "Micro"
|
||||
|
||||
#if !defined(SPIDER_USE_ICU) && !defined(SPIDER_NO_ICU)
|
||||
@@ -127,4 +111,5 @@
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
// === Include Distro Defaults === //
|
||||
#include <spider/runtime/native/distro_defs.hpp>
|
||||
|
||||
40
src/spider/runtime/native/distro_defs.hpp
Normal file
40
src/spider/runtime/native/distro_defs.hpp
Normal file
@@ -0,0 +1,40 @@
|
||||
#pragma once
|
||||
|
||||
// ========================================================== //
|
||||
// SPIDER DEFAULT SETTINGS, PER DISTRO //
|
||||
// ========================================================== //
|
||||
|
||||
|
||||
// ================== MEMORY FOOTPRINT ================== //
|
||||
|
||||
/**
|
||||
* Use a normal amount of memory, assuming there
|
||||
* is like 100KB free of it.
|
||||
*/
|
||||
#define SPIDER_MEMFOOTPRINT_NORMAL 0
|
||||
/**
|
||||
* Attempt to reduce the memory footprint
|
||||
* where possible, but without doing
|
||||
* extreme adaptations.
|
||||
*/
|
||||
#define SPIDER_MEMFOOTPRINT_REDUCED 1
|
||||
/**
|
||||
* Will deliverately convert things from memory
|
||||
* to functions in order to free as much memory
|
||||
* as possible, even if it slows things down.
|
||||
*/
|
||||
#define SPIDER_MEMFOOTPRINT_MINIMAL 2
|
||||
|
||||
#ifndef SPIDER_MEMFOOTPRINT
|
||||
#if defined(SPIDER_DISTRO_MOBILE) || defined(SPIDER_DISTRO_BROWSER)
|
||||
#define SPIDER_MEMFOOTPRINT SPIDER_MEMFOOTPRINT_REDUCED
|
||||
#elif defined(SPIDER_DISTRO_MICRO)
|
||||
#define SPIDER_MEMFOOTPRINT SPIDER_MEMFOOTPRINT_MINIMAL
|
||||
#else
|
||||
#define SPIDER_MEMFOOTPRINT SPIDER_MEMFOOTPRINT_NORMAL
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// ================== MISC ================== //
|
||||
|
||||
|
||||
Reference in New Issue
Block a user