CHIP compilation flgs
This commit is contained in:
parent
7e99842d73
commit
64df3231bb
10
Makefile
10
Makefile
|
@ -1,6 +1,5 @@
|
|||
CC=gcc
|
||||
OPT=-O3 -Wall -std=c99
|
||||
OPT_ARM=-D__ARM_LINUX__
|
||||
OPT_PRO=-DTIC80_PRO
|
||||
|
||||
RM= rm -f
|
||||
|
@ -308,12 +307,13 @@ linux32-lto-pro:
|
|||
$(eval OPT += $(OPT_PRO))
|
||||
make linux32-lto OPT="$(OPT)"
|
||||
|
||||
arm-lto:
|
||||
$(CC) $(LINUX_INCLUDES) $(OPT_ARM) $(SOURCES) $(TIC80_SRC) $(OPT) $(INCLUDES) $(LINUX_ARM_LIBS) $(LINUX_LINKER_LTO_FLAGS) -flto -o bin/tic
|
||||
chip-lto:
|
||||
$(CC) $(LINUX_INCLUDES) $(SOURCES) $(TIC80_SRC) $(OPT) $(INCLUDES) $(LINUX_ARM_LIBS) $(LINUX_LINKER_LTO_FLAGS) -flto -o bin/tic
|
||||
|
||||
arm-lto-pro:
|
||||
chip-lto-pro:
|
||||
$(eval OPT += $(OPT_PRO))
|
||||
make arm-lto OPT="$(OPT)"
|
||||
$(eval OPT += __CHIP__)
|
||||
make chip-lto OPT="$(OPT)"
|
||||
|
||||
linux:
|
||||
$(CC) $(LINUX_INCLUDES) $(SOURCES) $(LPEG_SRC) $(GIF_SRC) $(SOURCES_EXT) $(TIC80_SRC) $(OPT) $(INCLUDES) $(LINUX_LIBS) $(LINUX_LINKER_FLAGS) -o bin/tic
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
#define CONSOLE_BUFFER_SCREENS 64
|
||||
#define CONSOLE_BUFFER_SIZE (CONSOLE_BUFFER_WIDTH * CONSOLE_BUFFER_HEIGHT * CONSOLE_BUFFER_SCREENS)
|
||||
|
||||
#if defined(__WINDOWS__) || (defined(__LINUX__) && !defined(__ARM_LINUX__)) || defined(__MACOSX__)
|
||||
#if defined(__WINDOWS__) || defined(__LINUX__) || defined(__MACOSX__)
|
||||
#define CAN_EXPORT 1
|
||||
#endif
|
||||
|
||||
|
@ -1423,7 +1423,7 @@ static void exportMap(Console* console)
|
|||
}
|
||||
}
|
||||
|
||||
#if defined(__EMSCRIPTEN__) || defined(__ARM_LINUX__)
|
||||
#if defined(__EMSCRIPTEN__)
|
||||
|
||||
static void onConsoleExportCommand(Console* console, const char* param)
|
||||
{
|
||||
|
|
|
@ -191,13 +191,6 @@ void file_dialog_save(file_dialog_save_callback callback, const char* name, cons
|
|||
|
||||
#elif defined(__LINUX__)
|
||||
|
||||
#if defined(__ARM_LINUX__)
|
||||
|
||||
void file_dialog_load(file_dialog_load_callback callback, void* data) {}
|
||||
void file_dialog_save(file_dialog_save_callback callback, const char* name, const u8* buffer, size_t size, void* data, u32 mode) {}
|
||||
|
||||
#else
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
@ -306,8 +299,6 @@ void file_dialog_save(file_dialog_save_callback callback, const char* name, cons
|
|||
callback(false, data);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#elif defined(__MACOSX__)
|
||||
|
||||
#include <string.h>
|
||||
|
|
20
src/studio.c
20
src/studio.c
|
@ -47,6 +47,7 @@
|
|||
#include "ext/md5.h"
|
||||
|
||||
#define STUDIO_UI_SCALE 3
|
||||
|
||||
#define TEXTURE_SIZE (TIC80_FULLWIDTH)
|
||||
|
||||
#define MAX_CONTROLLERS 4
|
||||
|
@ -81,7 +82,6 @@ static struct
|
|||
|
||||
SDL_Window* window;
|
||||
SDL_Renderer* renderer;
|
||||
SDL_Renderer* softwareRenderer;
|
||||
SDL_Texture* texture;
|
||||
|
||||
SDL_AudioSpec audioSpec;
|
||||
|
@ -196,7 +196,6 @@ static struct
|
|||
|
||||
.window = NULL,
|
||||
.renderer = NULL,
|
||||
.softwareRenderer = NULL,
|
||||
.texture = NULL,
|
||||
.audioDevice = 0,
|
||||
|
||||
|
@ -2371,10 +2370,10 @@ static void onFSInitialized(FileSystem* fs)
|
|||
(TIC80_FULLWIDTH) * STUDIO_UI_SCALE,
|
||||
(TIC80_FULLHEIGHT) * STUDIO_UI_SCALE,
|
||||
SDL_WINDOW_SHOWN | SDL_WINDOW_RESIZABLE
|
||||
#if defined(__ARM_LINUX__)
|
||||
| SDL_WINDOW_FULLSCREEN_DESKTOP
|
||||
#if defined(__CHIP__)
|
||||
| SDL_WINDOW_FULLSCREEN_DESKTOP
|
||||
#endif
|
||||
);
|
||||
);
|
||||
|
||||
initSound();
|
||||
|
||||
|
@ -2402,10 +2401,13 @@ static void onFSInitialized(FileSystem* fs)
|
|||
// set the window icon before renderer is created (issues on Linux)
|
||||
setWindowIcon();
|
||||
|
||||
studio.renderer = SDL_CreateRenderer(studio.window, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);
|
||||
|
||||
if(!studio.renderer)
|
||||
studio.softwareRenderer = studio.renderer = SDL_CreateRenderer(studio.window, -1, SDL_RENDERER_SOFTWARE);
|
||||
studio.renderer = SDL_CreateRenderer(studio.window, -1,
|
||||
#if defined(__CHIP__)
|
||||
SDL_RENDERER_SOFTWARE
|
||||
#else
|
||||
SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC
|
||||
#endif
|
||||
);
|
||||
|
||||
studio.texture = SDL_CreateTexture(studio.renderer, STUDIO_PIXEL_FORMAT, SDL_TEXTUREACCESS_STREAMING, TEXTURE_SIZE, TEXTURE_SIZE);
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
#define COVER_Y 5
|
||||
#define COVER_X (TIC80_WIDTH - COVER_WIDTH - COVER_Y)
|
||||
|
||||
#if defined(__WINDOWS__) || (defined(__LINUX__) && !defined(__ARM_LINUX__)) || defined(__MACOSX__)
|
||||
#if defined(__WINDOWS__) || defined(__LINUX__) || defined(__MACOSX__)
|
||||
#define CAN_OPEN_URL 1
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue