diff --git a/sys/sdl/270_picture_loop/Makefile b/sys/sdl/270_picture_loop/Makefile index 9f409a66..2dc1ad96 100644 --- a/sys/sdl/270_picture_loop/Makefile +++ b/sys/sdl/270_picture_loop/Makefile @@ -1,11 +1,11 @@ -CFLAGS = -g -Wall -I../../../csrc/. `sdl-config --cflags` +CFLAGS = -g -Wall -I../../../csrc/. `sdl2-config --cflags` SRC = $(shell ls ../../../csrc/*.c) $(shell ls ../common/*.c ) main.c OBJ = $(SRC:.c=.o) helloworld: $(OBJ) - $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl-config --libs` -o u8g2_sdl + $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl2-config --libs` -o u8g2_sdl clean: -rm $(OBJ) u8g2_sdl diff --git a/sys/sdl/Shennong/Makefile b/sys/sdl/Shennong/Makefile index 9f409a66..2dc1ad96 100644 --- a/sys/sdl/Shennong/Makefile +++ b/sys/sdl/Shennong/Makefile @@ -1,11 +1,11 @@ -CFLAGS = -g -Wall -I../../../csrc/. `sdl-config --cflags` +CFLAGS = -g -Wall -I../../../csrc/. `sdl2-config --cflags` SRC = $(shell ls ../../../csrc/*.c) $(shell ls ../common/*.c ) main.c OBJ = $(SRC:.c=.o) helloworld: $(OBJ) - $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl-config --libs` -o u8g2_sdl + $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl2-config --libs` -o u8g2_sdl clean: -rm $(OBJ) u8g2_sdl diff --git a/sys/sdl/clock/Makefile b/sys/sdl/clock/Makefile index e54f36f4..29413dfb 100644 --- a/sys/sdl/clock/Makefile +++ b/sys/sdl/clock/Makefile @@ -1,11 +1,11 @@ -CFLAGS = -g -Wall -I../../../csrc/. `sdl-config --cflags` +CFLAGS = -g -Wall -I../../../csrc/. `sdl2-config --cflags` SRC = $(shell ls ../../../csrc/*.c) $(shell ls ../common/*.c ) $(shell ls *.c) OBJ = $(SRC:.c=.o) helloworld: $(OBJ) - $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl-config --libs` -o u8g2_sdl + $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl2-config --libs` -o u8g2_sdl clean: -rm $(OBJ) u8g2_sdl diff --git a/sys/sdl/common/u8x8_d_sdl_128x64.c b/sys/sdl/common/u8x8_d_sdl_128x64.c index a954d0a3..20946ae2 100644 --- a/sys/sdl/common/u8x8_d_sdl_128x64.c +++ b/sys/sdl/common/u8x8_d_sdl_128x64.c @@ -4,13 +4,16 @@ #include "u8g2.h" #include "SDL.h" -#include "SDL_video.h" #include //#define HEIGHT (64) //#define WIDTH 128 +#define W(x,w) (((x)*(w))/100) + +SDL_Window *u8g_sdl_window; SDL_Surface *u8g_sdl_screen; + int u8g_sdl_multiple = 3; Uint32 u8g_sdl_color[256]; int u8g_sdl_height, u8g_sdl_width; @@ -35,10 +38,11 @@ static void u8g_sdl_set_pixel(int x, int y, int idx) for( i = 0; i < u8g_sdl_multiple; i++ ) for( j = 0; j < u8g_sdl_multiple; j++ ) { - offset = - (y * u8g_sdl_multiple + j) * u8g_sdl_screen->w * u8g_sdl_screen->format->BytesPerPixel + - (x * u8g_sdl_multiple + i) * u8g_sdl_screen->format->BytesPerPixel; - assert( offset < (Uint32)(u8g_sdl_screen->w * u8g_sdl_screen->h * u8g_sdl_screen->format->BytesPerPixel) ); + offset = ( + ((y * u8g_sdl_multiple) + i) * (u8g_sdl_width * u8g_sdl_multiple) + + ((x * u8g_sdl_multiple) + j)) * u8g_sdl_screen->format->BytesPerPixel; + + assert( offset < (Uint32)(u8g_sdl_width * u8g_sdl_multiple * u8g_sdl_height * u8g_sdl_multiple * u8g_sdl_screen->format->BytesPerPixel) ); ptr = u8g_sdl_screen->pixels + offset; *ptr = u8g_sdl_color[idx]; } @@ -79,9 +83,6 @@ static void u8g_sdl_set_multiple_8pixel(int x, int y, int cnt, uint8_t *pixel) } } - -#define W(x,w) (((x)*(w))/100) - static void u8g_sdl_init(int width, int height) { u8g_sdl_height = height; @@ -94,21 +95,29 @@ static void u8g_sdl_init(int width, int height) exit(1); } - /* http://www.libsdl.org/cgi/docwiki.cgi/SDL_SetVideoMode */ - u8g_sdl_screen = SDL_SetVideoMode(u8g_sdl_width*u8g_sdl_multiple,u8g_sdl_height*u8g_sdl_multiple,32,SDL_SWSURFACE|SDL_ANYFORMAT); - if ( u8g_sdl_screen == NULL ) + u8g_sdl_window = SDL_CreateWindow("U8g2", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, u8g_sdl_width * u8g_sdl_multiple, u8g_sdl_height * u8g_sdl_multiple, 0); + + if ( u8g_sdl_window == NULL ) { - printf("Couldn't set video mode: %s\n", SDL_GetError()); + printf("Couldn't create window: %s\n", SDL_GetError()); exit(1); } - //printf("%d bits-per-pixel mode\n", u8g_sdl_screen->format->BitsPerPixel); - //printf("%d bytes-per-pixel mode\n", u8g_sdl_screen->format->BytesPerPixel); + + u8g_sdl_screen = SDL_GetWindowSurface(u8g_sdl_window); + + if ( u8g_sdl_screen == NULL ) + { + printf("Couldn't create screen: %s\n", SDL_GetError()); + exit(1); + } + + printf("%d bits-per-pixel mode\n", u8g_sdl_screen->format->BitsPerPixel); + printf("%d bytes-per-pixel mode\n", u8g_sdl_screen->format->BytesPerPixel); u8g_sdl_color[0] = SDL_MapRGB( u8g_sdl_screen->format, 0, 0, 0 ); u8g_sdl_color[1] = SDL_MapRGB( u8g_sdl_screen->format, W(100, 50), W(255,50), 0 ); u8g_sdl_color[2] = SDL_MapRGB( u8g_sdl_screen->format, W(100, 80), W(255,80), 0 ); u8g_sdl_color[3] = SDL_MapRGB( u8g_sdl_screen->format, 100, 255, 0 ); - u8g_sdl_color[4] = SDL_MapRGB( u8g_sdl_screen->format, 30, 30, 30 ); /* @@ -118,8 +127,7 @@ static void u8g_sdl_init(int width, int height) */ /* update all */ - /* http://www.libsdl.org/cgi/docwiki.cgi/SDL_UpdateRect */ - SDL_UpdateRect(u8g_sdl_screen, 0,0,0,0); + SDL_UpdateWindowSurface(u8g_sdl_window); atexit(SDL_Quit); return; @@ -275,15 +283,14 @@ uint8_t u8x8_d_sdl_128x64(u8x8_t *u8g2, uint8_t msg, uint8_t arg_int, void *arg_ do { - c = ((u8x8_tile_t *)arg_ptr)->cnt; - ptr = ((u8x8_tile_t *)arg_ptr)->tile_ptr; - u8g_sdl_set_multiple_8pixel(x, y, c*8, ptr); - arg_int--; + c = ((u8x8_tile_t *)arg_ptr)->cnt; + ptr = ((u8x8_tile_t *)arg_ptr)->tile_ptr; + u8g_sdl_set_multiple_8pixel(x, y, c*8, ptr); + arg_int--; } while( arg_int > 0 ); - + /* update all */ - /* http://www.libsdl.org/cgi/docwiki.cgi/SDL_UpdateRect */ - SDL_UpdateRect(u8g_sdl_screen, 0,0,0,0); + SDL_UpdateWindowSurface(u8g_sdl_window); break; default: @@ -321,15 +328,14 @@ uint8_t u8x8_d_sdl_240x160(u8x8_t *u8g2, uint8_t msg, uint8_t arg_int, void *arg do { - c = ((u8x8_tile_t *)arg_ptr)->cnt; - ptr = ((u8x8_tile_t *)arg_ptr)->tile_ptr; - u8g_sdl_set_multiple_8pixel(x, y, c*8, ptr); - arg_int--; + c = ((u8x8_tile_t *)arg_ptr)->cnt; + ptr = ((u8x8_tile_t *)arg_ptr)->tile_ptr; + u8g_sdl_set_multiple_8pixel(x, y, c*8, ptr); + arg_int--; } while( arg_int > 0 ); /* update all */ - /* http://www.libsdl.org/cgi/docwiki.cgi/SDL_UpdateRect */ - SDL_UpdateRect(u8g_sdl_screen, 0,0,0,0); + SDL_UpdateWindowSurface(u8g_sdl_window); break; default: diff --git a/sys/sdl/draw_tile_8x8/Makefile b/sys/sdl/draw_tile_8x8/Makefile index 9f409a66..2dc1ad96 100644 --- a/sys/sdl/draw_tile_8x8/Makefile +++ b/sys/sdl/draw_tile_8x8/Makefile @@ -1,11 +1,11 @@ -CFLAGS = -g -Wall -I../../../csrc/. `sdl-config --cflags` +CFLAGS = -g -Wall -I../../../csrc/. `sdl2-config --cflags` SRC = $(shell ls ../../../csrc/*.c) $(shell ls ../common/*.c ) main.c OBJ = $(SRC:.c=.o) helloworld: $(OBJ) - $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl-config --libs` -o u8g2_sdl + $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl2-config --libs` -o u8g2_sdl clean: -rm $(OBJ) u8g2_sdl diff --git a/sys/sdl/gm2/Makefile b/sys/sdl/gm2/Makefile index c36a465c..03dfcad8 100644 --- a/sys/sdl/gm2/Makefile +++ b/sys/sdl/gm2/Makefile @@ -1,4 +1,4 @@ -CFLAGS = -g -Wall -Wpointer-arith -I. -I../../../csrc/. -I../../tga/mapgen/. `sdl-config --cflags` +CFLAGS = -g -Wall -Wpointer-arith -I. -I../../../csrc/. -I../../tga/mapgen/. `sdl2-config --cflags` GMSRC = $(shell ls ../../../csrc/*.c) $(shell ls ../common/*.c ) GMSRC += map.c main.c item.c @@ -18,7 +18,7 @@ UGLOBJ = $(UGLSRC:.c=.o) gm: $(GMOBJ) map.c - $(CC) $(CFLAGS) $(LDFLAGS) $(GMOBJ) `sdl-config --libs` -o gm + $(CC) $(CFLAGS) $(LDFLAGS) $(GMOBJ) `sdl2-config --libs` -o gm mapgen: $(MAPGENOBJ) $(CC) $(CFLAGS) $(LDFLAGS) $(MAPGENOBJ) -o mapgen diff --git a/sys/sdl/golem_master/Makefile b/sys/sdl/golem_master/Makefile index a5f36c67..c79e3d30 100644 --- a/sys/sdl/golem_master/Makefile +++ b/sys/sdl/golem_master/Makefile @@ -1,11 +1,11 @@ -CFLAGS = -g -Wall -Wpointer-arith -I../../../csrc/. `sdl-config --cflags` +CFLAGS = -g -Wall -Wpointer-arith -I../../../csrc/. `sdl2-config --cflags` SRC = $(shell ls ../../../csrc/*.c) $(shell ls ../common/*.c ) main.c OBJ = $(SRC:.c=.o) helloworld: $(OBJ) - $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl-config --libs` -o u8g2_sdl + $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl2-config --libs` -o u8g2_sdl mapgen: mapgen.c $(CC) $(CFLAGS) $(LDFLAGS) mapgen.c -o mapgen diff --git a/sys/sdl/hello_numeric/Makefile b/sys/sdl/hello_numeric/Makefile index 9f409a66..2dc1ad96 100644 --- a/sys/sdl/hello_numeric/Makefile +++ b/sys/sdl/hello_numeric/Makefile @@ -1,11 +1,11 @@ -CFLAGS = -g -Wall -I../../../csrc/. `sdl-config --cflags` +CFLAGS = -g -Wall -I../../../csrc/. `sdl2-config --cflags` SRC = $(shell ls ../../../csrc/*.c) $(shell ls ../common/*.c ) main.c OBJ = $(SRC:.c=.o) helloworld: $(OBJ) - $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl-config --libs` -o u8g2_sdl + $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl2-config --libs` -o u8g2_sdl clean: -rm $(OBJ) u8g2_sdl diff --git a/sys/sdl/hello_world_8x8/Makefile b/sys/sdl/hello_world_8x8/Makefile index 9f409a66..2dc1ad96 100644 --- a/sys/sdl/hello_world_8x8/Makefile +++ b/sys/sdl/hello_world_8x8/Makefile @@ -1,11 +1,11 @@ -CFLAGS = -g -Wall -I../../../csrc/. `sdl-config --cflags` +CFLAGS = -g -Wall -I../../../csrc/. `sdl2-config --cflags` SRC = $(shell ls ../../../csrc/*.c) $(shell ls ../common/*.c ) main.c OBJ = $(SRC:.c=.o) helloworld: $(OBJ) - $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl-config --libs` -o u8g2_sdl + $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl2-config --libs` -o u8g2_sdl clean: -rm $(OBJ) u8g2_sdl diff --git a/sys/sdl/hvline/Makefile b/sys/sdl/hvline/Makefile index 9f409a66..2dc1ad96 100644 --- a/sys/sdl/hvline/Makefile +++ b/sys/sdl/hvline/Makefile @@ -1,11 +1,11 @@ -CFLAGS = -g -Wall -I../../../csrc/. `sdl-config --cflags` +CFLAGS = -g -Wall -I../../../csrc/. `sdl2-config --cflags` SRC = $(shell ls ../../../csrc/*.c) $(shell ls ../common/*.c ) main.c OBJ = $(SRC:.c=.o) helloworld: $(OBJ) - $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl-config --libs` -o u8g2_sdl + $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl2-config --libs` -o u8g2_sdl clean: -rm $(OBJ) u8g2_sdl diff --git a/sys/sdl/input_value/Makefile b/sys/sdl/input_value/Makefile index 9f409a66..2dc1ad96 100644 --- a/sys/sdl/input_value/Makefile +++ b/sys/sdl/input_value/Makefile @@ -1,11 +1,11 @@ -CFLAGS = -g -Wall -I../../../csrc/. `sdl-config --cflags` +CFLAGS = -g -Wall -I../../../csrc/. `sdl2-config --cflags` SRC = $(shell ls ../../../csrc/*.c) $(shell ls ../common/*.c ) main.c OBJ = $(SRC:.c=.o) helloworld: $(OBJ) - $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl-config --libs` -o u8g2_sdl + $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl2-config --libs` -o u8g2_sdl clean: -rm $(OBJ) u8g2_sdl diff --git a/sys/sdl/input_value_8x8/Makefile b/sys/sdl/input_value_8x8/Makefile index 9f409a66..2dc1ad96 100644 --- a/sys/sdl/input_value_8x8/Makefile +++ b/sys/sdl/input_value_8x8/Makefile @@ -1,11 +1,11 @@ -CFLAGS = -g -Wall -I../../../csrc/. `sdl-config --cflags` +CFLAGS = -g -Wall -I../../../csrc/. `sdl2-config --cflags` SRC = $(shell ls ../../../csrc/*.c) $(shell ls ../common/*.c ) main.c OBJ = $(SRC:.c=.o) helloworld: $(OBJ) - $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl-config --libs` -o u8g2_sdl + $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl2-config --libs` -o u8g2_sdl clean: -rm $(OBJ) u8g2_sdl diff --git a/sys/sdl/little_rook_chess/Makefile b/sys/sdl/little_rook_chess/Makefile index 9f409a66..2dc1ad96 100644 --- a/sys/sdl/little_rook_chess/Makefile +++ b/sys/sdl/little_rook_chess/Makefile @@ -1,11 +1,11 @@ -CFLAGS = -g -Wall -I../../../csrc/. `sdl-config --cflags` +CFLAGS = -g -Wall -I../../../csrc/. `sdl2-config --cflags` SRC = $(shell ls ../../../csrc/*.c) $(shell ls ../common/*.c ) main.c OBJ = $(SRC:.c=.o) helloworld: $(OBJ) - $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl-config --libs` -o u8g2_sdl + $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl2-config --libs` -o u8g2_sdl clean: -rm $(OBJ) u8g2_sdl diff --git a/sys/sdl/lut_edit/Makefile b/sys/sdl/lut_edit/Makefile index 9f409a66..2dc1ad96 100644 --- a/sys/sdl/lut_edit/Makefile +++ b/sys/sdl/lut_edit/Makefile @@ -1,11 +1,11 @@ -CFLAGS = -g -Wall -I../../../csrc/. `sdl-config --cflags` +CFLAGS = -g -Wall -I../../../csrc/. `sdl2-config --cflags` SRC = $(shell ls ../../../csrc/*.c) $(shell ls ../common/*.c ) main.c OBJ = $(SRC:.c=.o) helloworld: $(OBJ) - $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl-config --libs` -o u8g2_sdl + $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl2-config --libs` -o u8g2_sdl clean: -rm $(OBJ) u8g2_sdl diff --git a/sys/sdl/menu/Makefile b/sys/sdl/menu/Makefile index 55356366..1df5480c 100644 --- a/sys/sdl/menu/Makefile +++ b/sys/sdl/menu/Makefile @@ -1,11 +1,11 @@ -CFLAGS = -g -Wall -I../../../csrc/. `sdl-config --cflags` +CFLAGS = -g -Wall -I../../../csrc/. `sdl2-config --cflags` SRC = $(shell ls ../../../csrc/*.c) $(shell ls ../common/*.c ) main.c menu.c gui.c datecalc.c OBJ = $(SRC:.c=.o) helloworld: $(OBJ) - $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl-config --libs` -o u8g2_sdl + $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl2-config --libs` -o u8g2_sdl clean: -rm $(OBJ) u8g2_sdl diff --git a/sys/sdl/message_box/Makefile b/sys/sdl/message_box/Makefile index 9f409a66..2dc1ad96 100644 --- a/sys/sdl/message_box/Makefile +++ b/sys/sdl/message_box/Makefile @@ -1,11 +1,11 @@ -CFLAGS = -g -Wall -I../../../csrc/. `sdl-config --cflags` +CFLAGS = -g -Wall -I../../../csrc/. `sdl2-config --cflags` SRC = $(shell ls ../../../csrc/*.c) $(shell ls ../common/*.c ) main.c OBJ = $(SRC:.c=.o) helloworld: $(OBJ) - $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl-config --libs` -o u8g2_sdl + $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl2-config --libs` -o u8g2_sdl clean: -rm $(OBJ) u8g2_sdl diff --git a/sys/sdl/message_box_8x8/Makefile b/sys/sdl/message_box_8x8/Makefile index 9f409a66..2dc1ad96 100644 --- a/sys/sdl/message_box_8x8/Makefile +++ b/sys/sdl/message_box_8x8/Makefile @@ -1,11 +1,11 @@ -CFLAGS = -g -Wall -I../../../csrc/. `sdl-config --cflags` +CFLAGS = -g -Wall -I../../../csrc/. `sdl2-config --cflags` SRC = $(shell ls ../../../csrc/*.c) $(shell ls ../common/*.c ) main.c OBJ = $(SRC:.c=.o) helloworld: $(OBJ) - $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl-config --libs` -o u8g2_sdl + $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl2-config --libs` -o u8g2_sdl clean: -rm $(OBJ) u8g2_sdl diff --git a/sys/sdl/selection_list/Makefile b/sys/sdl/selection_list/Makefile index 9f409a66..2dc1ad96 100644 --- a/sys/sdl/selection_list/Makefile +++ b/sys/sdl/selection_list/Makefile @@ -1,11 +1,11 @@ -CFLAGS = -g -Wall -I../../../csrc/. `sdl-config --cflags` +CFLAGS = -g -Wall -I../../../csrc/. `sdl2-config --cflags` SRC = $(shell ls ../../../csrc/*.c) $(shell ls ../common/*.c ) main.c OBJ = $(SRC:.c=.o) helloworld: $(OBJ) - $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl-config --libs` -o u8g2_sdl + $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl2-config --libs` -o u8g2_sdl clean: -rm $(OBJ) u8g2_sdl diff --git a/sys/sdl/selection_list_8x8/Makefile b/sys/sdl/selection_list_8x8/Makefile index 9f409a66..2dc1ad96 100644 --- a/sys/sdl/selection_list_8x8/Makefile +++ b/sys/sdl/selection_list_8x8/Makefile @@ -1,11 +1,11 @@ -CFLAGS = -g -Wall -I../../../csrc/. `sdl-config --cflags` +CFLAGS = -g -Wall -I../../../csrc/. `sdl2-config --cflags` SRC = $(shell ls ../../../csrc/*.c) $(shell ls ../common/*.c ) main.c OBJ = $(SRC:.c=.o) helloworld: $(OBJ) - $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl-config --libs` -o u8g2_sdl + $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl2-config --libs` -o u8g2_sdl clean: -rm $(OBJ) u8g2_sdl diff --git a/sys/sdl/string_width/Makefile b/sys/sdl/string_width/Makefile index 9f409a66..2dc1ad96 100644 --- a/sys/sdl/string_width/Makefile +++ b/sys/sdl/string_width/Makefile @@ -1,11 +1,11 @@ -CFLAGS = -g -Wall -I../../../csrc/. `sdl-config --cflags` +CFLAGS = -g -Wall -I../../../csrc/. `sdl2-config --cflags` SRC = $(shell ls ../../../csrc/*.c) $(shell ls ../common/*.c ) main.c OBJ = $(SRC:.c=.o) helloworld: $(OBJ) - $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl-config --libs` -o u8g2_sdl + $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl2-config --libs` -o u8g2_sdl clean: -rm $(OBJ) u8g2_sdl diff --git a/sys/sdl/text_full_buffer/Makefile b/sys/sdl/text_full_buffer/Makefile index e2a1fb8d..c6da5d2a 100644 --- a/sys/sdl/text_full_buffer/Makefile +++ b/sys/sdl/text_full_buffer/Makefile @@ -1,11 +1,11 @@ -CFLAGS = -g -Wall -I../../../csrc/. `sdl-config --cflags` +CFLAGS = -g -Wall -I../../../csrc/. `sdl2-config --cflags` SRC = $(shell ls ../../../csrc/*.c) ../../bitmap/common/u8x8_d_bitmap.c $(shell ls ../common/*.c ) main.c OBJ = $(SRC:.c=.o) helloworld: $(OBJ) - $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl-config --libs` -o u8g2_sdl + $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl2-config --libs` -o u8g2_sdl clean: -rm $(OBJ) u8g2_sdl diff --git a/sys/sdl/text_kerning/Makefile b/sys/sdl/text_kerning/Makefile index 9f409a66..2dc1ad96 100644 --- a/sys/sdl/text_kerning/Makefile +++ b/sys/sdl/text_kerning/Makefile @@ -1,11 +1,11 @@ -CFLAGS = -g -Wall -I../../../csrc/. `sdl-config --cflags` +CFLAGS = -g -Wall -I../../../csrc/. `sdl2-config --cflags` SRC = $(shell ls ../../../csrc/*.c) $(shell ls ../common/*.c ) main.c OBJ = $(SRC:.c=.o) helloworld: $(OBJ) - $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl-config --libs` -o u8g2_sdl + $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl2-config --libs` -o u8g2_sdl clean: -rm $(OBJ) u8g2_sdl diff --git a/sys/sdl/text_kerning2/Makefile b/sys/sdl/text_kerning2/Makefile index 9f409a66..2dc1ad96 100644 --- a/sys/sdl/text_kerning2/Makefile +++ b/sys/sdl/text_kerning2/Makefile @@ -1,11 +1,11 @@ -CFLAGS = -g -Wall -I../../../csrc/. `sdl-config --cflags` +CFLAGS = -g -Wall -I../../../csrc/. `sdl2-config --cflags` SRC = $(shell ls ../../../csrc/*.c) $(shell ls ../common/*.c ) main.c OBJ = $(SRC:.c=.o) helloworld: $(OBJ) - $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl-config --libs` -o u8g2_sdl + $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl2-config --libs` -o u8g2_sdl clean: -rm $(OBJ) u8g2_sdl diff --git a/sys/sdl/text_kerning3/Makefile b/sys/sdl/text_kerning3/Makefile index 9f409a66..2dc1ad96 100644 --- a/sys/sdl/text_kerning3/Makefile +++ b/sys/sdl/text_kerning3/Makefile @@ -1,11 +1,11 @@ -CFLAGS = -g -Wall -I../../../csrc/. `sdl-config --cflags` +CFLAGS = -g -Wall -I../../../csrc/. `sdl2-config --cflags` SRC = $(shell ls ../../../csrc/*.c) $(shell ls ../common/*.c ) main.c OBJ = $(SRC:.c=.o) helloworld: $(OBJ) - $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl-config --libs` -o u8g2_sdl + $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl2-config --libs` -o u8g2_sdl clean: -rm $(OBJ) u8g2_sdl diff --git a/sys/sdl/text_kerning_thai/Makefile b/sys/sdl/text_kerning_thai/Makefile index 9f409a66..2dc1ad96 100644 --- a/sys/sdl/text_kerning_thai/Makefile +++ b/sys/sdl/text_kerning_thai/Makefile @@ -1,11 +1,11 @@ -CFLAGS = -g -Wall -I../../../csrc/. `sdl-config --cflags` +CFLAGS = -g -Wall -I../../../csrc/. `sdl2-config --cflags` SRC = $(shell ls ../../../csrc/*.c) $(shell ls ../common/*.c ) main.c OBJ = $(SRC:.c=.o) helloworld: $(OBJ) - $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl-config --libs` -o u8g2_sdl + $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl2-config --libs` -o u8g2_sdl clean: -rm $(OBJ) u8g2_sdl diff --git a/sys/sdl/text_picture_loop/Makefile b/sys/sdl/text_picture_loop/Makefile index 0507d66c..11d8b40d 100644 --- a/sys/sdl/text_picture_loop/Makefile +++ b/sys/sdl/text_picture_loop/Makefile @@ -1,11 +1,11 @@ -CFLAGS = -g -Wall -I../../../csrc/. `sdl-config --cflags` -fsanitize=address -fsanitize=undefined -fsanitize=bounds-strict -fsanitize=object-size +CFLAGS = -g -Wall -I../../../csrc/. `sdl2-config --cflags` -fsanitize=address -fsanitize=undefined -fsanitize=bounds-strict -fsanitize=object-size SRC = $(shell ls ../../../csrc/*.c) ../../bitmap/common/u8x8_d_bitmap.c $(shell ls ../common/*.c ) main.c OBJ = $(SRC:.c=.o) helloworld: $(OBJ) - $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl-config --libs` -o u8g2_sdl + $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl2-config --libs` -o u8g2_sdl clean: -rm $(OBJ) u8g2_sdl diff --git a/sys/sdl/text_scrolling/Makefile b/sys/sdl/text_scrolling/Makefile index 9f409a66..2dc1ad96 100644 --- a/sys/sdl/text_scrolling/Makefile +++ b/sys/sdl/text_scrolling/Makefile @@ -1,11 +1,11 @@ -CFLAGS = -g -Wall -I../../../csrc/. `sdl-config --cflags` +CFLAGS = -g -Wall -I../../../csrc/. `sdl2-config --cflags` SRC = $(shell ls ../../../csrc/*.c) $(shell ls ../common/*.c ) main.c OBJ = $(SRC:.c=.o) helloworld: $(OBJ) - $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl-config --libs` -o u8g2_sdl + $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl2-config --libs` -o u8g2_sdl clean: -rm $(OBJ) u8g2_sdl diff --git a/sys/sdl/text_strwidth/Makefile b/sys/sdl/text_strwidth/Makefile index 9f409a66..2dc1ad96 100644 --- a/sys/sdl/text_strwidth/Makefile +++ b/sys/sdl/text_strwidth/Makefile @@ -1,11 +1,11 @@ -CFLAGS = -g -Wall -I../../../csrc/. `sdl-config --cflags` +CFLAGS = -g -Wall -I../../../csrc/. `sdl2-config --cflags` SRC = $(shell ls ../../../csrc/*.c) $(shell ls ../common/*.c ) main.c OBJ = $(SRC:.c=.o) helloworld: $(OBJ) - $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl-config --libs` -o u8g2_sdl + $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl2-config --libs` -o u8g2_sdl clean: -rm $(OBJ) u8g2_sdl diff --git a/sys/sdl/text_unicode/Makefile b/sys/sdl/text_unicode/Makefile index 9f409a66..2dc1ad96 100644 --- a/sys/sdl/text_unicode/Makefile +++ b/sys/sdl/text_unicode/Makefile @@ -1,11 +1,11 @@ -CFLAGS = -g -Wall -I../../../csrc/. `sdl-config --cflags` +CFLAGS = -g -Wall -I../../../csrc/. `sdl2-config --cflags` SRC = $(shell ls ../../../csrc/*.c) $(shell ls ../common/*.c ) main.c OBJ = $(SRC:.c=.o) helloworld: $(OBJ) - $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl-config --libs` -o u8g2_sdl + $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl2-config --libs` -o u8g2_sdl clean: -rm $(OBJ) u8g2_sdl diff --git a/sys/sdl/utf8_test_8x8/Makefile b/sys/sdl/utf8_test_8x8/Makefile index 9f409a66..2dc1ad96 100644 --- a/sys/sdl/utf8_test_8x8/Makefile +++ b/sys/sdl/utf8_test_8x8/Makefile @@ -1,11 +1,11 @@ -CFLAGS = -g -Wall -I../../../csrc/. `sdl-config --cflags` +CFLAGS = -g -Wall -I../../../csrc/. `sdl2-config --cflags` SRC = $(shell ls ../../../csrc/*.c) $(shell ls ../common/*.c ) main.c OBJ = $(SRC:.c=.o) helloworld: $(OBJ) - $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl-config --libs` -o u8g2_sdl + $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl2-config --libs` -o u8g2_sdl clean: -rm $(OBJ) u8g2_sdl diff --git a/sys/sdl/xbm/Makefile b/sys/sdl/xbm/Makefile index 9f409a66..2dc1ad96 100644 --- a/sys/sdl/xbm/Makefile +++ b/sys/sdl/xbm/Makefile @@ -1,11 +1,11 @@ -CFLAGS = -g -Wall -I../../../csrc/. `sdl-config --cflags` +CFLAGS = -g -Wall -I../../../csrc/. `sdl2-config --cflags` SRC = $(shell ls ../../../csrc/*.c) $(shell ls ../common/*.c ) main.c OBJ = $(SRC:.c=.o) helloworld: $(OBJ) - $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl-config --libs` -o u8g2_sdl + $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl2-config --libs` -o u8g2_sdl clean: -rm $(OBJ) u8g2_sdl diff --git a/sys/tga/example/Makefile b/sys/tga/example/Makefile index edff00d0..b109a784 100644 --- a/sys/tga/example/Makefile +++ b/sys/tga/example/Makefile @@ -1,11 +1,11 @@ -CFLAGS = -g -Wall -I../../../csrc/. `sdl-config --cflags` -DU8G2_16BIT +CFLAGS = -g -Wall -I../../../csrc/. `sdl2-config --cflags` -DU8G2_16BIT SRC = $(shell ls ../../../csrc/*.c) $(shell ls ../common/*.c ) main.c OBJ = $(SRC:.c=.o) u8g2_tga: $(OBJ) - $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl-config --libs` -o u8g2_tga + $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl2-config --libs` -o u8g2_tga clean: -rm $(OBJ) u8g2_tga diff --git a/sys/tga/hello_world_8x8/Makefile b/sys/tga/hello_world_8x8/Makefile index edff00d0..b109a784 100644 --- a/sys/tga/hello_world_8x8/Makefile +++ b/sys/tga/hello_world_8x8/Makefile @@ -1,11 +1,11 @@ -CFLAGS = -g -Wall -I../../../csrc/. `sdl-config --cflags` -DU8G2_16BIT +CFLAGS = -g -Wall -I../../../csrc/. `sdl2-config --cflags` -DU8G2_16BIT SRC = $(shell ls ../../../csrc/*.c) $(shell ls ../common/*.c ) main.c OBJ = $(SRC:.c=.o) u8g2_tga: $(OBJ) - $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl-config --libs` -o u8g2_tga + $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl2-config --libs` -o u8g2_tga clean: -rm $(OBJ) u8g2_tga diff --git a/sys/tga/ref_man_pics_8x8/Makefile b/sys/tga/ref_man_pics_8x8/Makefile index edff00d0..b109a784 100644 --- a/sys/tga/ref_man_pics_8x8/Makefile +++ b/sys/tga/ref_man_pics_8x8/Makefile @@ -1,11 +1,11 @@ -CFLAGS = -g -Wall -I../../../csrc/. `sdl-config --cflags` -DU8G2_16BIT +CFLAGS = -g -Wall -I../../../csrc/. `sdl2-config --cflags` -DU8G2_16BIT SRC = $(shell ls ../../../csrc/*.c) $(shell ls ../common/*.c ) main.c OBJ = $(SRC:.c=.o) u8g2_tga: $(OBJ) - $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl-config --libs` -o u8g2_tga + $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl2-config --libs` -o u8g2_tga clean: -rm $(OBJ) u8g2_tga diff --git a/sys/tga/ref_man_pics_u8g2/Makefile b/sys/tga/ref_man_pics_u8g2/Makefile index abb633b9..1b751818 100644 --- a/sys/tga/ref_man_pics_u8g2/Makefile +++ b/sys/tga/ref_man_pics_u8g2/Makefile @@ -1,4 +1,4 @@ -CFLAGS = -g -Wall -I../../../csrc/. `sdl-config --cflags` -DU8G2_16BIT -DU8G2_REF_MAN_PIC +CFLAGS = -g -Wall -I../../../csrc/. `sdl2-config --cflags` -DU8G2_16BIT -DU8G2_REF_MAN_PIC SRC = $(shell ls ../../../csrc/*.c) $(shell ls ../common/*.c ) main.c @@ -6,7 +6,7 @@ SRC = $(shell ls ../../../csrc/*.c) $(shell ls ../common/*.c ) main.c OBJ = $(SRC:.c=.o) u8g2_tga: $(OBJ) - $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl-config --libs` -o u8g2_tga + $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl2-config --libs` -o u8g2_tga clean: -rm $(OBJ) u8g2_tga diff --git a/sys/tga/text_picture_loop/Makefile b/sys/tga/text_picture_loop/Makefile index edff00d0..b109a784 100644 --- a/sys/tga/text_picture_loop/Makefile +++ b/sys/tga/text_picture_loop/Makefile @@ -1,11 +1,11 @@ -CFLAGS = -g -Wall -I../../../csrc/. `sdl-config --cflags` -DU8G2_16BIT +CFLAGS = -g -Wall -I../../../csrc/. `sdl2-config --cflags` -DU8G2_16BIT SRC = $(shell ls ../../../csrc/*.c) $(shell ls ../common/*.c ) main.c OBJ = $(SRC:.c=.o) u8g2_tga: $(OBJ) - $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl-config --libs` -o u8g2_tga + $(CC) $(CFLAGS) $(LDFLAGS) $(OBJ) `sdl2-config --libs` -o u8g2_tga clean: -rm $(OBJ) u8g2_tga