CHIP compilation flgs

This commit is contained in:
BADIM-PC\Vadim 2017-11-20 09:14:37 +03:00
parent 7e99842d73
commit 64df3231bb
5 changed files with 19 additions and 26 deletions

View File

@ -1,6 +1,5 @@
CC=gcc CC=gcc
OPT=-O3 -Wall -std=c99 OPT=-O3 -Wall -std=c99
OPT_ARM=-D__ARM_LINUX__
OPT_PRO=-DTIC80_PRO OPT_PRO=-DTIC80_PRO
RM= rm -f RM= rm -f
@ -308,12 +307,13 @@ linux32-lto-pro:
$(eval OPT += $(OPT_PRO)) $(eval OPT += $(OPT_PRO))
make linux32-lto OPT="$(OPT)" make linux32-lto OPT="$(OPT)"
arm-lto: chip-lto:
$(CC) $(LINUX_INCLUDES) $(OPT_ARM) $(SOURCES) $(TIC80_SRC) $(OPT) $(INCLUDES) $(LINUX_ARM_LIBS) $(LINUX_LINKER_LTO_FLAGS) -flto -o bin/tic $(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)) $(eval OPT += $(OPT_PRO))
make arm-lto OPT="$(OPT)" $(eval OPT += __CHIP__)
make chip-lto OPT="$(OPT)"
linux: linux:
$(CC) $(LINUX_INCLUDES) $(SOURCES) $(LPEG_SRC) $(GIF_SRC) $(SOURCES_EXT) $(TIC80_SRC) $(OPT) $(INCLUDES) $(LINUX_LIBS) $(LINUX_LINKER_FLAGS) -o bin/tic $(CC) $(LINUX_INCLUDES) $(SOURCES) $(LPEG_SRC) $(GIF_SRC) $(SOURCES_EXT) $(TIC80_SRC) $(OPT) $(INCLUDES) $(LINUX_LIBS) $(LINUX_LINKER_FLAGS) -o bin/tic

View File

@ -40,7 +40,7 @@
#define CONSOLE_BUFFER_SCREENS 64 #define CONSOLE_BUFFER_SCREENS 64
#define CONSOLE_BUFFER_SIZE (CONSOLE_BUFFER_WIDTH * CONSOLE_BUFFER_HEIGHT * CONSOLE_BUFFER_SCREENS) #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 #define CAN_EXPORT 1
#endif #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) static void onConsoleExportCommand(Console* console, const char* param)
{ {

View File

@ -191,13 +191,6 @@ void file_dialog_save(file_dialog_save_callback callback, const char* name, cons
#elif defined(__LINUX__) #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 <stdlib.h>
#include <string.h> #include <string.h>
#include <gtk/gtk.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); callback(false, data);
} }
#endif
#elif defined(__MACOSX__) #elif defined(__MACOSX__)
#include <string.h> #include <string.h>

View File

@ -47,6 +47,7 @@
#include "ext/md5.h" #include "ext/md5.h"
#define STUDIO_UI_SCALE 3 #define STUDIO_UI_SCALE 3
#define TEXTURE_SIZE (TIC80_FULLWIDTH) #define TEXTURE_SIZE (TIC80_FULLWIDTH)
#define MAX_CONTROLLERS 4 #define MAX_CONTROLLERS 4
@ -81,7 +82,6 @@ static struct
SDL_Window* window; SDL_Window* window;
SDL_Renderer* renderer; SDL_Renderer* renderer;
SDL_Renderer* softwareRenderer;
SDL_Texture* texture; SDL_Texture* texture;
SDL_AudioSpec audioSpec; SDL_AudioSpec audioSpec;
@ -196,7 +196,6 @@ static struct
.window = NULL, .window = NULL,
.renderer = NULL, .renderer = NULL,
.softwareRenderer = NULL,
.texture = NULL, .texture = NULL,
.audioDevice = 0, .audioDevice = 0,
@ -2371,10 +2370,10 @@ static void onFSInitialized(FileSystem* fs)
(TIC80_FULLWIDTH) * STUDIO_UI_SCALE, (TIC80_FULLWIDTH) * STUDIO_UI_SCALE,
(TIC80_FULLHEIGHT) * STUDIO_UI_SCALE, (TIC80_FULLHEIGHT) * STUDIO_UI_SCALE,
SDL_WINDOW_SHOWN | SDL_WINDOW_RESIZABLE SDL_WINDOW_SHOWN | SDL_WINDOW_RESIZABLE
#if defined(__ARM_LINUX__) #if defined(__CHIP__)
| SDL_WINDOW_FULLSCREEN_DESKTOP | SDL_WINDOW_FULLSCREEN_DESKTOP
#endif #endif
); );
initSound(); initSound();
@ -2402,10 +2401,13 @@ static void onFSInitialized(FileSystem* fs)
// set the window icon before renderer is created (issues on Linux) // set the window icon before renderer is created (issues on Linux)
setWindowIcon(); setWindowIcon();
studio.renderer = SDL_CreateRenderer(studio.window, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC); studio.renderer = SDL_CreateRenderer(studio.window, -1,
#if defined(__CHIP__)
if(!studio.renderer) SDL_RENDERER_SOFTWARE
studio.softwareRenderer = studio.renderer = SDL_CreateRenderer(studio.window, -1, 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); studio.texture = SDL_CreateTexture(studio.renderer, STUDIO_PIXEL_FORMAT, SDL_TEXTUREACCESS_STREAMING, TEXTURE_SIZE, TEXTURE_SIZE);

View File

@ -38,7 +38,7 @@
#define COVER_Y 5 #define COVER_Y 5
#define COVER_X (TIC80_WIDTH - COVER_WIDTH - COVER_Y) #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 #define CAN_OPEN_URL 1
#endif #endif